Add rule for updating network's router:external attribute
Set admin_only rule for update_network:router:external in policy.json Also, change the default value of router:external from attr.ATTR_NOT_SPECIFIED to False, because each time we try to get or update a network the dict with its attributes is extended by _extend_network_dict_l3 function which adds router:external=False to the dict if this attribute is not specified. Thus, if the default value is not specified, router:external is considered to be updated in any case and the policy rule is applied. Change-Id: I899d98c7d8c9d9863ac5d8f992b6a2d507ec4482 Closes-Bug: 1338880
This commit is contained in:
@@ -29,7 +29,7 @@ EXTERNAL = 'router:external'
|
||||
EXTENDED_ATTRIBUTES_2_0 = {
|
||||
'networks': {EXTERNAL: {'allow_post': True,
|
||||
'allow_put': True,
|
||||
'default': attr.ATTR_NOT_SPECIFIED,
|
||||
'default': False,
|
||||
'is_visible': True,
|
||||
'convert_to': attr.convert_to_boolean,
|
||||
'enforce_policy': True,
|
||||
|
||||
Reference in New Issue
Block a user