sfc: dont use internal pattern for rsp names
[integration/test.git] / csit / suites / sfc / SFC_Basic / 070__sfc_rendered_service_paths.robot
index a5fdd07ea9691f7bb114a645cca1574d18f18be9..6230d2d0cea81ae37a9cfc4c10ba6b5ffcdc0f5e 100644 (file)
@@ -7,8 +7,10 @@ Library           Collections
 Library           OperatingSystem
 Library           RequestsLibrary
 Library           HttpLibrary.HTTP
-Variables         ../../../variables/Variables.py
+Resource          ../../../variables/sfc/Variables.robot
+Resource          ../../../libraries/SFC/SfcKeywords.robot
 Resource          ../../../libraries/Utils.robot
+Resource          ../../../libraries/TemplatedRequests.robot
 
 *** Test Cases ***
 Basic Environment Setup Tests
@@ -16,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 Added    ${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}
 
@@ -23,8 +26,8 @@ Create and Get Rendered Service Path
     [Documentation]    Create and Get Rendered Service Path Through RESTConf APIs
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${elements}=    Create List    SFC1-100-Path-1    "parent-service-function-path":"SFC1-100"    "hop-number":0    "service-index":255    "hop-number":1
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
+    ${elements}=    Create List    "name":"SFC1-100-RSP-1"    "parent-service-function-path":"SFC1-100"    "hop-number":0    "service-index":255    "hop-number":1
     ...    "service-index":254    "hop-number":2    "service-index":253
     Check For Elements At URI    ${OPERATIONAL_RSPS_URI}    ${elements}
 
@@ -36,9 +39,9 @@ Create Get Rendered Service Path Failure
 Get Rendered Service Path By Name
     [Documentation]    Get Rendered Service Path By Name Through RESTConf APIs
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1
-    Should Be Equal As Strings    ${resp.status_code}    200
-    ${elements}=    Create List    SFC1-100-Path-1    "parent-service-function-path":"SFC1-100"    "hop-number":0    "service-index":255    "hop-number":1
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
+    ${elements}=    Create List    "name":"SFC1-100-RSP-1"    "parent-service-function-path":"SFC1-100"    "hop-number":0    "service-index":255    "hop-number":1
     ...    "service-index":254    "hop-number":2    "service-index":253
     Check For Elements At URI    ${OPERATIONAL_RSPS_URI}    ${elements}
 
@@ -48,45 +51,45 @@ Get Non Existing Rendered Service Path
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/non-existing-rsp
     Should Be Equal As Strings    ${resp.status_code}    404
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Not Contain    ${resp.content}    non-existing-rsp
 
 Delete one Rendered Service Path By Name
     [Documentation]    Delete One Rendered Service Path By Name Through RESTConf APIs
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    SFC1-100-Path-1
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
+    Should Contain    ${resp.content}    "name":"SFC1-100-RSP-1"
     Post Elements To URI As JSON    ${OPERATIONS_DELETE_RSP_URI}    ${DELETE_RSP1_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1
     Should Be Equal As Strings    ${resp.status_code}    404
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Not Contain    ${resp.content}    SFC1-100-Path-1
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
+    Should Not Contain    ${resp.content}    "name":"SFC1-100-RSP-1"
 
 Delete Non Existing Rendered Service Path By Name
     [Documentation]    Delete One Rendered Service Path By Name Through RESTConf APIs
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    SFC1-100-Path-1
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
+    Should Contain    ${resp.content}    "name":"SFC1-100-RSP-1"
     Post Elements To URI As JSON    ${OPERATIONS_DELETE_RSP_URI}    ${DELETE_RSP2_INPUT}
     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     Should Not Contain    ${resp.content}    {"rendered-service-paths":{}}
 
 Get Rendered Service Path Hop
     [Documentation]    Get Rendered Service Path By Name Through RESTConf APIs
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${elements}=    Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/    ${elements}
     ${elements}=    Create List    "hop-number":1    "service-index":254    "service-function-name":"napt44
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/1/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/1/    ${elements}
     ${elements}=    Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/2/    ${elements}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/3/
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/2/    ${elements}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/3/
     Should Be Equal As Strings    ${resp.status_code}    404
     Post Elements To URI As JSON    ${OPERATIONS_DELETE_RSP_URI}    ${DELETE_RSP1_INPUT}
 
@@ -96,18 +99,18 @@ Generate RSPs with Random Schedule Algorithm type
     Add Elements To URI From File    ${SERVICE_RANDOM_SCHED_TYPE_URI}    ${SERVICE_RANDOM_SCHED_TYPE_FILE}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
     ${elements}=    Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/    ${elements}
     ${elements}=    Create List    "hop-number":1    "service-index":254    "service-function-name":"napt44
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/1/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/1/    ${elements}
     ${elements}=    Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/2/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/2/    ${elements}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP2_INPUT}
     ${elements}=    Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/0/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/0/    ${elements}
     ${elements}=    Create List    "hop-number":1    "service-index":254    "service-function-name":"napt44
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/1/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/1/    ${elements}
     ${elements}=    Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/2/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/2/    ${elements}
     Post Elements To URI As JSON    ${OPERATIONS_DELETE_RSP_URI}    ${DELETE_RSP1_INPUT}
     Post Elements To URI As JSON    ${OPERATIONS_DELETE_RSP_URI}    ${DELETE_RSP2_INPUT}
 
