From 19cafbf5fcf1b1275b6184b9e076412f5fc1d035 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bar=C4=B1=C5=9F=20Metin?= Date: Fri, 19 Nov 2010 15:38:20 +0100 Subject: [PATCH 1/1] manage hmac slice tag only if slice has enable_hmac tag set --- plugins/sliverauth.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/sliverauth.py b/plugins/sliverauth.py index b58492f..9e872c5 100644 --- a/plugins/sliverauth.py +++ b/plugins/sliverauth.py @@ -46,12 +46,11 @@ def GetSlivers(data, config, plc): logger.log("sliverauth: plc-instantiated slice %s does not yet exist. IGNORING!" % sliver['name']) continue - manage_hmac (plc, sliver) - for chunk in sliver['attributes']: - if chunk['tagname']=='omf_control': + if chunk['tagname']=='enable_hmac': + manage_hmac (plc, sliver) + elif chunk['tagname']=='omf_control': manage_sshkey (plc, sliver) - break def SetSliverTag(plc, slice, tagname, value): -- 2.43.0