4 from sfa.util.faults import *
5 from sfa.util.misc import *
6 from sfa.util.method import Method
7 from sfa.util.parameter import Parameter, Mixed
8 from sfa.trust.auth import Auth
9 from sfa.plc.slices import Slices
11 class get_slices(Method):
13 Get a list of instantiated slices at this authority.
15 @param cred credential string specifying the rights of the caller
16 @return list of human readable slice names (hrn).
19 interfaces = ['aggregate', 'slicemgr']
22 Parameter(str, "Credential string"),
23 Mixed(Parameter(str, "Request hash"),
24 Parameter(None, "Request hash not specified"))
27 returns = [Parameter(str, "Human readable slice name (hrn)")]
29 def call(self, cred, request_hash=None):
30 self.api.auth.authenticateCred(cred, [cred], request_hash)
31 self.api.auth.check(cred, 'listslices')
32 slices = Slices(self.api)