continuation of making request_hash optional
authorAnil-Kumar Vengalil <Anil-Kumar.Vengalil@sophia.inria.fr>
Sun, 15 Nov 2009 19:39:54 +0000 (19:39 +0000)
committerAnil-Kumar Vengalil <Anil-Kumar.Vengalil@sophia.inria.fr>
Sun, 15 Nov 2009 19:39:54 +0000 (19:39 +0000)
sfa/plc/nodes.py
sfa/plc/slices.py

index c3f6a26..5c0777a 100644 (file)
@@ -116,7 +116,8 @@ class Nodes(SimpleStorage):
                 caller_cred = self.caller_cred
                 # get the rspec from the aggregate
                 try:
-                    agg_rspec = aggregates[aggregate].get_resources(credential, hrn, caller_cred)
+                   request_hash=None
+                    agg_rspec = aggregates[aggregate].get_resources(credential, hrn, request_hash, caller_cred)
                 except:
                     arg_list = [credential, hrn]
                     request_hash = self.api.key.compute_hash(arg_list)
index 7a9e5cc..8f1da89 100644 (file)
@@ -174,7 +174,8 @@ class Slices(SimpleStorage):
             success = False
             # request hash is optional so lets try the call without it
             try:
-                aggregates[aggregate].delete_slice(credential, hrn, caller_cred)
+               request_hash=None       
+                aggregates[aggregate].delete_slice(credential, hrn, request_hash, caller_cred)
                 success = True
             except:
                 print >> log, "%s" % (traceback.format_exc())
@@ -503,14 +504,16 @@ class Slices(SimpleStorage):
                     # send the whloe rspec to the local aggregate
                     if net_hrn in [self.api.hrn]:
                         try:
-                            aggregates[net_hrn].create_slice(credential, hrn, rspec, caller_cred)
+                           request_hash = None
+                            aggregates[net_hrn].create_slice(credential, hrn, rspec, request_hash, caller_cred)
                         except:
                             arg_list = [credential,hrn,rspec]
                             request_hash = self.api.key.compute_hash(arg_list)
                             aggregates[net_hrn].create_slice(credential, hrn, rspec, request_hash, caller_cred)
                     else:
                         try:
-                            aggregates[net_hrn].create_slice(credential, hrn, rspecs[net_hrn], caller_cred)
+                           request_hash = None
+                            aggregates[net_hrn].create_slice(credential, hrn, rspecs[net_hrn], request_hash, caller_cred)
                         except:
                             arg_list = [credential,hrn,rspecs[net_hrn]]
                             request_hash = self.api.key.compute_hash(arg_list)
@@ -526,7 +529,8 @@ class Slices(SimpleStorage):
                             network_found = aggregates[aggregate].get_aggregates(credential, net_hrn, request_hash)
                         if network_networks:
                             try:
-                                aggregates[aggregate].create_slice(credential, hrn, rspecs[net_hrn], caller_cred)
+                               request_hash = None
+                                aggregates[aggregate].create_slice(credential, hrn, rspecs[net_hrn], request_hash, caller_cred)
                             except:
                                 arg_list = [credential, hrn, rspecs[net_hrn]]
                                 request_hash = self.api.key.compute_hash(arg_list)