From eb39ca3268c805d5d57bdb224ab16c5bfb19857e Mon Sep 17 00:00:00 2001 From: Tomoki Sekiyama Date: Mon, 17 Aug 2015 21:37:08 +0000 Subject: Support multiple addresses assignment with eni Currently only the first IPv4/v6 address is assigned to a NIC even if multiple addresses are specified in config file. With this change, eni implementation can configure multiple IPv4/v6 addresses for a NIC. Also this fixes IPv6 netmask format, which currently causes an error on ifup. Change-Id: I0a38d376bece8af297bddede594962fd3a193d09 --- os_net_config/objects.py | 1 + 1 file changed, 1 insertion(+) (limited to 'os_net_config/objects.py') diff --git a/os_net_config/objects.py b/os_net_config/objects.py index 8899164..6d0921f 100644 --- a/os_net_config/objects.py +++ b/os_net_config/objects.py @@ -117,6 +117,7 @@ class Address(object): ip_nw = netaddr.IPNetwork(self.ip_netmask) self.ip = str(ip_nw.ip) self.netmask = str(ip_nw.netmask) + self.prefixlen = ip_nw.prefixlen self.version = ip_nw.version @staticmethod -- cgit 1.2.3-korg