git://git.onelab.eu
/
sfa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
avoid publishing non-relevant entries in GetVersion
[sfa.git]
/
sfa
/
methods
/
Delete.py
diff --git
a/sfa/methods/Delete.py
b/sfa/methods/Delete.py
index
593de28
..
9204256
100644
(file)
--- a/
sfa/methods/Delete.py
+++ b/
sfa/methods/Delete.py
@@
-4,6
+4,7
@@
from sfa.storage.parameter import Parameter, Mixed
from sfa.trust.auth import Auth
from sfa.trust.credential import Credential
from sfa.trust.auth import Auth
from sfa.trust.credential import Credential
+
class Delete(Method):
"""
Remove the slice or slivers and free the allocated resources
class Delete(Method):
"""
Remove the slice or slivers and free the allocated resources
@@
-14,22
+15,24
@@
class Delete(Method):
"""
interfaces = ['aggregate', 'slicemgr', 'component']
"""
interfaces = ['aggregate', 'slicemgr', 'component']
-
+
accepts = [
accepts = [
- Parameter(type([str]), "Human readable name of slice to delete (hrn or urn)"),
+ Parameter(
+ type([str]), "Human readable name of slice to delete (hrn or urn)"),
Parameter(type([dict]), "Credentials"),
Parameter(dict, "options"),
Parameter(type([dict]), "Credentials"),
Parameter(dict, "options"),
-
]
+ ]
returns = Parameter(int, "1 if successful")
returns = Parameter(int, "1 if successful")
-
+
def call(self, xrns, creds, options):
valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'deletesliver', xrns,
def call(self, xrns, creds, options):
valid_creds = self.api.auth.checkCredentialsSpeaksFor(creds, 'deletesliver', xrns,
- check_sliver_callback
=
self.api.driver.check_sliver_credentials,
+ check_sliver_callback
=
self.api.driver.check_sliver_credentials,
options=options)
options=options)
- #log the call
+ #
log the call
origin_hrn = Credential(cred=valid_creds[0]).get_gid_caller().get_hrn()
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))
+ self.api.logger.info("interface: %s\tcaller-hrn: %s\ttarget-hrn: %s\tmethod-name: %s" %
+ (self.api.interface, origin_hrn, xrns, self.name))
return self.api.manager.Delete(self.api, xrns, creds, options)
return self.api.manager.Delete(self.api, xrns, creds, options)