Support multiple <network> tags in the RSpec
authorAndy Bavier <acb@cs.princeton.edu>
Tue, 5 Jul 2011 21:26:15 +0000 (17:26 -0400)
committerAndy Bavier <acb@cs.princeton.edu>
Tue, 5 Jul 2011 21:26:15 +0000 (17:26 -0400)
sfa/managers/aggregate_manager_eucalyptus.py

index 4bd0c22..3954bf5 100644 (file)
@@ -525,7 +525,7 @@ def CreateSliver(api, xrn, creds, xml, users, call_id):
     pendingRmInst = []
     for sliceInst in s.instances:
         pendingRmInst.append(sliceInst.instance_id)
-    existingInstGroup = rspecXML.findall('.//euca_instances')
+    existingInstGroup = rspecXML.findall("./network[@id='%s']//euca_instances"%cloud['name'])
     for instGroup in existingInstGroup:
         for existingInst in instGroup:
             if existingInst.get('id') in pendingRmInst:
@@ -537,7 +537,7 @@ def CreateSliver(api, xrn, creds, xml, users, call_id):
     conn.terminate_instances(pendingRmInst)
 
     # Process new instance requests
-    requests = rspecXML.findall('.//request')
+    requests = rspecXML.findall("./network[@id='%s']//request"%cloud['name'])
     if requests:
         # Get all the public keys associate with slice.
         pubKeys = getKeysForSlice(s.slice_hrn)