summaryrefslogtreecommitdiffstats
path: root/apex/tests/test_apex_inventory.py
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-08 17:43:55 -0400
committerTim Rozet <trozet@redhat.com>2018-08-10 20:40:16 -0400
commitc5959cc14b95e9d10b78ebf3c8e2525c672fc0c7 (patch)
tree1ab5b0be3e893ac3f77f951abe0c8d7bdf07e6d6 /apex/tests/test_apex_inventory.py
parent7bbbc905908be356fd1cf2f869b43d7e4d87c12b (diff)
Allow all in one deployments
This patch adds the ability to deploy all in one single nodes (Control + Compute). To enable this functionality do the following for each deployment type: - Baremetal: do not tag any nodes as compute in the inventory file - Virtual: use argument '--virtual-computes 0' JIRA: APEX-548 Change-Id: I22525c9eb21d331129c819449316c26a6fcf522d Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/tests/test_apex_inventory.py')
-rw-r--r--apex/tests/test_apex_inventory.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/apex/tests/test_apex_inventory.py b/apex/tests/test_apex_inventory.py
index 71979465..38a4271a 100644
--- a/apex/tests/test_apex_inventory.py
+++ b/apex/tests/test_apex_inventory.py
@@ -56,10 +56,15 @@ class TestInventory:
os.path.join(TEST_DUMMY_CONFIG, 'inventory-virt.yaml'),
virtual=True, ha=True)
+ def test_inventory_valid_allinone_count(self):
+ i = Inventory(os.path.join(TEST_DUMMY_CONFIG,
+ 'inventory-virt-1-node.yaml'), ha=False)
+ assert_equal(list(i.get_node_counts()), [1, 0])
+
def test_inventory_invalid_noha_count(self):
assert_raises(ApexInventoryException, Inventory,
os.path.join(TEST_DUMMY_CONFIG,
- 'inventory-virt-1-node.yaml'),
+ 'inventory-virt-1-compute-node.yaml'),
virtual=True, ha=False)
def test_inventory_virtual(self):