Skip to content

Commit

Permalink
DLPX-91506 failed to update the networkInterface MTU value on ESX pla…
Browse files Browse the repository at this point in the history
  • Loading branch information
palash-gandhi committed Jul 1, 2024
1 parent ba1075e commit 3ef9bd6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 28 deletions.
1 change: 0 additions & 1 deletion cloudinit/net/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,6 @@ def generate_fallback_config(config_driver=None):

cfg = {
"dhcp4": True,
"dhcp6": True,
"set-name": target_name,
"match": match,
}
Expand Down
4 changes: 0 additions & 4 deletions tests/unittests/net/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ def test_generate_fallback_finds_connected_eth_with_mac(self):
"eth1": {
"match": {"name": "eth1"},
"dhcp4": True,
"dhcp6": True,
"set-name": "eth1",
}
},
Expand All @@ -282,7 +281,6 @@ def test_generate_fallback_finds_dormant_eth_with_mac(self):
"eth0": {
"match": {"name": "eth0"},
"dhcp4": True,
"dhcp6": True,
"set-name": "eth0",
}
},
Expand All @@ -298,7 +296,6 @@ def test_generate_fallback_finds_eth_by_operstate(self):
"ethernets": {
"eth0": {
"dhcp4": True,
"dhcp6": True,
"match": {"name": "eth0"},
"set-name": "eth0",
}
Expand Down Expand Up @@ -365,7 +362,6 @@ def is_netfail_master(iface, _driver=None):
"ethernets": {
"ens3": {
"dhcp4": True,
"dhcp6": True,
"match": {"name": "ens3"},
"set-name": "ens3",
}
Expand Down
25 changes: 3 additions & 22 deletions tests/unittests/test_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -4826,7 +4826,6 @@ def test_device_driver_v2(
"ethernets": {
"eth0": {
"dhcp4": True,
"dhcp6": True,
"set-name": "eth0",
"match": {
"name": "eth0",
Expand Down Expand Up @@ -4911,9 +4910,6 @@ def test_device_driver(
auto eth0
iface eth0 inet dhcp
# control-alias eth0
iface eth0 inet6 dhcp
"""
self.assertEqual(expected.lstrip(), contents.lstrip())

Expand Down Expand Up @@ -4996,9 +4992,6 @@ def test_hv_netvsc_vf_filter(
auto eth1
iface eth1 inet dhcp
# control-alias eth1
iface eth1 inet6 dhcp
"""
self.assertEqual(expected.lstrip(), contents.lstrip())

Expand Down Expand Up @@ -5215,8 +5208,6 @@ def test_default_generation(
#
BOOTPROTO=dhcp
DEVICE=eth1000
DHCPV6C=yes
IPV6INIT=yes
NM_CONTROLLED=no
ONBOOT=yes
TYPE=Ethernet
Expand Down Expand Up @@ -6140,8 +6131,7 @@ def test_default_generation(
expected_content = """
# Created by cloud-init automatically, do not edit.
#
BOOTPROTO=dhcp
DHCLIENT6_MODE=managed
BOOTPROTO=dhcp4
STARTMODE=auto
""".lstrip()
self.assertEqual(expected_content, content)
Expand Down Expand Up @@ -6539,12 +6529,7 @@ def test_default_generation(
[ipv4]
method=auto
may-fail=true
[ipv6]
method=auto
may-fail=true
may-fail=false
"""
),
},
Expand Down Expand Up @@ -6851,9 +6836,6 @@ def test_default_generation(
auto eth1000
iface eth1000 inet dhcp
# control-alias eth1000
iface eth1000 inet6 dhcp
"""
self.assertEqual(expected.lstrip(), contents.lstrip())

Expand Down Expand Up @@ -6913,7 +6895,6 @@ class TestNetplanNetRendering:
ethernets:
eth1000:
dhcp4: true
dhcp6: true
match:
name: eth1000
set-name: eth1000
Expand Down Expand Up @@ -8441,7 +8422,7 @@ def test_networkd_default_generation(
[Match]
Name=eth1000
[Network]
DHCP=yes"""
DHCP=ipv4"""
).rstrip(" ")

expected = self.create_conf_dict(expected.splitlines())
Expand Down
3 changes: 2 additions & 1 deletion tools/read-version
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ def get_version_from_git(
"describe",
branch_name,
"--abbrev=8",
"--tags",
] + flags

try:
Expand All @@ -101,7 +102,7 @@ def get_version_from_git(
else:
version = src_version
version_long = ""
return version, version_long
return os.path.basename(version), os.path.basename(version_long)


def main(use_tags: bool = False, output_json: bool = False):
Expand Down

0 comments on commit 3ef9bd6

Please sign in to comment.