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
rough cleanup of the slicemanager business
[sfa.git]
/
sfa
/
methods
/
ListResources.py
diff --git
a/sfa/methods/ListResources.py
b/sfa/methods/ListResources.py
index
e2ec988
..
f719a80
100644
(file)
--- a/
sfa/methods/ListResources.py
+++ b/
sfa/methods/ListResources.py
@@
-3,6
+3,8
@@
import zlib
from sfa.util.xrn import urn_to_hrn
from sfa.util.method import Method
from sfa.util.sfatablesRuntime import run_sfatables
from sfa.util.xrn import urn_to_hrn
from sfa.util.method import Method
from sfa.util.sfatablesRuntime import run_sfatables
+from sfa.util.sfalogging import logger
+
from sfa.util.faults import SfaInvalidArgument
from sfa.trust.credential import Credential
from sfa.util.faults import SfaInvalidArgument
from sfa.trust.credential import Credential
@@
-16,7
+18,7
@@
class ListResources(Method):
@param options dictionary
@return string
"""
@param options dictionary
@return string
"""
- interfaces = ['aggregate'
, 'slicemgr'
]
+ interfaces = ['aggregate']
accepts = [
Mixed(Parameter(str, "Credential string"),
Parameter(type([str]), "List of credentials")),
accepts = [
Mixed(Parameter(str, "Credential string"),
Parameter(type([str]), "List of credentials")),
@@
-25,8
+27,8
@@
class ListResources(Method):
returns = Parameter(str, "List of resources")
def call(self, creds, options):
returns = Parameter(str, "List of resources")
def call(self, creds, options):
-
self.api.
logger.info("interface: %s\tmethod-name: %s" %
-
(self.api.interface, self.name))
+ logger.info("interface: %s\tmethod-name: %s" %
+ (self.api.interface, self.name))
# client must specify a version
if not options.get('geni_rspec_version'):
# client must specify a version
if not options.get('geni_rspec_version'):
@@
-50,9
+52,7
@@
class ListResources(Method):
# filter rspec through sfatables
if self.api.interface in ['aggregate']:
chain_name = 'OUTGOING'
# filter rspec through sfatables
if self.api.interface in ['aggregate']:
chain_name = 'OUTGOING'
- elif self.api.interface in ['slicemgr']:
- chain_name = 'FORWARD-OUTGOING'
- self.api.logger.debug(
+ logger.debug(
"ListResources: sfatables on chain %s" % chain_name)
filtered_rspec = run_sfatables(chain_name, '', origin_hrn, rspec)
"ListResources: sfatables on chain %s" % chain_name)
filtered_rspec = run_sfatables(chain_name, '', origin_hrn, rspec)