fix floating_ip to follow standard create pattern
This commit is contained in:
@@ -87,11 +87,12 @@ class NetworkTestCase(test.TrialTestCase):
|
||||
"""Makes sure that we can allocaate a public ip"""
|
||||
# TODO(vish): better way of adding floating ips
|
||||
pubnet = IPy.IP(flags.FLAGS.public_range)
|
||||
ip_str = str(pubnet[0])
|
||||
address = str(pubnet[0])
|
||||
try:
|
||||
db.floating_ip_get_by_address(None, ip_str)
|
||||
db.floating_ip_get_by_address(None, address)
|
||||
except exception.NotFound:
|
||||
db.floating_ip_create(None, ip_str, FLAGS.host)
|
||||
db.floating_ip_create(None, {'address': address,
|
||||
'host': FLAGS.host})
|
||||
float_addr = self.network.allocate_floating_ip(self.context,
|
||||
self.projects[0].id)
|
||||
fix_addr = self._create_address(0)
|
||||
|
||||
Reference in New Issue
Block a user