From 0dfdd32f07fce3d5677c22e0df91ddfdc27a227a Mon Sep 17 00:00:00 2001 From: Tibor Frank Date: Fri, 15 Apr 2016 14:46:21 +0200 Subject: 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 --- bootstrap.sh | 11 +++++++++++ resources/topology_schemas/topology.sch.yaml | 6 ++++-- 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 -- cgit 1.2.3-korg