aboutsummaryrefslogtreecommitdiffstats
path: root/os_net_config/objects.py
diff options
context:
space:
mode:
authorTomoki Sekiyama <tomoki.sekiyama@hds.com>2015-08-17 21:37:08 +0000
committerTomoki Sekiyama <tomoki.sekiyama@hds.com>2015-08-17 17:47:11 -0400
commiteb39ca3268c805d5d57bdb224ab16c5bfb19857e (patch)
tree626f02d07ccd0497cc8064335bb4dbedb65fd574 /os_net_config/objects.py
parent0b130b6b3b4a9e0768e99b1496d2852f2ca47bb7 (diff)
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
Diffstat (limited to 'os_net_config/objects.py')
-rw-r--r--os_net_config/objects.py1
1 files changed, 1 insertions, 0 deletions
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