summaryrefslogtreecommitdiffstats
path: root/nova/endpoint
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2010-07-02 10:39:04 -0500
committerVishvananda Ishaya <vishvananda@gmail.com>2010-07-02 10:39:04 -0500
commit45c192aee681eb684599ac2cacd9c38996ca2bb5 (patch)
treef56146ed403f60109f909697f455620b7483feef /nova/endpoint
parent04b7b42bde70c53e251f795a1d71cd7cd341b5dc (diff)
Fixes and add interface template
Diffstat (limited to 'nova/endpoint')
-rw-r--r--nova/endpoint/cloud.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/nova/endpoint/cloud.py b/nova/endpoint/cloud.py
index 50c087f2d..960c1e9af 100644
--- a/nova/endpoint/cloud.py
+++ b/nova/endpoint/cloud.py
@@ -538,7 +538,7 @@ class CloudController(object):
inst['ami_launch_index'] = num
inst['bridge_name'] = bridge_name
if FLAGS.simple_network:
- network.allocate_simple_ip(mac=inst['mac_address'])
+ address = network.allocate_simple_ip()
else:
if inst['image_id'] == FLAGS.vpn_image_id:
address = network.allocate_vpn_ip(
@@ -579,10 +579,13 @@ class CloudController(object):
pass
if instance.get('private_dns_name', None):
logging.debug("Deallocating address %s" % instance.get('private_dns_name', None))
- try:
- self.network.deallocate_ip(instance.get('private_dns_name', None))
- except Exception, _err:
- pass
+ if FLAGS.simple_network:
+ network.deallocate_simple_ip(instance.get('private_dns_name', None))
+ else:
+ try:
+ self.network.deallocate_ip(instance.get('private_dns_name', None))
+ except Exception, _err:
+ pass
if instance.get('node_name', 'unassigned') != 'unassigned': #It's also internal default
rpc.cast('%s.%s' % (FLAGS.compute_topic, instance['node_name']),
{"method": "terminate_instance",