Various cloud fixes
This commit is contained in:
@@ -382,7 +382,7 @@ class CloudController(object):
|
|||||||
return instance_response
|
return instance_response
|
||||||
|
|
||||||
def describe_addresses(self, context, **kwargs):
|
def describe_addresses(self, context, **kwargs):
|
||||||
return self.format_addresses(context.user)
|
return self.format_addresses(context)
|
||||||
|
|
||||||
def format_addresses(self, context):
|
def format_addresses(self, context):
|
||||||
addresses = []
|
addresses = []
|
||||||
@@ -456,7 +456,7 @@ class CloudController(object):
|
|||||||
address = network.allocate_ip(
|
address = network.allocate_ip(
|
||||||
inst['user_id'], inst['project_id'], mac=inst['mac_address'])
|
inst['user_id'], inst['project_id'], mac=inst['mac_address'])
|
||||||
inst['private_dns_name'] = str(address)
|
inst['private_dns_name'] = str(address)
|
||||||
inst['bridge_name'] = network.BridgedNetwork.get_network_for_project(inst['user_id'], inst['project_id'])['bridge_name']
|
inst['bridge_name'] = network.BridgedNetwork.get_network_for_project(inst['user_id'], inst['project_id'], 'default')['bridge_name']
|
||||||
# TODO: allocate expresses on the router node
|
# TODO: allocate expresses on the router node
|
||||||
inst.save()
|
inst.save()
|
||||||
rpc.cast(FLAGS.compute_topic,
|
rpc.cast(FLAGS.compute_topic,
|
||||||
@@ -466,7 +466,7 @@ class CloudController(object):
|
|||||||
(context.user.name, inst['private_dns_name']))
|
(context.user.name, inst['private_dns_name']))
|
||||||
# TODO: Make the NetworkComputeNode figure out the network name from ip.
|
# TODO: Make the NetworkComputeNode figure out the network name from ip.
|
||||||
return defer.succeed(self._format_instances(
|
return defer.succeed(self._format_instances(
|
||||||
context.user, reservation_id))
|
context, reservation_id))
|
||||||
|
|
||||||
def terminate_instances(self, context, instance_id, **kwargs):
|
def terminate_instances(self, context, instance_id, **kwargs):
|
||||||
logging.debug("Going to start terminating instances")
|
logging.debug("Going to start terminating instances")
|
||||||
@@ -542,7 +542,7 @@ class CloudController(object):
|
|||||||
raise exception.ApiError('only group "all" is supported')
|
raise exception.ApiError('only group "all" is supported')
|
||||||
if not operation_type in ['add', 'delete']:
|
if not operation_type in ['add', 'delete']:
|
||||||
raise exception.ApiError('operation_type must be add or delete')
|
raise exception.ApiError('operation_type must be add or delete')
|
||||||
result = images.modify(context.user, image_id, operation_type)
|
result = images.modify(context, image_id, operation_type)
|
||||||
return defer.succeed(result)
|
return defer.succeed(result)
|
||||||
|
|
||||||
def update_state(self, topic, value):
|
def update_state(self, topic, value):
|
||||||
|
|||||||
Reference in New Issue
Block a user