xend, acm: Prevent labeling of vlans with the same color

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
Keir Fraser committed 2008-04-03 11:32:20 +01:00
1 parent a0c04c2c3d
commit 0103c5e512
1 file changed
+3
+3
View File
@@ -1220,6 +1220,9 @@ def set_resource_label(resource, policytype, policyref, reslabel, \
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)
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.