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:
1181217
)
only send the request to the aggregate manager module if the rspec has slivers after...
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 2 Nov 2011 16:22:59 +0000
(12:22 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Wed, 2 Nov 2011 16:22:59 +0000
(12:22 -0400)
sfa/methods/CreateSliver.py
patch
|
blob
|
history
diff --git
a/sfa/methods/CreateSliver.py
b/sfa/methods/CreateSliver.py
index
dcb25eb
..
bb0051a
100644
(file)
--- a/
sfa/methods/CreateSliver.py
+++ b/
sfa/methods/CreateSliver.py
@@
-4,6
+4,7
@@
from sfa.util.method import Method
from sfa.util.parameter import Parameter, Mixed
from sfa.util.sfatablesRuntime import run_sfatables
from sfa.trust.credential import Credential
from sfa.util.parameter import Parameter, Mixed
from sfa.util.sfatablesRuntime import run_sfatables
from sfa.trust.credential import Credential
+from sfa.rspecs.rspec import RSpec
class CreateSliver(Method):
"""
class CreateSliver(Method):
"""
@@
-51,5
+52,9
@@
class CreateSliver(Method):
chain_name = 'FORWARD-INCOMING'
self.api.logger.debug("CreateSliver: sfatables on chain %s"%chain_name)
rspec = run_sfatables(chain_name, hrn, origin_hrn, rspec)
chain_name = 'FORWARD-INCOMING'
self.api.logger.debug("CreateSliver: sfatables on chain %s"%chain_name)
rspec = run_sfatables(chain_name, hrn, origin_hrn, rspec)
-
- return manager.CreateSliver(self.api, slice_xrn, creds, rspec, users, call_id)
+ slivers = RSpec(rspec).version.get_nodes_with_slivers()
+ if slivers:
+ result = manager.CreateSliver(self.api, slice_xrn, creds, rspec, users, call_id)
+ else:
+ result = rspec
+ return result