def CreateSliver(self,xrn,rspec_string,users,creds,options): xrn = Xrn(xrn, 'slice') slice_leaf = xrn.get_leaf() slice_hrn = xrn.get_hrn() authority = xrn.get_authority_hrn() expiration_date = self.driver.get_expiration(creds, slice_hrn) return self.driver.create_sliver (slice_leaf,authority,rspec_string, users, options, expiration_date)
def CreateSliver(self, xrn, rspec_string, users, creds, options): xrn = Xrn(xrn, "slice") slice_leaf = xrn.get_leaf() slice_hrn = xrn.get_hrn() authority = xrn.get_authority_hrn() expiration_date = self.driver.get_expiration(creds, slice_hrn) return self.driver.create_sliver(slice_leaf, authority, rspec_string, users, options, expiration_date)
def call(self, xrn, creds, type): xrn=Xrn(xrn,type=type) # validate the cred valid_creds = self.api.auth.checkCredentials(creds, "remove") self.api.auth.verify_object_permission(xrn.get_hrn()) #log the call origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn() self.api.logger.info("interface: %s\tmethod-name: %s\tcaller-hrn: %s\ttarget-urn: %s"%( self.api.interface, self.name, origin_hrn, xrn.get_urn())) return self.api.manager.Remove(self.api, xrn)
def call(self, xrn, creds, type): xrn = Xrn(xrn, type=type) # validate the cred valid_creds = self.api.auth.checkCredentials(creds, "remove") self.api.auth.verify_object_permission(xrn.get_hrn()) #log the call origin_hrn = Credential( string=valid_creds[0]).get_gid_caller().get_hrn() self.api.logger.info( "interface: %s\tmethod-name: %s\tcaller-hrn: %s\ttarget-urn: %s" % (self.api.interface, self.name, origin_hrn, xrn.get_urn())) return self.api.manager.Remove(self.api, xrn)