fix bug where slicemgr will skip local interface when the calling cred is delegated...
[sfa.git] / sfa / managers / slice_manager_pl.py
index b3da52d..527814e 100644 (file)
@@ -23,6 +23,7 @@ from sfa.util.threadmanager import ThreadManager
 import sfa.util.xmlrpcprotocol as xmlrpcprotocol     
 from sfa.util.debug import log
 import sfa.plc.peers as peers
+from copy import copy
 
 def get_version():
     version = {}
@@ -65,10 +66,9 @@ def create_slice(api, xrn, creds, rspec, users):
     cred = api.getCredential()
     threads = ThreadManager()
     for aggregate in api.aggregates:
-        if aggregate not in [api.auth.client_cred.get_gid_caller().get_hrn()]:
-            server = api.aggregates[aggregate]
-            # Just send entire RSpec to each aggregate
-            threads.run(server.CreateSliver, xrn, cred, rspec, users)
+        # Just send entire RSpec to each aggregate
+        server = api.aggregates[aggregate]
+        threads.run(server.CreateSliver, xrn, cred, rspec, users)
             
     results = threads.get_results() 
     merged_rspec = merge_rspecs(results)
@@ -108,7 +108,7 @@ def get_ticket(api, xrn, creds, rspec, users):
             # we may have a peer that knows about this aggregate
             for agg in api.aggregates:
                 target_aggs = api.aggregates[agg].get_aggregates(credential, net_urn)
-                if not target_aggs or not 'hrn' not target_aggs[0]:
+                if not target_aggs or not 'hrn' in target_aggs[0]:
                     continue
                 # send the request to this address 
                 url = target_aggs[0]['url']
@@ -260,13 +260,13 @@ def get_rspec(api, creds, options):
     threads = ThreadManager()
     
     for aggregate in api.aggregates:
-        if aggregate not in [api.auth.client_cred.get_gid_caller().get_hrn()]:   
-            # get the rspec from the aggregate
-            server = api.aggregates[aggregate]
-            threads.run(server.ListResources, cred, options)
-            #threads.run(server.get_resources, cred, xrn, origin_hrn)
+        # get the rspec from the aggregate
+        server = api.aggregates[aggregate]
+        my_opts = copy(options)
+        my_opts['geni_compressed'] = False
+        threads.run(server.ListResources, cred, my_opts)
+        #threads.run(server.get_resources, cred, xrn, origin_hrn)
                     
-
     results = threads.get_results()
     # combine the rspecs into a single rspec 
     for agg_rspec in results: