From f3e7a7ebdc0d73576d4d8d6c6dacbbfcdb73847c Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 26 Jul 2007 16:17:27 +0000 Subject: [PATCH] - fix typo when raising whitelist exception --- PLC/Methods/AddSliceToNodes.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PLC/Methods/AddSliceToNodes.py b/PLC/Methods/AddSliceToNodes.py index e5a60f90..3cfd327f 100644 --- a/PLC/Methods/AddSliceToNodes.py +++ b/PLC/Methods/AddSliceToNodes.py @@ -49,6 +49,11 @@ class AddSliceToNodes(Method): # Get specified nodes, add them to the slice nodes = Nodes(self.api, node_id_or_hostname_list) for node in nodes: + # check the slice whitelist on each node first + if node['slice_ids_whitelist'] and \ + slice['slice_id'] not in node['slice_ids_whitelist']: + raise PLCInvalidArgument, "%s is not on %s's whitelist" % \ + (slice['name'], node['hostname']) if slice['slice_id'] not in node['slice_ids']: slice.add_node(node, commit = False) -- 2.47.0