git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
93c4c35
)
pass options to auth.check()
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 22 May 2014 02:02:04 +0000
(22:02 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Thu, 22 May 2014 02:02:04 +0000
(22:02 -0400)
sfa/methods/CreateSliver.py
patch
|
blob
|
history
sfa/methods/DeleteSliver.py
patch
|
blob
|
history
sfa/methods/ListResources.py
patch
|
blob
|
history
sfa/methods/RenewSliver.py
patch
|
blob
|
history
sfa/methods/SliverStatus.py
patch
|
blob
|
history
diff --git
a/sfa/methods/CreateSliver.py
b/sfa/methods/CreateSliver.py
index
bc9bf96
..
47647da
100644
(file)
--- a/
sfa/methods/CreateSliver.py
+++ b/
sfa/methods/CreateSliver.py
@@
-34,10
+34,8
@@
class CreateSliver(Method):
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
-
# Find the valid credentials
# Find the valid credentials
- valid_creds = self.api.auth.checkCredentials(creds, 'createsliver', hrn,
speaking_for
)
+ valid_creds = self.api.auth.checkCredentials(creds, 'createsliver', hrn,
options=options
)
origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn()
# make sure users info is specified
origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn()
# make sure users info is specified
diff --git
a/sfa/methods/DeleteSliver.py
b/sfa/methods/DeleteSliver.py
index
caa3694
..
66726aa
100644
(file)
--- a/
sfa/methods/DeleteSliver.py
+++ b/
sfa/methods/DeleteSliver.py
@@
-26,8
+26,7
@@
class DeleteSliver(Method):
def call(self, xrn, creds, options):
(hrn, type) = urn_to_hrn(xrn)
def call(self, xrn, creds, options):
(hrn, type) = urn_to_hrn(xrn)
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
- valid_creds = self.api.auth.checkCredentials(creds, 'deletesliver', hrn, speaking_for)
+ valid_creds = self.api.auth.checkCredentials(creds, 'deletesliver', hrn, options=options)
#log the call
origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn()
#log the call
origin_hrn = Credential(string=valid_creds[0]).get_gid_caller().get_hrn()
diff --git
a/sfa/methods/ListResources.py
b/sfa/methods/ListResources.py
index
4fb0faf
..
03d904d
100644
(file)
--- a/
sfa/methods/ListResources.py
+++ b/
sfa/methods/ListResources.py
@@
-36,10
+36,9
@@
class ListResources(Method):
# get slice's hrn from options
xrn = options.get('geni_slice_urn', '')
(hrn, _) = urn_to_hrn(xrn)
# get slice's hrn from options
xrn = options.get('geni_slice_urn', '')
(hrn, _) = urn_to_hrn(xrn)
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
# Find the valid credentials
# Find the valid credentials
- valid_creds = self.api.auth.checkCredentials(creds, 'listnodes', hrn,
speaking_for
)
+ valid_creds = self.api.auth.checkCredentials(creds, 'listnodes', hrn,
options=options
)
# get hrn of the original caller
origin_hrn = options.get('origin_hrn', None)
# get hrn of the original caller
origin_hrn = options.get('origin_hrn', None)
diff --git
a/sfa/methods/RenewSliver.py
b/sfa/methods/RenewSliver.py
index
735a566
..
27257b6
100644
(file)
--- a/
sfa/methods/RenewSliver.py
+++ b/
sfa/methods/RenewSliver.py
@@
-32,10
+32,8
@@
class RenewSliver(Method):
self.api.logger.info("interface: %s\ttarget-hrn: %s\tcaller-creds: %s\tmethod-name: %s"%(self.api.interface, hrn, creds, self.name))
self.api.logger.info("interface: %s\ttarget-hrn: %s\tcaller-creds: %s\tmethod-name: %s"%(self.api.interface, hrn, creds, self.name))
- (speaking_for, _) = urn_to_hrn(options.get('geni_speaking_for'))
-
# Find the valid credentials
# Find the valid credentials
- valid_creds = self.api.auth.checkCredentials(creds, 'renewsliver', hrn,
speaking_for
)
+ valid_creds = self.api.auth.checkCredentials(creds, 'renewsliver', hrn,
options=options
)
# Validate that the time does not go beyond the credential's expiration time
requested_time = utcparse(expiration_time)
# Validate that the time does not go beyond the credential's expiration time
requested_time = utcparse(expiration_time)
diff --git
a/sfa/methods/SliverStatus.py
b/sfa/methods/SliverStatus.py
index
bf9b4d4
..
4eb892e
100644
(file)
--- a/
sfa/methods/SliverStatus.py
+++ b/
sfa/methods/SliverStatus.py
@@
-25,7
+25,7
@@
class SliverStatus(Method):
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
self.api.logger.info("interface: %s\ttarget-hrn: %s\tmethod-name: %s"%(self.api.interface, hrn, self.name))
- status = self.api.manager.SliverStatus(self.api, hrn, valid_creds, options)
+ status = self.api.manager.SliverStatus(self.api, hrn, valid_creds, options
=options
)
return status
return status