openstack-ansible/lib
Nolan Brubaker 3fc41e29c1 Document and test group membership constraints
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
2016-12-05 13:29:49 -05:00
..
__init__.py Move management code to inventory lib. 2016-10-11 19:16:24 +00:00
dictutils.py Add dictutils tests, clarify some var names 2016-11-22 10:42:36 -05:00
filesystem.py Inventory refactor SystemExit uses removed 2016-11-23 00:33:14 -08:00
generate.py Document and test group membership constraints 2016-12-05 13:29:49 -05:00
ip.py Add IPManager class for handling IP addresses 2016-11-18 17:07:03 -05:00
manage.py Inventory refactor SystemExit uses removed 2016-11-23 00:33:14 -08:00
tools.py Add command to create consolidated AIO config 2016-11-23 11:01:31 -05:00