Check service function types are present (II) 12/67712/4
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Tue, 30 Jan 2018 09:35:22 +0000 (10:35 +0100)
committerJaime Caamaño Ruiz <jcaamano@suse.com>
Tue, 30 Jan 2018 14:25:51 +0000 (15:25 +0100)
Similar to commit [1], but that one only took care of the SFC full
deploy suite, this one takes care of the SFC basic suite.

Check service function types are present before attempting to create any
RSP making use of them. Otherwise RSP creation will fail if attempted
before the service function types exist. Service funtion types are
created by SFC as soon as the first SF of that type is added.

[1] a77477cfcab80d3060e796cf255b3323b9bb003d

Change-Id: I7bebba9a4b634a54a75b1cd6066de77cc515d3a3
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
csit/suites/sfc/SFC_Basic/070__sfc_rendered_service_paths.robot

index ed9f5eb084b50d41241fa23d0fc56e77d8e8f76d..9fffc91bea375c1815144340c2c4084782e55b1a 100644 (file)
@@ -8,6 +8,7 @@ Library           OperatingSystem
 Library           RequestsLibrary
 Library           HttpLibrary.HTTP
 Resource          ../../../variables/sfc/Variables.robot
+Resource          ../../../libraries/SFC/SfcKeywords.robot
 Resource          ../../../libraries/Utils.robot
 Resource          ../../../libraries/TemplatedRequests.robot
 
@@ -17,6 +18,7 @@ Basic Environment Setup Tests
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     Add Elements To URI From File    ${SERVICE_NODES_URI}    ${SERVICE_NODES_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
+    Wait Until Keyword Succeeds    60s    2s    Check Service Function Types    ${SERVICE_FUNCTION_NAMES}
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_FILE}
 
@@ -231,6 +233,8 @@ Init Suite
     Set Suite Variable    ${VERSION_DIR}    master
     Set Suite Variable    ${SERVICE_FUNCTIONS_URI}    /restconf/config/service-function:service-functions/
     Set Suite Variable    ${SERVICE_FUNCTIONS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-functions.json
+    Set Suite Variable    @{SERVICE_FUNCTION_NAMES}    "napt44-103-2"    "napt44-103-1"    "dpi-102-2"    "firewall-101-2"    "napt44-104"
+    ...    "dpi-102-1"    "firewall-104"    "dpi-102-3"    "firewall-101-1"
     Set Suite Variable    ${SERVICE_FORWARDERS_URI}    /restconf/config/service-function-forwarder:service-function-forwarders/
     Set Suite Variable    ${SERVICE_FORWARDERS_FILE}    ${CURDIR}/../../../variables/sfc/${VERSION_DIR}/service-function-forwarders.json
     Set Suite Variable    ${SERVICE_NODES_URI}    /restconf/config/service-node:service-nodes/