Check classifier interfaces in sfc full deploy 77/67777/10
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Wed, 31 Jan 2018 10:23:59 +0000 (11:23 +0100)
committerDaniel Farrell <dfarrell@redhat.com>
Mon, 5 Feb 2018 14:38:48 +0000 (14:38 +0000)
In sfc full deploy, check that the interface are registered in OVSDB
topology before proceeding with the configuration of the classifiers.
The classifier logic in SFC does not intend to be production ready and
does not check for this.

Change-Id: I72a744b1b86711f19fec55240089cb796fac8416
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot
csit/variables/sfc/Variables.robot

index e9ef7790dbee253b142cade2bade5f52eb62b773..89ca14d07cc8cd42ea92aae2493397ab926a36de 100644 (file)
@@ -18,6 +18,7 @@ Resource          ../../../libraries/SFC/DockerSfc.robot
 ${CREATE_RSP1_INPUT}    {"input":{"parent-service-function-path":"SFP1","name":"RSP1"}}
 ${CREATE_RSP_FAILURE_INPUT}    {"input":{"parent-service-function-path":"SFC1-empty","name":"RSP1-empty-Path-1"}}
 @{SF_NAMES}       "name":"firewall-1"    "name":"dpi-1"
+@{INTERFACE_NAMES}    v-ovsnsn6g1    v-ovsnsn1g1
 
 *** Test Cases ***
 Basic Environment Setup Tests
@@ -52,6 +53,7 @@ Create and Get Classifiers
 *** Keywords ***
 Init Suite
     [Documentation]    Connect Create session and initialize ODL version specific variables
+    Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     SSHLibrary.Open Connection    ${TOOLS_SYSTEM_IP}    timeout=3s
     SSHKeywords.Flexible Mininet Login
     ${docker_cidr}=    DockerSfc.Get Docker Bridge Subnet
@@ -66,9 +68,9 @@ Init Suite
     log    ${result}
     Should be equal as integers    ${result[2]}    0
     DockerSfc.Docker Ovs Start    nodes=6    guests=1    tunnel=vxlan-gpe    odl_ip=${ODL_SYSTEM_IP}
+    Wait Until Keyword Succeeds    60s    2s    Check For Elements At URI    ${OVSDB_TOPOLOGY_URI}    ${INTERFACE_NAMES}
     ${docker_name_list}=    DockerSfc.Get Docker Names As List
     Set Suite Variable    ${DOCKER_NAMES_LIST}    ${docker_name_list}
-    Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     log    ${ODL_STREAM}
     Set Suite Variable    ${CONFIG_DIR}    ${CURDIR}/../../../variables/sfc/master/full-deploy
     Set Suite Variable    ${SERVICE_FUNCTIONS_FILE}    ${CONFIG_DIR}/service-functions.json
index 0b97bb5eda8463059c872c0fc1819aa8e9bccd15..ff0a4c7957c89249135e7005ab45099f3bfa6829 100644 (file)
@@ -1,21 +1,25 @@
 *** Variables ***
 # Generic Service Chains and Function URIs
