Check service function types are present 44/67544/7
authorJaime Caamaño Ruiz <jcaamano@suse.com>
Wed, 24 Jan 2018 17:52:11 +0000 (18:52 +0100)
committerJaime Caamaño Ruiz <jcaamano@suse.com>
Mon, 29 Jan 2018 16:49:37 +0000 (17:49 +0100)
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.

Change-Id: Iaa5d0bc966d0bb190e64ef8084b2243078d10fc6
Signed-off-by: Jaime Caamaño Ruiz <jcaamano@suse.com>
csit/suites/sfc/Full_Deploy/010__sfc_full_deploy.robot
csit/suites/sfc/Full_Deploy/015__sfc_rendered_service_paths_logical.robot
csit/suites/sfc/Full_Deploy/016__sfc_symmetric_RSP.robot

index a0507c5d8f8d2860acf47cd197b8cb0f3e40e566..6e6c12871c04c0bba879b4bf81492619bf09c612 100644 (file)
@@ -24,6 +24,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
     Add Elements To URI From File    ${SERVICE_CHAINS_URI}    ${SERVICE_CHAINS_FILE}
     Add Elements To URI From File    ${SERVICE_METADATA_URI}    ${SERVICE_METADATA_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTION_PATHS_URI}    ${SERVICE_FUNCTION_PATHS_FILE}
@@ -65,6 +66,11 @@ Check Classifier Flows
     Should Contain Match    ${flowList}    *actions=pop_nsh*
     Should Contain Match    ${flowList}    *actions=push_nsh*
 
+Check Service Function Types
+    [Documentation]    Check that the service function types are updated with the service function names
+    ${elements}=    Create List    "name":"firewall-1"    "name":"dpi-1"
+    Check For Elements At URI    ${SERVICE_FUNCTION_TYPES_URI}    ${elements}
+
 Switch Ips In Json Files
     [Arguments]    ${json_dir}    ${container_names}
     ${normalized_dir}=    OperatingSystem.Normalize Path    ${json_dir}/*.json
index ac99826291508103e9e47e61053acbb577f0d6b9..577b3b909da4058def11a91cc3ce3bf9f4adbc92 100644 (file)
@@ -31,6 +31,7 @@ Basic Environment Setup Tests
     [Documentation]    Prepare Basic Test Environment. Logical SFF
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
+    Wait Until Keyword Succeeds    60s    2s    Check Service Function Types
     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}
 
@@ -126,6 +127,12 @@ Delete All Elements
 Create All Elements
     [Documentation]    Delete all provisioned elements
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
+    Wait Until Keyword Succeeds    60s    2s    Check Service Function Types
     Add Elements To URI From File    ${SERVICE_FORWARDERS_URI}    ${SERVICE_FORWARDERS_FILE}
     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}
+
+Check Service Function Types
+    [Documentation]    Check that the service function types are updated with the service functions names
+    ${elements}=    Create List    "name":"firewall-1"    "name":"dpi-1"
+    Check For Elements At URI    ${SERVICE_FUNCTION_TYPES_URI}    ${elements}
index 6a86b97bc272ed8a60297f7dd7f5395e6a2a4c2e..e6ec2e042a2cc6d1692948c448af84996fb0919a 100644 (file)
@@ -70,9 +70,15 @@ Basic Environment Setup
     Add Elements To URI From File    ${SERVICE_NODES_URI}    ${SERVICE_NODES_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTION_TYPES_URI}    ${SERVICE_FUNCTION_TYPES_FILE}
     Add Elements To URI From File    ${SERVICE_FUNCTIONS_URI}    ${SERVICE_FUNCTIONS_FILE}
+    Wait Until Keyword Succeeds    60s    2s    Check Service Function Types
     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}
 
+Check Service Function Types
+    [Documentation]    Check that the service function types are updated with the service function names
+    ${elements}=    Create List    "name":"firewall-1"    "name":"dpi-1"    "name":"dpi-2"
+    Check For Elements At URI    ${SERVICE_FUNCTION_TYPES_URI}    ${elements}
+
 End Suite
     Clean Datastore
     Delete All Sessions