From: Tony Mack Date: Thu, 12 Jul 2007 18:09:10 +0000 (+0000) Subject: - Do not allow whitelist management of peer nodes X-Git-Tag: PLCAPI-4.2-0~105 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=3574c730f237f628977b00809d922dd25857fac1;p=plcapi.git - Do not allow whitelist management of peer nodes --- diff --git a/PLC/Methods/AddSliceToNodesWhitelist.py b/PLC/Methods/AddSliceToNodesWhitelist.py index 663da199..a6b4bd12 100644 --- a/PLC/Methods/AddSliceToNodesWhitelist.py +++ b/PLC/Methods/AddSliceToNodesWhitelist.py @@ -41,6 +41,8 @@ class AddSliceToNodesWhitelist(Method): # Get specified nodes, add them to the slice nodes = Nodes(self.api, node_id_or_hostname_list) for node in nodes: + if node['peer_id'] is not None: + raise PLCInvalidArgument, "%s not a local node" % node['hostname'] if slice['slice_id'] not in node['slice_ids_whitelist']: slice.add_to_node_whitelist(node, commit = False)