aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTibor Frank <tifrank@cisco.com>2016-04-15 14:46:21 +0200
committerStefan Kobza <skobza@cisco.com>2016-04-21 15:45:35 +0000
commit0dfdd32f07fce3d5677c22e0df91ddfdc27a227a (patch)
tree3cfc0417689f77e229761aba4442c027c2143ed3
parent16422e4a23b30b0ac1bc98b20487f6c1cac984c9 (diff)
Topology schema
- fix Honeycomb part of the topology schema - add topology file checking using pykwalify before tests are started Change-Id: I907d41b66f5660a2ab4de8857312e9277052bae6 Signed-off-by: Tibor Frank <tifrank@cisco.com>
-rwxr-xr-xbootstrap.sh11
-rw-r--r--resources/topology_schemas/topology.sch.yaml6
2 files changed, 15 insertions, 2 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index 17d9e17e99..349e4b607e 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -148,6 +148,17 @@ virtualenv env
echo pip install
pip install -r requirements.txt
+pykwalify -s resources/topology_schemas/3_node_topology.sch.yaml \
+ -s resources/topology_schemas/topology.sch.yaml \
+ -d topologies/enabled/topology.yaml \
+ -vvv
+
+result=$?
+if [ "${result}" -ne "0" ]; then
+ echo "Topology schema validation failed."
+ echo "However, the tests will start."
+fi
+
PYTHONPATH=`pwd` pybot -L TRACE \
-v TOPOLOGY_PATH:topologies/enabled/topology.yaml \
--include vm_envAND3_node_single_link_topo \
diff --git a/resources/topology_schemas/topology.sch.yaml b/resources/topology_schemas/topology.sch.yaml
index 1c20055e0f..1b16616ccb 100644
--- a/resources/topology_schemas/topology.sch.yaml
+++ b/resources/topology_schemas/topology.sch.yaml
@@ -124,10 +124,12 @@ schema;type_dut:
type: map
mapping:
<<: *type_node_mapping
- honeycomb:
- <<: *type_honeycomb_mapping
type:
<<: *type_node_mapping_type
enum: [DUT]
+ honeycomb:
+ type: map
+ mapping:
+ <<: *type_honeycomb_mapping
# vim: sw=2:sts=2