From: Stephen Soltesz Date: Tue, 4 Mar 2008 19:26:17 +0000 (+0000) Subject: Added code to reduce duplicate entries in /etc/vsys.conf; this will help play X-Git-Tag: 1.7-3~24 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=2b18fd6de5475f7b818866169c028dc9b80dbbb2;p=nodemanager.git Added code to reduce duplicate entries in /etc/vsys.conf; this will help play more nicely with vsys. --- diff --git a/vsys.py b/vsys.py index 22dd5ed..da79b92 100644 --- a/vsys.py +++ b/vsys.py @@ -27,10 +27,11 @@ def GetSlivers(data): for sliver in data['slivers']: for attribute in sliver['attributes']: if attribute['name'] == 'vsys': - # add to conf - slices.append(sliver['name']) - # As the name implies, when we find an attribute, we - createVsysDir(sliver['name']) + if sliver['name'] not in slices: + # add to conf + slices.append(sliver['name']) + # As the name implies, when we find an attribute, we + createVsysDir(sliver['name']) # add it to our list of slivers that need vsys if attribute['value'] in scripts.keys(): scripts[attribute['value']].append(sliver['name'])