interface elements in the manifest rspec should contain a sliver id attribute
[sfa.git] / sfa / openstack / osaggregate.py
index 0ff4860..4562c56 100644 (file)
@@ -135,8 +135,10 @@ class OSAggregate:
                 if_xrn = PlXrn(auth=self.driver.hrn, 
                                interface='node%s' % (instance.hostId)) 
                 if_client_id = Xrn(if_xrn.urn, type='interface', id="eth%s" %if_index).urn
+                if_sliver_id = Xrn(rspec_node['sliver_id'], type='slice', id="eth%s" %if_index).urn
                 interface = Interface({'component_id': if_xrn.urn,
-                                       'client_id': if_client_id})
+                                       'client_id': if_client_id,
+                                       'sliver_id': if_sliver_id})
                 interface['ips'] =  [{'address': private_ip['addr'],
                                      #'netmask': private_ip['network'],
                                      'type': 'ipv%s' % str(private_ip['version'])}]
@@ -325,7 +327,7 @@ class OSAggregate:
             self.driver.shell.nova_manager.servers.delete(instance)
             # deleate this instance's security groups
             thread_manager.run(_delete_security_group, instance)
-        return 1
+        return True
 
 
     def stop_instances(self, instance_name, tenant_name):