Problem
=======
AFAIK, our design looks like this:
....................compute-node...............
....+-----------------------------------------+
....|.........................................|
....|.+----------------+...+----------------+.|
....|.|......n-cpu.....|...|......n-cpu.....|.|
....|.|.cpc_subset=foo.|...|.cpc_subset=bar.|.|
....|.+------+---------+...+--------+-------+.|
....|........|......................|.........|
....+-----------------------------------------+
.............|......................|..........
.............|......................|..........
.............|......................|..........
.............|..........cpc.........|..........
....+-----------------------------------------+
....|........|......................|.........|
....|....+---v----+.............+---v----+....|
....|....|.subset.|.............|.subset.|....|
....|....|..foo...|.............|..bar...|....|
....|....+--------+.............+--------+....|
....|.........................................|
....+-----------------------------------------+
A system z CPC is divided into multiple subsets. Each subset is managed
by exactly one nova-compute service. Each nova-compute service manages
exactly one subset.
AFAIK, this setup -having multiple nova-compute services on one operating
system- is (AFAIK) not tested upstream. That means we have a testing gap.
Definition of Done
==================
As this setup cannot be properly tested in a unit test setup, we should
have a functional test [1] for this. Examples for that can be seen in the
Nova repo [2]. The "tests" directory [3] should have a sub directory for
that. The functional test case for that:
* uses a faked zhmcclient
* simulates two cpc-subsets
* starts two nova-compute services
* starts (at least) two instances which should be scheduled to different
References
==========
[1] http://docs.openstack.org/developer/nova/test_strategy.html#functional-tests
[2] https://github.com/openstack/nova/tree/master/nova/tests/functional
[3] https://github.com/openstack/nova-dpm/tree/master/nova_dpm/tests
These scenarios can very well be tested in a unit test setup, by using the mock support of the zhmcclient.