From: Tony Mack Date: Sat, 4 Feb 2012 03:30:16 +0000 (-0500) Subject: Fix get resources for slices X-Git-Tag: merged-in-sfa-2.1-2~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=062544ddd2ea3d46ba6b96a0873213d456877263;p=sfa.git Fix get resources for slices --- diff --git a/sfa/openstack/nova_shell.py b/sfa/openstack/nova_shell.py index bebe8a8e..053fd717 100644 --- a/sfa/openstack/nova_shell.py +++ b/sfa/openstack/nova_shell.py @@ -45,6 +45,7 @@ class NovaShell: def __init__ ( self, config ) : url = config.SFA_PLC_URL # try to figure if the url is local + is_local=False hostname=urlparse(url).hostname if hostname == 'localhost': is_local=True # otherwise compare IP addresses; diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index 7e6a53db..fb3f17b2 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -28,7 +28,7 @@ class OSAggregate: # this is an isntance type dict name = instance['name'] type = instance['name'] - elif isinstnace(instance, nova.db.sqlalchemy.models.Instance): + elif isinstance(instance, nova.db.sqlalchemy.models.Instance): # this is an object that describes a running instance name = instance.display_name type = instance.instance_type.name @@ -155,4 +155,12 @@ class OSAggregate: self.driver.shell.db.key_pair_destroy(username, key.name) def verify_instances(self, slicename, rspec): - pass + rsepc = RSpec(rspec) + nodes = rspec.version.get_nodes_with_slivers() + old_instances = self.driver.shell.db.instance_get_all_by_project(name) + for node in nodes: + for slivers in node.get('slivers', []): + pass + # get instance type + # get image + # start instance