summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-06-20 16:34:03 +0000
committerGerrit Code Review <review@openstack.org>2013-06-20 16:34:03 +0000
commite72b32d02bd2a3fd283a103a04e383df0ba4db65 (patch)
tree16eb22bfa51a6ee19448b4bb964cf624d087be04 /nova/compute
parent75ead3a2a37efbc6a4fdea7e492ca41cdd559a8c (diff)
parente6b6ac0869bf3852787bef597a6633232e2eed47 (diff)
downloadnova-e72b32d02bd2a3fd283a103a04e383df0ba4db65.tar.gz
nova-e72b32d02bd2a3fd283a103a04e383df0ba4db65.tar.xz
nova-e72b32d02bd2a3fd283a103a04e383df0ba4db65.zip
Merge "Adding fixed_ip in create.end notification"
Diffstat (limited to 'nova/compute')
-rwxr-xr-xnova/compute/manager.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 1def5b069..5e7639fb2 100755
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -878,7 +878,7 @@ class ComputeManager(manager.SchedulerDependentManager):
extra_usage_info = {}
- def notify(status, msg=None):
+ def notify(status, msg=None, **kwargs):
"""Send a create.{start,error,end} notification."""
type_ = "create.%(status)s" % dict(status=status)
info = extra_usage_info.copy()
@@ -886,7 +886,7 @@ class ComputeManager(manager.SchedulerDependentManager):
msg = ""
info['message'] = msg
self._notify_about_instance_usage(context, instance, type_,
- extra_usage_info=info)
+ extra_usage_info=info, **kwargs)
try:
image_meta = self._prebuild_instance(context, instance)
@@ -895,10 +895,11 @@ class ComputeManager(manager.SchedulerDependentManager):
notify("start") # notify that build is starting
- instance = self._build_instance(context, request_spec,
- filter_properties, requested_networks, injected_files,
- admin_password, is_first_time, node, instance, image_meta)
- notify("end", msg=_("Success")) # notify that build is done
+ instance, network_info = self._build_instance(context,
+ request_spec, filter_properties, requested_networks,
+ injected_files, admin_password, is_first_time, node,
+ instance, image_meta)
+ notify("end", msg=_("Success"), network_info=network_info)
except exception.RescheduledException as e:
# Instance build encountered an error, and has been rescheduled.
@@ -1028,7 +1029,7 @@ class ComputeManager(manager.SchedulerDependentManager):
raise exc_info[0], exc_info[1], exc_info[2]
# spawn success
- return instance
+ return instance, network_info
def _log_original_error(self, exc_info, instance_uuid):
type_, value, tb = exc_info