-${SERVICE_FUNCTION_TYPES_URI}    /restconf/config/service-function-type:service-function-types/
-${SERVICE_FUNCTIONS_URI}    /restconf/config/service-function:service-functions/
-${SERVICE_FUNCTION_URI}    /restconf/config/service-function:service-functions/service-function/
-${SERVICE_FUNCTION_ACLS_URI}    /restconf/config/ietf-access-control-list:access-lists/
-${SERVICE_CLASSIFIERS_URI}    /restconf/config/service-function-classifier:service-function-classifiers/
-${SERVICE_FORWARDERS_URI}    /restconf/config/service-function-forwarder:service-function-forwarders/
-${SERVICE_FORWARDER_URI}    /restconf/config/service-function-forwarder:service-function-forwarders/service-function-forwarder/
-${SERVICE_NODES_URI}    /restconf/config/service-node:service-nodes/
-${SERVICE_CHAINS_URI}    /restconf/config/service-function-chain:service-function-chains/
-${SERVICE_FUNCTION_PATHS_URI}    /restconf/config/service-function-path:service-function-paths/
-${SERVICE_SCHED_TYPES_URI}    /restconf/config/service-function-scheduler-type:service-function-scheduler-types/
-${SERVICE_SCHED_TYPE_URI_BASE}    SERVICE_SCHED_TYPES_URI+'service-function-scheduler-type/service-function-scheduler-type:'
-${SERVICE_RANDOM_SCHED_TYPE_URI}    SERVICE_SCHED_TYPE_URI_BASE+'random'
-${SERVICE_ROUNDROBIN_SCHED_TYPE_URI}    SERVICE_SCHED_TYPE_URI_BASE+'round-robin'
-${SERVICE_METADATA_URI}    /restconf/config/service-function-path-metadata:service-function-metadata/
-${OPERATIONAL_RSPS_URI}    /restconf/operational/rendered-service-path:rendered-service-paths/
-${OPERATIONS_CREATE_RSP_URI}    /restconf/operations/rendered-service-path:create-rendered-path/
-${OPERATIONS_DELETE_RSP_URI}    /restconf/operations/rendered-service-path:delete-rendered-path/
-${RENDERED_SERVICE_PATHS_URI}    /restconf/config/rendered-service-path:rendered-service-paths/
+${REST_CONFIG}    /restconf/config
+${REST_OPER}      /restconf/operational
+${REST_RPC}       /restconf/operations
+${SERVICE_FUNCTION_TYPES_URI}    ${REST_CONFIG}/service-function-type:service-function-types/
+${SERVICE_FUNCTIONS_URI}    ${REST_CONFIG}/service-function:service-functions/
+${SERVICE_FUNCTION_URI}    ${REST_CONFIG}/service-function:service-functions/service-function/
+${SERVICE_FUNCTION_ACLS_URI}    ${REST_CONFIG}/ietf-access-control-list:access-lists/
+${SERVICE_CLASSIFIERS_URI}    ${REST_CONFIG}/service-function-classifier:service-function-classifiers/
+${SERVICE_FORWARDERS_URI}    ${REST_CONFIG}/service-function-forwarder:service-function-forwarders/
+${SERVICE_FORWARDER_URI}    ${REST_CONFIG}/service-function-forwarder:service-function-forwarders/service-function-forwarder/
+${SERVICE_NODES_URI}    ${REST_CONFIG}/service-node:service-nodes/
+${SERVICE_CHAINS_URI}    ${REST_CONFIG}/service-function-chain:service-function-chains/
+${SERVICE_FUNCTION_PATHS_URI}    ${REST_CONFIG}/service-function-path:service-function-paths/
+${SERVICE_SCHED_TYPES_URI}    ${REST_CONFIG}/service-function-scheduler-type:service-function-scheduler-types/
+${SERVICE_SCHED_TYPE_URI_BASE}    ${SERVICE_SCHED_TYPES_URI}service-function-scheduler-type/service-function-scheduler-type:
+${SERVICE_RANDOM_SCHED_TYPE_URI}    ${SERVICE_SCHED_TYPE_URI_BASE}random
+${SERVICE_ROUNDROBIN_SCHED_TYPE_URI}    ${SERVICE_SCHED_TYPE_URI_BASE}round-robin
+${SERVICE_METADATA_URI}    ${REST_CONFIG}/service-function-path-metadata:service-function-metadata/
+${OPERATIONAL_RSPS_URI}    ${REST_OPER}/rendered-service-path:rendered-service-paths/
+${OPERATIONS_CREATE_RSP_URI}    ${REST_RPC}/rendered-service-path:create-rendered-path/
+${OPERATIONS_DELETE_RSP_URI}    ${REST_RPC}/rendered-service-path:delete-rendered-path/
+${RENDERED_SERVICE_PATHS_URI}    ${REST_CONFIG}/rendered-service-path:rendered-service-paths/
+${OVSDB_TOPOLOGY_URI}    ${REST_OPER}/network-topology:network-topology/topology/ovsdb:1