Change NodeDataLookup type from string to json

The NodeDataLookup parameter should be valid JSON and we should
help the user by adding type checking for this early in the
deployment so that the user doesn't experience the related bug.

Change-Id: Id9d2208f1cbaba9234d7657420cd7efcad3507a0
Related-Bug: #1784967
Related-Bug: #1814070
This commit is contained in:
John Fulton 2018-08-03 14:43:10 -04:00 committed by Giulio Fidente
parent a10588f3a4
commit fe2fda491b
3 changed files with 14 additions and 7 deletions

View File

@ -39,9 +39,9 @@ parameters:
- allowed_values: ['', 'UPGRADE', 'FASTFORWARDUPGRADE']
default: ''
NodeDataLookup:
type: string
default: '{}'
description: json string containing per-node configuration map
type: json
default: {}
description: json containing per-node configuration map
DeploymentServerBlacklist:
default: []
type: comma_delimited_list

View File

@ -12,13 +12,13 @@ parameters:
# to the json required for the node-specific hieradata
# Note this needs to be a json blob e.g:
# parameter_defaults:
# NodeDataLookup: |
# NodeDataLookup:
# {"AB4114B1-9C9D-409A-BEFB-D88C151BF2C3": {"foo": "bar"},
# "8CF1A7EA-7B4B-4433-AC83-17675514B1B8": {"foo2": "bar2"}}
NodeDataLookup:
type: string
default: '{}'
description: json string containing per-node configuration map
type: json
default: {}
description: json containing per-node configuration map
resources:
NodeSpecificConfig:

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
The NodeDataLookup parameter type was changed from string to json
fixes:
- |
- Bug 1784967 invalid JSON in NodeDataLookup error message should be more helpful