def GetSlivers(data):
"""For each sliver with the vsys attribute, set the script ACL, create the vsys directory in the slice, and restart vsys."""
# Touch ACLs and create dict of available
def GetSlivers(data):
"""For each sliver with the vsys attribute, set the script ACL, create the vsys directory in the slice, and restart vsys."""
# Touch ACLs and create dict of available
# Parse attributes and update dict of scripts
for sliver in data['slivers']:
for attribute in sliver['attributes']:
# Parse attributes and update dict of scripts
for sliver in data['slivers']:
for attribute in sliver['attributes']:
- # As the name implies, when we find an attribute, we
- createVsysDir(sliver['name'])
- # add it to our list of slivers that need vsys
+ _restart = createVsysDir(sliver['name']) or _restart
logger.log("vsys: restarting vsys service")
os.system("/etc/init.d/vsys restart")
def createVsysDir(sliver):
'''Create /vsys directory in slice. Update vsys conf file.'''
logger.log("vsys: restarting vsys service")
os.system("/etc/init.d/vsys restart")
def createVsysDir(sliver):
'''Create /vsys directory in slice. Update vsys conf file.'''
scriptacls[scriptname] = []
for slice in f.readlines():
scriptacls[scriptname].append(slice.rstrip())
scriptacls[scriptname] = []
for slice in f.readlines():
scriptacls[scriptname].append(slice.rstrip())