call traceability for get_slices method
[sfa.git] / sfa / methods / create_gid.py
index 12fe0f6..6640410 100644 (file)
@@ -31,12 +31,16 @@ class create_gid(Method):
         Parameter(str, "Human readable name (hrn)"),
         Mixed(Parameter(str, "Unique identifier for new GID (uuid)"),
               Parameter(None, "Unique identifier (uuid) not specified")),   
-        Parameter(str, "public-key string")
+        Parameter(str, "public-key string"),
+        Mixed(Parameter(str, "Request hash"),
+              Parameter(None, "Request hash not specified"))
         ]
 
     returns = Parameter(str, "String represeneation of a GID object")
     
-    def call(self, cred, hrn, uuid, pubkey_str):
+    def call(self, cred, hrn, uuid, pubkey_str, request_hash=None):
+        # request hash is optional 
+        self.api.auth.authenticateCred(cred, [cred, hrn, uuid, pubkey_str], request_hash)
         self.api.auth.check(cred, "getcredential")
         self.api.auth.verify_object_belongs_to_me(hrn)
         self.api.auth.verify_object_permission(hrn)