From ed54c932a664684a89704a751bd8996841f2c76e Mon Sep 17 00:00:00 2001 From: Ryan Tidwell Date: Wed, 28 Nov 2018 08:29:16 -0600 Subject: [PATCH] Fix default value of subnet attribute for subnet onboard In its current state, the subnet onboard extension forces callers to pass a value for the subnet attribute extension. This is not required when performing operations on a subnet pool, but the validator forces a value to be sent on the request. This change simply adjusts the default value of the subnet attribute in the subnet onboard extension so that an empty list is assumed. This allows for backward compatible operation of the subnetpool API, allowing callers to choose not to pass this attribute when it is not needed in a request. Change-Id: I6c0b5aa784a380502b9e5fd062dacd10a95b4cbf Partially-Implements: blueprint subnet-onboard --- neutron_lib/api/definitions/subnet_onboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron_lib/api/definitions/subnet_onboard.py b/neutron_lib/api/definitions/subnet_onboard.py index a57feef35..30efa5743 100644 --- a/neutron_lib/api/definitions/subnet_onboard.py +++ b/neutron_lib/api/definitions/subnet_onboard.py @@ -41,7 +41,7 @@ ONBOARD_SUBNETS_SPECS = { RESOURCE_ATTRIBUTE_MAP = { subnetpool_def.COLLECTION_NAME: { subnet_def.COLLECTION_NAME: { - 'allow_post': True, 'allow_put': True, + 'allow_post': True, 'allow_put': True, 'default': [], 'validate': { 'type:list_of_any_key_specs_or_none': ONBOARD_SUBNETS_SPECS }