summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim <kim.sidney@gmail.com>2021-06-27 20:54:09 +0200
committerGitHub <noreply@github.com>2021-06-27 20:54:09 +0200
commit57b6d5b33843821c71d5ae7fc2c984c39ec2b330 (patch)
treef5f53b3faebd2560bc827f88a1309376fc4273cf
parent2df3d01dd7621156dd5003158988dcd9b61836cb (diff)
parentf19bdae2a31d7271698bf9e3afdbfa150d40b571 (diff)
downloadvyos-cloud-init-57b6d5b33843821c71d5ae7fc2c984c39ec2b330.tar.gz
vyos-cloud-init-57b6d5b33843821c71d5ae7fc2c984c39ec2b330.zip
Merge pull request #45 from UnicronNL/current
T3653: Cloudinit subnet error if a cidr (/24) is used instead of a su…
-rw-r--r--cloudinit/config/cc_vyos.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/config/cc_vyos.py b/cloudinit/config/cc_vyos.py
index 65037e3b..c1a27b3c 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)