Fix field validation typo s/macs/mac
When removing support for the "mac" field in nodes json a check was added to raise an error when using the removed field. There was a typo in the field name. This fixes the typo, and the validation. Also fix the same typo in the release note. Change-Id: I518c854af6d8e2853fe661902b101a4cdecff2a7 Related-Bug: 1934133
This commit is contained in:
parent
e459428d9f
commit
fcdbcf1fc8
@ -1,7 +1,7 @@
|
|||||||
---
|
---
|
||||||
other:
|
other:
|
||||||
- |
|
- |
|
||||||
The compatibility wrapper for the deprecated field: ``macs`` in nodes JSON
|
The compatibility wrapper for the deprecated field: ``mac`` in nodes JSON
|
||||||
*(instackenv.json)* has been removed. The ``macs`` field is no longer
|
*(instackenv.json)* has been removed. The ``mac`` field is no longer
|
||||||
supported as it was replaced by ``ports`` in the Stein release.
|
supported as it was replaced by ``ports`` in the Stein release.
|
||||||
|
|
||||||
|
@ -617,9 +617,9 @@ def validate_nodes(nodes_list):
|
|||||||
except exception.InvalidNode as exc:
|
except exception.InvalidNode as exc:
|
||||||
failures.append((index, exc))
|
failures.append((index, exc))
|
||||||
|
|
||||||
if node.get('macs'):
|
if node.get('mac'):
|
||||||
failures.append('The "macs" field is not longer supported. '
|
failures.append((index, 'The "mac" field is not longer supported. '
|
||||||
'Please use the "ports" field instead.')
|
'Please use the "ports" field instead.'))
|
||||||
|
|
||||||
for port in node.get('ports', ()):
|
for port in node.get('ports', ()):
|
||||||
if not netutils.is_valid_mac(port['address']):
|
if not netutils.is_valid_mac(port['address']):
|
||||||
|
Loading…
Reference in New Issue
Block a user