From f6e2997a8396699281cb7c4e64160e648d29ace8 Mon Sep 17 00:00:00 2001 From: Andy Bavier Date: Wed, 27 Jun 2012 11:16:08 -0400 Subject: [PATCH] Fixed bug with slice tag handling for nodegroups --- PLC/Methods/GetSlivers.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/PLC/Methods/GetSlivers.py b/PLC/Methods/GetSlivers.py index 45fcacb2..1f65e1eb 100644 --- a/PLC/Methods/GetSlivers.py +++ b/PLC/Methods/GetSlivers.py @@ -91,11 +91,12 @@ def get_slivers(api, caller, auth, slice_filter, node = None): # Do not set any nodegroup slice attributes for # which there is at least one sliver attribute # already set. - if slice_tag not in slice_tags: + if slice_tag['tagname'] not in sliver_attributes: + sliver_attributes.append(slice_tag['tagname']) attributes.append({'tagname': slice_tag['tagname'], - 'value': slice_tag['value']}) + 'value': slice_tag['value']}) - for slice_tag in [ a for a in slice_tags if a['node_id'] is None ]: + for slice_tag in [ a for a in slice_tags if a['node_id'] is None and a['nodegroup_id'] is None ]: # Do not set any global slice attributes for # which there is at least one sliver attribute # already set. -- 2.47.0