X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmethods%2FSliverStatus.py;h=f722c7cd01150f6a29da353a2fdd59952ec5bd17;hb=cf630d87d633f3861e3ac8a50433fa29ca46a74e;hp=0da6b501c4161873cab615492fbb7de52fce723f;hpb=fd3298512903685d7926fbfdff56be8e5207fdd1;p=sfa.git diff --git a/sfa/methods/SliverStatus.py b/sfa/methods/SliverStatus.py index 0da6b501..f722c7cd 100644 --- a/sfa/methods/SliverStatus.py +++ b/sfa/methods/SliverStatus.py @@ -1,7 +1,7 @@ -from sfa.util.faults import * -from sfa.util.namespace import * +from sfa.util.xrn import urn_to_hrn from sfa.util.method import Method -from sfa.util.parameter import Parameter + +from sfa.storage.parameter import Parameter, Mixed class SliverStatus(Method): """ @@ -10,22 +10,22 @@ class SliverStatus(Method): @param slice_urn (string) URN of slice to allocate to """ - interfaces = ['aggregate', 'slicemgr', 'component', 'geni_am'] + interfaces = ['aggregate', 'slicemgr', 'component'] accepts = [ Parameter(str, "Slice URN"), Mixed(Parameter(str, "Credential string"), Parameter(type([str]), "List of credentials")), + Parameter(dict, "Options") ] returns = Parameter(dict, "Status details") - def call(self, slice_xrn, creds): + def call(self, slice_xrn, creds, options={}): hrn, type = urn_to_hrn(slice_xrn) valid_creds = self.api.auth.checkCredentials(creds, 'sliverstatus', hrn) self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name)) - manager = self.api.get_interface_manager() - status = manager.delete_slice(self.api, xrn, valid_creds) + status = self.api.manager.SliverStatus(self.api, hrn, valid_creds, options) return status