From: Marc Fiuczynski Date: Sat, 30 Jan 2010 04:42:17 +0000 (+0000) Subject: more graceful log message when GetSlivers() API called failed X-Git-Tag: NodeManager-2.0-2~8 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=095f66928fef2e2c402a5863b4c3eb2c8ad363e0;p=nodemanager.git more graceful log message when GetSlivers() API called failed --- diff --git a/plugins/vsys.py b/plugins/vsys.py index 05b87cd..f1abfd9 100644 --- a/plugins/vsys.py +++ b/plugins/vsys.py @@ -15,6 +15,11 @@ def start(options, conf): def GetSlivers(data, config=None, plc=None): """For each sliver with the vsys attribute, set the script ACL, create the vsys directory in the slice, and restart vsys.""" + + if 'slivers' not in data: + logger.log("vsys: getslivers data lack's sliver information. IGNORING!") + return + # Touch ACLs and create dict of available scripts = {} for script in touchAcls(): scripts[script] = [] diff --git a/plugins/vsys_privs.py b/plugins/vsys_privs.py index 5cd40a2..e6d8754 100755 --- a/plugins/vsys_privs.py +++ b/plugins/vsys_privs.py @@ -20,6 +20,12 @@ def start(options, conf): logger.log("Created vsys attributes dir") def GetSlivers(data, config=None, plc=None): + + if 'slivers' not in data: + logger.log("vsys_privs: getslivers data lack's sliver information. IGNORING!") + return + + privs = {} # Parse attributes and update dict of scripts