@@ -122,24 +125,24 @@ Generate RSPs with Round Robin Schedule Algorithm type
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP4_INPUT}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP5_INPUT}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP6_INPUT}
-    ${path1_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/
-    ${path1_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/1/
-    ${path1_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/2/
-    ${path2_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/0/
-    ${path2_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/1/
-    ${path2_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/2/
-    ${path3_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-3/rendered-service-path-hop/0/
-    ${path3_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-3/rendered-service-path-hop/1/
-    ${path3_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-3/rendered-service-path-hop/2/
-    ${path4_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-4/rendered-service-path-hop/0/
-    ${path4_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-4/rendered-service-path-hop/1/
-    ${path4_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-4/rendered-service-path-hop/2/
-    ${path5_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-5/rendered-service-path-hop/0/
-    ${path5_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-5/rendered-service-path-hop/1/
-    ${path5_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-5/rendered-service-path-hop/2/
-    ${path6_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-6/rendered-service-path-hop/0/
-    ${path6_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-6/rendered-service-path-hop/1/
-    ${path6_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-6/rendered-service-path-hop/2/
+    ${path1_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/
+    ${path1_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/1/
+    ${path1_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/2/
+    ${path2_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/0/
+    ${path2_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/1/
+    ${path2_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/2/
+    ${path3_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-3/rendered-service-path-hop/0/
+    ${path3_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-3/rendered-service-path-hop/1/
+    ${path3_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-3/rendered-service-path-hop/2/
+    ${path4_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-4/rendered-service-path-hop/0/
+    ${path4_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-4/rendered-service-path-hop/1/
+    ${path4_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-4/rendered-service-path-hop/2/
+    ${path5_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-5/rendered-service-path-hop/0/
+    ${path5_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-5/rendered-service-path-hop/1/
+    ${path5_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-5/rendered-service-path-hop/2/
+    ${path6_hop0}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-6/rendered-service-path-hop/0/
+    ${path6_hop1}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-6/rendered-service-path-hop/1/
+    ${path6_hop2}    Get JSON Elements From URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-6/rendered-service-path-hop/2/
     Should Be Equal    ${path1_hop0}    ${path4_hop0}
     Should Not Be Equal    ${path1_hop0}    ${path2_hop0}
     Should Be Equal    ${path1_hop1}    ${path4_hop1}
@@ -171,31 +174,31 @@ Generate RSPs with Shortest Path Schedule Algorithm type
     Add Elements To URI From File    ${SERVICE_SHORTESTPATH_SCHED_TYPE_URI}    ${SERVICE_SHORTESTPATH_SCHED_TYPE_FILE}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP1_INPUT}
     ${elements}=    Create List    "hop-number":0    "service-index":255    "service-function-name":"dpi-1
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/    ${elements}
     ${elements}=    Create List    "hop-number":1    "service-index":254    "service-function-name":"napt44
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/1/    ${elements}
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/1/    ${elements}
     ${elements}=    Create List    "hop-number":2    "service-index":253    "service-function-name":"firewall
-    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/2/    ${elements}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/0/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    Check For Elements At URI    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/2/    ${elements}
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/0/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop1}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/1/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/1/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop2}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-1/rendered-service-path-hop/2/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-1/rendered-service-path-hop/2/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop3}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
     Should Be Equal    ${fwd_hop1}    ${fwd_hop2}
     Should Be Equal    ${fwd_hop2}    ${fwd_hop3}
     Post Elements To URI As JSON    ${OPERATIONS_CREATE_RSP_URI}    ${CREATE_RSP2_INPUT}
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/0/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/0/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop1}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/1/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/1/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop2}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
-    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-Path-2/rendered-service-path-hop/2/
-    Should Be Equal As Strings    ${resp.status_code}    200
+    ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_RSPS_URI}rendered-service-path/SFC1-100-RSP-2/rendered-service-path-hop/2/
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
     ${fwd_hop3}    Extract Value From Content    ${resp.content}    /rendered-service-path-hop/0/service-function-forwarder
     Should Be Equal    ${fwd_hop1}    ${fwd_hop2}
     Should Be Equal    ${fwd_hop2}    ${fwd_hop3}
@@ -205,6 +208,7 @@ Generate RSPs with Shortest Path Schedule Algorithm type
 Clean Datastore After Tests
     [Documentation]    Clean All Items In Datastore After Tests
     Remove All Elements At URI    ${SERVICE_FUNCTIONS_URI}
+    Wait Until Keyword Succeeds    60s    2s    Check Service Function Types Removed    ${SERVICE_FUNCTION_NAMES}
     Remove All Elements At URI    ${SERVICE_FORWARDERS_URI}
     Remove All Elements At URI    ${SERVICE_NODES_URI}
     Remove All Elements At URI    ${SERVICE_CHAINS_URI}
@@ -215,7 +219,7 @@ Clean Datastore After Tests
 Post Elements To URI As JSON
     [Arguments]    ${uri}    ${data}
     ${resp}    RequestsLibrary.Post Request    session    ${uri}    data=${data}    headers=${headers}
-    Should Be Equal As Strings    ${resp.status_code}    200
+    Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
 
 Get JSON Elements From URI
     [Arguments]    ${uri}
@@ -227,10 +231,11 @@ Init Suite
     [Documentation]    Create session and initialize ODL version specific variables
     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
     log    ${ODL_STREAM}
-    Run Keyword If    '${ODL_STREAM}' == 'stable-lithium'    Set Suite Variable    ${VERSION_DIR}    lithium
-    ...    ELSE    Set Suite Variable    ${VERSION_DIR}    master
+    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/
@@ -253,16 +258,16 @@ Init Suite
     Set Suite Variable    ${OPERATIONAL_RSPS_URI}    /restconf/operational/rendered-service-path:rendered-service-paths/
     Set Suite Variable    ${OPERATIONS_CREATE_RSP_URI}    /restconf/operations/rendered-service-path:create-rendered-path/
     Set Suite Variable    ${OPERATIONS_DELETE_RSP_URI}    /restconf/operations/rendered-service-path:delete-rendered-path
-    Set Suite Variable    ${CREATE_RSP1_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-1"}}
-    Set Suite Variable    ${CREATE_RSP2_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-2"}}
-    Set Suite Variable    ${CREATE_RSP3_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-3"}}
-    Set Suite Variable    ${CREATE_RSP4_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-4"}}
-    Set Suite Variable    ${CREATE_RSP5_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-5"}}
-    Set Suite Variable    ${CREATE_RSP6_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-6"}}
+    Set Suite Variable    ${CREATE_RSP1_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-1"}}
+    Set Suite Variable    ${CREATE_RSP2_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-2"}}
+    Set Suite Variable    ${CREATE_RSP3_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-3"}}
+    Set Suite Variable    ${CREATE_RSP4_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-4"}}
+    Set Suite Variable    ${CREATE_RSP5_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-5"}}
+    Set Suite Variable    ${CREATE_RSP6_INPUT}    {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-RSP-6"}}
     Set Suite Variable    ${CREATE_RSP_FAILURE_INPUT}    {"input":{"parent-service-function-path":"SFC1-empty","name":"SFC1-empty-Path-1"}}
-    Set Suite Variable    ${DELETE_RSP1_INPUT}    {"input":{"name":"SFC1-100-Path-1"}}
-    Set Suite Variable    ${DELETE_RSP2_INPUT}    {"input":{"name":"SFC1-100-Path-2"}}
-    Set Suite Variable    ${DELETE_RSP3_INPUT}    {"input":{"name":"SFC1-100-Path-3"}}
-    Set Suite Variable    ${DELETE_RSP4_INPUT}    {"input":{"name":"SFC1-100-Path-4"}}
-    Set Suite Variable    ${DELETE_RSP5_INPUT}    {"input":{"name":"SFC1-100-Path-5"}}
-    Set Suite Variable    ${DELETE_RSP6_INPUT}    {"input":{"name":"SFC1-100-Path-6"}}
+    Set Suite Variable    ${DELETE_RSP1_INPUT}    {"input":{"name":"SFC1-100-RSP-1"}}
+    Set Suite Variable    ${DELETE_RSP2_INPUT}    {"input":{"name":"SFC1-100-RSP-2"}}
+    Set Suite Variable    ${DELETE_RSP3_INPUT}    {"input":{"name":"SFC1-100-RSP-3"}}
+    Set Suite Variable    ${DELETE_RSP4_INPUT}    {"input":{"name":"SFC1-100-RSP-4"}}
+    Set Suite Variable    ${DELETE_RSP5_INPUT}    {"input":{"name":"SFC1-100-RSP-5"}}
+    Set Suite Variable    ${DELETE_RSP6_INPUT}    {"input":{"name":"SFC1-100-RSP-6"}}