Prevent labeling of vlans with the same color
PATCH 1/1 Prevent labeling of vlans with the same color
This patch prevents the labeling of vlans with the same color.
Signed-off-by Stefan Berger <[email protected]>
xen-unstable.hg/tools/python/xen/util/xsm/acm/acm.py +3 -0
@@ -1236,6 +1236,9 @@ def set_resource_label(resource, policyt return -xsconstants.XSERR_BAD_LABEL if tmp[2] != oreslabel: return -xsconstants.XSERR_BAD_LABEL + if resource.startswith('vlan:'): + if tuple([policytype, policyref, reslabel]) in access_control.values(): + return -xsconstants.XSERR_BAD_LABEL if reslabel != "": new_entry = { resource : tuple([policytype, policyref, reslabel])} access_control.update(new_entry)
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel