From: Tony Mack Date: Thu, 12 Jul 2007 18:07:42 +0000 (+0000) Subject: - do not allow whitelist management of peer nodes X-Git-Tag: PLCAPI-4.2-0~106 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b61d8ffdffacf13982fc1522c61e06e5f69d4679;p=plcapi.git - do not allow whitelist management of peer nodes --- diff --git a/PLC/Methods/DeleteSliceFromNodesWhitelist.py b/PLC/Methods/DeleteSliceFromNodesWhitelist.py index 6ccea4c1..8899d884 100644 --- a/PLC/Methods/DeleteSliceFromNodesWhitelist.py +++ b/PLC/Methods/DeleteSliceFromNodesWhitelist.py @@ -41,7 +41,9 @@ class DeleteSliceFromNodesWhitelist(Method): # Get specified nodes, add them to the slice nodes = Nodes(self.api, node_id_or_hostname_list) for node in nodes: - if slice['slice_id'] in node['slice_ids_whitelist']: + if node['peer_id'] is not None: + raise PLCInvalidArgument, "%s not a local node" % node['hostname'] + if slice['slice_id'] in node['slice_ids_whitelist']: slice.delete_from_node_whitelist(node, commit = False) slice.sync()