tobiko/tobiko/openstack/topology
Michele Baldessari 608ceab04b Introduce a get_groups function openstack topology and let list_openstack_nodes accept group lists
Currently some tests wrongfully call list_openstack_nodes(group='controller')
in order to run tests on the whole control plane. That assumption does not
hold true in case of composable HA where the control plane consists of
3 controller nodes (w/ haproxy+vip), 3 database nodes and 3 messaging nodes.
In such cases we'd have to filter three times for the group of the node
(aka resource class).

Let's allow list_openstack_nodes to have a list of group, so all its users
are allowed to pass a list of groups instead.

Instead of overloading the get_group() function directly, we add a simple
get_groups() function and use that inside list_openstack_nodes() when group is
a list.

Tested this on a composable HA and we correctly get all the nodes when
calling the following:
  groups = ['controller', 'messaging', 'database']
  nodes = topology.list_openstack_nodes(group=groups)

Co-Authored-By: Luca Miccini <lmiccini@redhat.com>
Change-Id: I6995a73c482ba7b654d089316f47668d86c495e1
2020-04-09 18:23:21 +02:00
..
__init__.py Add support for networker nodes to assert_ovn_containers_running 2020-03-15 00:19:41 +02:00
_exception.py Add controller topology nodes group 2019-10-10 07:18:49 +02:00
_topology.py Introduce a get_groups function openstack topology and let list_openstack_nodes accept group lists 2020-04-09 18:23:21 +02:00
config.py Use default configured SSH key for cloud nodes 2020-02-20 14:44:03 +01:00