From: Baris Metin Date: Mon, 9 May 2011 21:45:09 +0000 (-0400) Subject: can not set sliver tags for system slices X-Git-Tag: nodemanager-2.0-32~4 X-Git-Url: http://git.onelab.eu/?p=nodemanager.git;a=commitdiff_plain;h=40659281bdd5e0bd4fab731efb4336129672448d can not set sliver tags for system slices --- diff --git a/plugins/sliverauth.py b/plugins/sliverauth.py index 69de1d9..300b6b4 100644 --- a/plugins/sliverauth.py +++ b/plugins/sliverauth.py @@ -45,8 +45,14 @@ def GetSlivers(data, config, plc): logger.log("sliverauth: plc-instantiated slice %s does not yet exist. IGNORING!" % sliver['name']) continue + system_slice = False for chunk in sliver['attributes']: - if chunk['tagname']=='enable_hmac': + if chunk['tagname'] == "system": + if chunk['value'] in (True, 1, '1') or chunk['value'].lower() == "true": + system_slice = True + + for chunk in sliver['attributes']: + if chunk['tagname']=='enable_hmac' and not system_slice: manage_hmac (plc, sliver) elif chunk['tagname']=='omf_control': manage_sshkey (plc, sliver)