summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
authorRick Harris <rick.harris@rackspace.com>2011-02-25 16:47:08 +0000
committerRick Harris <rick.harris@rackspace.com>2011-02-25 16:47:08 +0000
commit7ae64e06643025e4945ae0ef056f9fb2184904ff (patch)
tree467ff2123559b9ce06ed1c343bd9ec12cce2c16b /nova/compute
parent079b532a1080da9fe5d99e90fa9c60d16506de06 (diff)
parent645bc7a7dea6ba01d76589632200636e243641ec (diff)
Merging trunk, conflicts fixed
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/api.py7
-rw-r--r--nova/compute/manager.py12
2 files changed, 19 insertions, 0 deletions
diff --git a/nova/compute/api.py b/nova/compute/api.py
index d842e28a5..625778b66 100644
--- a/nova/compute/api.py
+++ b/nova/compute/api.py
@@ -502,6 +502,13 @@ class API(base.Base):
"""
self._cast_compute_message('reset_network', context, instance_id)
+ def inject_network_info(self, context, instance_id):
+ """
+ Inject network info for the instance.
+
+ """
+ self._cast_compute_message('inject_network_info', context, instance_id)
+
def attach_volume(self, context, instance_id, volume_id, device):
if not re.match("^/dev/[a-z]d[a-z]+$", device):
raise exception.ApiError(_("Invalid device specified: %s. "
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index b8d4b7ee9..d659712ad 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -527,6 +527,18 @@ class ComputeManager(manager.Manager):
context=context)
self.driver.reset_network(instance_ref)
+ @checks_instance_lock
+ def inject_network_info(self, context, instance_id):
+ """
+ Inject network info for the instance.
+
+ """
+ context = context.elevated()
+ instance_ref = self.db.instance_get(context, instance_id)
+ LOG.debug(_('instance %s: inject network info'), instance_id,
+ context=context)
+ self.driver.inject_network_info(instance_ref)
+
@exception.wrap_exception
def get_console_output(self, context, instance_id):
"""Send the console output for an instance."""