From: Mark Huang Date: Thu, 9 Nov 2006 03:07:20 +0000 (+0000) Subject: oops, allow nodes to be specified by node_id for now X-Git-Tag: pycurl-7_13_1~340 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=582a9d6c7de8de214d9824c2e232737fc4d7b74a;p=plcapi.git oops, allow nodes to be specified by node_id for now --- diff --git a/PLC/Methods/GetSlivers.py b/PLC/Methods/GetSlivers.py index e1071763..04982d4c 100644 --- a/PLC/Methods/GetSlivers.py +++ b/PLC/Methods/GetSlivers.py @@ -31,7 +31,8 @@ class GetSlivers(Method): accepts = [ Auth(), - [Node.fields['hostname']] + [Mixed(Node.fields['node_id'], + Node.fields['hostname'])] ] returns = [{ @@ -58,13 +59,13 @@ class GetSlivers(Method): }] }] - def call(self, auth, node_hostnames = None): + def call(self, auth, node_id_or_hostname_list = None): timestamp = int(time.time()) - if node_hostnames is None and isinstance(self.caller, Node): + if node_id_or_hostname_list is None and isinstance(self.caller, Node): all_nodes = {self.caller['node_id']: self.caller} else: - all_nodes = Nodes(self.api, node_hostnames) + all_nodes = Nodes(self.api, node_id_or_hostname_list) # XXX Add foreign nodes nodenetwork_ids = set()