diff --git a/sahara/tests/scenario/README.rst b/sahara/tests/scenario/README.rst index 6b53a5f9..451a869a 100644 --- a/sahara/tests/scenario/README.rst +++ b/sahara/tests/scenario/README.rst @@ -275,19 +275,19 @@ Section "cluster_template" This section is dictionary-type. -+----------------------+---------+----------+-----------+---------------------------------------+ -| Fields | Type | Required | Default | Value | -+======================+=========+==========+===========+=======================================+ -| name | string | True | | name for cluster template | -+----------------------+---------+----------+-----------+---------------------------------------+ -| description | string | | Empty | description | -+----------------------+---------+----------+-----------+---------------------------------------+ -| cluster_configs | object | | | name_of_config_section: config: value | -+----------------------+---------+----------+-----------+---------------------------------------+ -| node_group_templates | object | True | | name_of_node_group: count | -+----------------------+---------+----------+-----------+---------------------------------------+ -| anti_affinity | boolean | | False | | -+----------------------+---------+----------+-----------+---------------------------------------+ ++----------------------+--------+----------+-----------+---------------------------------------+ +| Fields | Type | Required | Default | Value | ++======================+========+==========+===========+=======================================+ +| name | string | True | | name for cluster template | ++----------------------+--------+----------+-----------+---------------------------------------+ +| description | string | | Empty | description | ++----------------------+--------+----------+-----------+---------------------------------------+ +| cluster_configs | object | | | name_of_config_section: config: value | ++----------------------+--------+----------+-----------+---------------------------------------+ +| node_group_templates | object | True | | name_of_node_group: count | ++----------------------+--------+----------+-----------+---------------------------------------+ +| anti_affinity | array | | Empty | array of roles | ++----------------------+--------+----------+-----------+---------------------------------------+ Section "cluster" diff --git a/sahara/tests/scenario/validation.py b/sahara/tests/scenario/validation.py index 0021a2ed..56364992 100644 --- a/sahara/tests/scenario/validation.py +++ b/sahara/tests/scenario/validation.py @@ -231,7 +231,11 @@ SCHEMA = { } }, "anti_affinity": { - "type": "boolean" + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } } }, "required": ["name", "node_group_templates"], diff --git a/sahara/tests/scenario_unit/vanilla2_7_1.yaml b/sahara/tests/scenario_unit/vanilla2_7_1.yaml index 95d10cac..72a59bc6 100644 --- a/sahara/tests/scenario_unit/vanilla2_7_1.yaml +++ b/sahara/tests/scenario_unit/vanilla2_7_1.yaml @@ -41,6 +41,9 @@ clusters: node_group_templates: master: 1 worker: 3 + anti_affinity: + - namenode + - datanode scenario: - run_jobs - scale