From 582a9d6c7de8de214d9824c2e232737fc4d7b74a Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Thu, 9 Nov 2006 03:07:20 +0000 Subject: [PATCH] oops, allow nodes to be specified by node_id for now --- PLC/Methods/GetSlivers.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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() -- 2.47.0