Merge "Ignore '_comment' as a invalid field in instackenv.json"
This commit is contained in:
commit
3f2d517551
|
@ -661,7 +661,8 @@ ABCDEF
|
|||
|
||||
|
||||
VALID_NODE_JSON = [
|
||||
{'pm_type': 'pxe_ipmitool',
|
||||
{'_comment': 'This is a comment',
|
||||
'pm_type': 'pxe_ipmitool',
|
||||
'pm_addr': '192.168.0.1',
|
||||
'pm_user': 'root',
|
||||
'pm_password': 'p@$$w0rd'},
|
||||
|
@ -697,6 +698,7 @@ VALID_NODE_JSON = [
|
|||
'pm_addr': '1.2.3.4',
|
||||
'pm_user': 'root',
|
||||
'pm_password': EXAMPLE_SSH_PRIVATE_KEY,
|
||||
'_comment': 'This is another comment',
|
||||
'mac': ['11:11:11:11:11:11']},
|
||||
{'pm_type': 'pxe_ssh',
|
||||
'pm_addr': '1.2.3.4',
|
||||
|
|
|
@ -432,6 +432,9 @@ def validate_nodes(nodes_list):
|
|||
names = set()
|
||||
macs = set()
|
||||
for index, node in enumerate(nodes_list):
|
||||
# Remove any comment
|
||||
node.pop("_comment", None)
|
||||
|
||||
handler = _find_node_handler(node)
|
||||
|
||||
try:
|
||||
|
|
Loading…
Reference in New Issue