Merge "Fix field validation typo s/macs/mac"

This commit is contained in:
Zuul 2021-07-07 23:02:11 +00:00 committed by Gerrit Code Review
commit cc83ee14b1
2 changed files with 5 additions and 5 deletions

View File

@ -1,7 +1,7 @@
---
other:
- |
The compatibility wrapper for the deprecated field: ``macs`` in nodes JSON
*(instackenv.json)* has been removed. The ``macs`` field is no longer
The compatibility wrapper for the deprecated field: ``mac`` in nodes JSON
*(instackenv.json)* has been removed. The ``mac`` field is no longer
supported as it was replaced by ``ports`` in the Stein release.

View File

@ -617,9 +617,9 @@ def validate_nodes(nodes_list):
except exception.InvalidNode as exc:
failures.append((index, exc))
if node.get('macs'):
failures.append('The "macs" field is not longer supported. '
'Please use the "ports" field instead.')
if node.get('mac'):
failures.append((index, 'The "mac" field is not longer supported. '
'Please use the "ports" field instead.'))
for port in node.get('ports', ()):
if not netutils.is_valid_mac(port['address']):