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
This commit is contained in:
Ryan Tidwell 2018-11-28 08:29:16 -06:00
parent e1da9733cb
commit ed54c932a6
No known key found for this signature in database
GPG Key ID: A1C63854C1CDF372
1 changed files with 1 additions and 1 deletions

View File

@ -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
}