summaryrefslogtreecommitdiffstats
path: root/nova/compute
diff options
context:
space:
mode:
Diffstat (limited to 'nova/compute')
-rw-r--r--nova/compute/manager.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/nova/compute/manager.py b/nova/compute/manager.py
index 4c6d2f06f..f36e14aa2 100644
--- a/nova/compute/manager.py
+++ b/nova/compute/manager.py
@@ -64,10 +64,15 @@ class ComputeManager(manager.Manager):
@defer.inlineCallbacks
@exception.wrap_exception
+ def refresh_security_group(self, context, security_group_id, **_kwargs):
+ yield self.driver.refresh_security_group(security_group_id)
+
+ @defer.inlineCallbacks
+ @exception.wrap_exception
def run_instance(self, context, instance_id, **_kwargs):
"""Launch a new instance with specified options."""
instance_ref = self.db.instance_get(context, instance_id)
- if instance_ref['ec2_id'] in self.driver.list_instances():
+ if instance_ref['name'] in self.driver.list_instances():
raise exception.Error("Instance has already been created")
logging.debug("instance %s: starting...", instance_id)
project_id = instance_ref['project_id']
@@ -129,7 +134,7 @@ class ComputeManager(manager.Manager):
raise exception.Error(
'trying to reboot a non-running'
'instance: %s (state: %s excepted: %s)' %
- (instance_ref['ec2_id'],
+ (instance_ref['internal_id'],
instance_ref['state'],
power_state.RUNNING))
@@ -151,7 +156,7 @@ class ComputeManager(manager.Manager):
if FLAGS.connection_type == 'libvirt':
fname = os.path.abspath(os.path.join(FLAGS.instances_path,
- instance_ref['ec2_id'],
+ instance_ref['internal_id'],
'console.log'))
with open(fname, 'r') as f:
output = f.read()