diff options
author | Kim Hagen <kim@sentrium.io> | 2021-06-27 10:25:30 -0500 |
---|---|---|
committer | Kim Hagen <kim@sentrium.io> | 2021-06-27 13:51:17 -0500 |
commit | 06c7b19c362a9994e6b8dc3efae2bb5cfb580498 (patch) | |
tree | d58efa2e5b0f9030a8aead8a3e3dd05d0b0c9a77 | |
parent | 195744e7d3278978e805f20b46e9be4d32187a61 (diff) | |
download | vyos-cloud-init-06c7b19c362a9994e6b8dc3efae2bb5cfb580498.tar.gz vyos-cloud-init-06c7b19c362a9994e6b8dc3efae2bb5cfb580498.zip |
T3653: Cloudinit subnet error if a cidr (/24) is used instead of a subnet mask (255.255.255.0)
-rw-r--r-- | cloudinit/config/cc_vyos.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py index e472a1cd..e255cc00 100644 --- a/cloudinit/config/cc_vyos.py +++ b/cloudinit/config/cc_vyos.py @@ -135,7 +135,7 @@ def set_config_ovf(config, ovf_environment): # Configure an interface and default route if ip_address and ip_mask and gateway: - ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask)).with_prefixlen + ip_address_cidr = ipaddress.ip_interface("{}/{}".format(ip_address, ip_mask.replace('/', ''))).with_prefixlen logger.debug("Configuring the IP address on the eth0 interface: {}".format(ip_address_cidr)) set_ipaddress(config, 'eth0', ip_address_cidr) |