From: Marc Fiuczynski Date: Tue, 13 Oct 2009 22:48:37 +0000 (+0000) Subject: Needed to change the semantics of SetSlice(), which previously would X-Git-Tag: MyPLC-4.3-28~3 X-Git-Url: http://git.onelab.eu/?p=myplc.git;a=commitdiff_plain;h=4458fbd2af168a6b1484538ec20e16c18c33b1ca Needed to change the semantics of SetSlice(), which previously would delete *all* tags associated with a slice. This would wipe out sliver tags that are set at runtime by both NM and other scripts. SetSlice() now ignores sliver tags. The assumption is that the global defaults that are being set by db-config are just that: global defaults. If someone want to override those defaults or introduce new tags then one should do so using sliver tags. This is motivated by the hmac tag that is set at run time by NM. But there are other tags for which we want similar semantics. --- diff --git a/db-config b/db-config index 21cd3fd..8333881 100755 --- a/db-config +++ b/db-config @@ -98,6 +98,8 @@ def SetSlice(slice, tags): if slice['slice_tag_ids']: # Delete unknown attributes for slice_tag in GetSliceTags(slice['slice_tag_ids']): + # ignore sliver tags, as those are custom/run-time values + if slice_tag['node_id'] <> None: continue if (slice_tag['tagname'], slice_tag['value']) not in tags: DeleteSliceTag(slice_tag['slice_tag_id']) else: