From: Marc Fiuczynski Date: Sat, 30 Jan 2010 04:41:15 +0000 (+0000) Subject: gracefully handle case where the sliver has not yet been instantiated X-Git-Tag: NodeManager-2.0-2~9 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c70fbdb6afe93b67b86ad70804d7cc58155bf61b;p=nodemanager.git gracefully handle case where the sliver has not yet been instantiated --- diff --git a/plugins/sliverauth.py b/plugins/sliverauth.py index bf35830..634d648 100644 --- a/plugins/sliverauth.py +++ b/plugins/sliverauth.py @@ -50,6 +50,14 @@ def GetSlivers(data, config, plc): return for sliver in data['slivers']: + path = '/vservers/%s' % sliver['name'] + if not os.path.exists(path): + # ignore all non-plc-instantiated slivers + instantiation = sliver.get('instantiation','') + if instantiation == 'plc-instantiated': + logger.log("sliverauth: plc-instantiated slice %s does not yet exist. IGNORING!" % sliver['name']) + continue + found_hmac = False for attribute in sliver['attributes']: name = attribute.get('tagname',attribute.get('name',''))