3fc41e29c1
This patch tries to document and test the following invariant that should apply for all groups in the environment: A group should have either child groups, or hosts, not both. Tests are introduced to confirm and enforce this behavior, based on the reported failing configuration. A new function, _check_group_branches, is added which will detect a failing scenario before code that uses it is executed. If a conflict is found, a GroupConflict exception will be raised indicating why. The _check_group_branches function was placed before the physical skel loading because the problem occurs during that phase; placing this in the _check_config_settings function would be checking after the error's already been raised. A note was also added to _parse_belongs_to to communicate it's implicit dependence on state as checked by _check_group_branches. Parent-Id: I1e746bfbda430076459d757039bc21f9df6a4a8a Change-Id: I7830915fbdf9ed814846b69b1293729fb59ece79 Closes-Bug: #1646136 |
||
---|---|---|
.. | ||
__init__.py | ||
dictutils.py | ||
filesystem.py | ||
generate.py | ||
ip.py | ||
manage.py | ||
tools.py |