user_cred = self.get_user_cred().save_to_string(save_parents=True)
server = self.geni_am
call_options = {}
- return server.ListResources([user_cred], call_options)
+ print server.ListResources([user_cred], call_options)
#
from sfa.trust.rights import *
from sfa.trust.gid import *
from sfa.util.faults import *
+from sfa.util.sfalogging import *
##
# Credential is a tuple:
if self.privileges:
dict["privileges"] = self.privileges.save_to_string()
str = xmlrpclib.dumps((dict,), allow_none=True)
- self.set_data(str)
+ self.set_data('URI:http://' + str)
##
# Retrieve the attributes of the credential from the alt-subject-name field
# get_* methods of this class and should not need to be called explicitly.
def decode(self):
- data = self.get_data()
+ data = self.get_data().lstrip('URI:http://')
+
if data:
- dict = xmlrpclib.loads(self.get_data())[0][0]
+ dict = xmlrpclib.loads(data)[0][0]
else:
dict = {}
privilege_table = {"authority": ["register", "remove", "update", "resolve", "list", "getcredential", "*"],
"refresh": ["remove", "update"],
- "resolve": ["resolve", "list", "getcredential"],
+ "resolve": ["resolve", "list", "getcredential", "listresources", "getversion"],
"sa": ["getticket", "redeemslice", "redeemticket", "createslice", "deleteslice", "updateslice",
"getsliceresources", "getticket", "loanresources", "stopslice", "startslice",
"deleteslice", "resetslice", "listslices", "listnodes", "getpolicy"],