def call(self, xrn, creds, rspec, options):
xrn = Xrn(xrn, type='slice')
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, xrn.get_hrn(), self.name))
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
# Find the valid credentials
- valid_creds = self.api.auth.checkCredentials(creds, 'createsliver', xrn.get_hrn(), speaking_for_hrn=speaking_for)
+ valid_creds = self.api.auth.checkCredentials(creds, 'createsliver', xrn.get_hrn(), options=options)
# use the expiration from the first valid credential to determine when
# the slivers should expire.
expiration = datetime_to_string(Credential(cred=valid_creds[0]).expiration)
else:
raise SfaInvalidArgument('Must specify an rspec version option. geni_rspec_version cannot be null')
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
-
# Find the valid credentials
- valid_creds = self.api.auth.checkCredentials(creds, 'listnodes', speaking_for_hrn=speaking_for)
+ valid_creds = self.api.auth.checkCredentials(creds, 'listnodes', options=options)
# get hrn of the original caller
origin_hrn = options.get('origin_hrn', None)
# Find the valid credentials
valid_creds = self.api.auth.checkCredentials(creds, 'createsliver', xrns,
check_sliver_callback = self.api.driver.check_sliver_credentials,
- speaking_for_hrn=speaking_for)
+ options=options)
origin_hrn = Credential(cred=valid_creds[0]).get_gid_caller().get_hrn()
self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, origin_hrn, xrns, self.name))
result = self.api.manager.Provision(self.api, xrns, creds, options)
self.api.logger.info("interface: %s\ttarget-hrn: %s\tcaller-creds: %s\tmethod-name: %s"%(self.api.interface, urns, creds, self.name))
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
-
# Find the valid credentials
valid_creds = self.api.auth.checkCredentials(creds, 'renewsliver', urns,
check_sliver_callback = self.api.driver.check_sliver_credentials,
- speaking_for_hrn=speaking_for)
+ options=options)
# Validate that the time does not go beyond the credential's expiration time
requested_time = utcparse(expiration_time)
returns = Parameter(dict, "Status details")
def call(self, xrns, creds, options):
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
valid_creds = self.api.auth.checkCredentials(creds, 'sliverstatus', xrns,
check_sliver_callback = self.api.driver.check_sliver_credentials,
- speaking_for_hrn=speaking_for)
+ options=options)
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, xrns, self.name))
return self.api.manager.Status(self.api, xrns, creds, options)