Merge "Bug 751229: Floating address range fixed"
This commit is contained in:
1
Authors
1
Authors
@@ -57,6 +57,7 @@ Hisaharu Ishii <ishii.hisaharu@lab.ntt.co.jp>
|
||||
Hisaki Ohara <hisaki.ohara@intel.com>
|
||||
Ilya Alekseyev <ilyaalekseyev@acm.org>
|
||||
Isaku Yamahata <yamahata@valinux.co.jp>
|
||||
Ivan Kolodyazhny <e0ne@e0ne.info>
|
||||
Jake Dahn <jake@ansolabs.com>
|
||||
James E. Blair <jeblair@hp.com>
|
||||
Jason Cannavale <jason.cannavale@rackspace.com>
|
||||
|
||||
@@ -682,8 +682,10 @@ class FloatingIpCommands(object):
|
||||
@args('--ip_range', dest="range", metavar='<range>', help='IP range')
|
||||
def create(self, range):
|
||||
"""Creates floating ips for zone by range"""
|
||||
for address in netaddr.IPNetwork(range):
|
||||
db.floating_ip_create(context.get_admin_context(),
|
||||
addresses = netaddr.IPNetwork(range)
|
||||
admin_context = context.get_admin_context()
|
||||
for address in addresses.iter_hosts():
|
||||
db.floating_ip_create(admin_context,
|
||||
{'address': str(address)})
|
||||
|
||||
@args('--ip_range', dest="ip_range", metavar='<range>', help='IP range')
|
||||
|
||||
Reference in New Issue
Block a user