Don't allow patching port internal_info
Patching the port internal_info was allowed in error in the just landed JSON conversion change[1]. This is now fixed, and the comment has been updated to explain why internal_info needs to be part of patch schema. [1] https://review.opendev.org/750120 Change-Id: Ieab085cfd9731e180f741b17a27ea540dabbf62e
This commit is contained in:
parent
c2aecd5f66
commit
0bab4f1762
|
@ -60,13 +60,13 @@ PORT_SCHEMA = {
|
|||
|
||||
|
||||
PORT_PATCH_SCHEMA = copy.deepcopy(PORT_SCHEMA)
|
||||
# patch supports patching some internal_info values
|
||||
# patching /extra/vif_port_id has the side-effect of modifying
|
||||
# internal_info values, so include it in the patch schema
|
||||
PORT_PATCH_SCHEMA['properties']['internal_info'] = {'type': ['null', 'object']}
|
||||
|
||||
PATCH_ALLOWED_FIELDS = [
|
||||
'address',
|
||||
'extra',
|
||||
'internal_info',
|
||||
'is_smartnic',
|
||||
'local_link_connection',
|
||||
'node_uuid',
|
||||
|
|
|
@ -52,7 +52,8 @@ PORTGROUP_SCHEMA = {
|
|||
}
|
||||
|
||||
PORTGROUP_PATCH_SCHEMA = copy.deepcopy(PORTGROUP_SCHEMA)
|
||||
# patch supports patching some internal_info values
|
||||
# patching /extra/vif_port_id has the side-effect of modifying
|
||||
# internal_info values, so include it in the patch schema
|
||||
PORTGROUP_PATCH_SCHEMA['properties']['internal_info'] = {
|
||||
'type': ['null', 'object']}
|
||||
|
||||
|
|
Loading…
Reference in New Issue