2 Documentation Test suite for SFC Persistency. Checks that system persistency is working as expected
6 Library OperatingSystem
7 Library RequestsLibrary
8 Library ../../../libraries/SFC/SfcUtils.py
9 Resource ../../../libraries/SFC/SfcKeywords.robot
10 Resource ../../../libraries/ClusterOpenFlow.robot
11 Resource ../../../libraries/KarafKeywords.robot
12 Resource ../../../variables/sfc/Variables.robot
13 Resource ../../../libraries/Utils.robot
14 Resource ../../../libraries/TemplatedRequests.robot
15 Resource ../../../libraries/SFC/DockerSfc.robot
17 Suite Setup Init Suite
18 Suite Teardown Delete All Sessions
22 ${JSON_DIR} ${CURDIR}/../../../variables/sfc/master
23 ${SERVICE_FUNCTIONS_FILE} ${JSON_DIR}/service-functions.json
24 ${SERVICE_FORWARDERS_FILE} ${JSON_DIR}/service-function-forwarders.json
25 ${SERVICE_NODES_FILE} ${JSON_DIR}/service-nodes.json
26 ${SERVICE_CHAINS_FILE} ${JSON_DIR}/service-function-chains.json
27 ${SERVICE_FUNCTION_PATHS_FILE} ${JSON_DIR}/service-function-paths.json
28 ${CREATE_RSP1_INPUT} {"input":{"parent-service-function-path":"SFC1-100","name":"SFC1-100-Path-1"}}
42 Add SFC Elements and restart cluster
43 [Documentation] Add SFC Elements, restart the cluster and check that persisted resources are present
45 ${session} = Resolve Http Session for Controller
46 Kill_Members_From_List_Or_All
47 Start_Members_From_List_Or_All wait_for_sync=True
48 Wait until Keyword succeeds 2min 5 sec Get Data From URI session ${SERVICE_FORWARDERS_URI}
49 Wait until Keyword succeeds 2min 5 sec Get Data From URI session ${SERVICE_NODES_URI}
50 Wait until Keyword succeeds 2min 5 sec Get Data From URI session ${SERVICE_FUNCTIONS_URI}
51 Wait Until Keyword Succeeds 2min 5 sec Check Service Function Types Added ${SF_NAMES}
52 Wait until Keyword succeeds 2min 5 sec Get Data From URI session ${SERVICE_CHAINS_URI}
53 Wait until Keyword succeeds 2min 5 sec Get Data From URI session ${SERVICE_FUNCTION_PATHS_URI}
54 Wait until Keyword succeeds
57 ... TemplatedRequests.Get_As_Json_Templated
58 ... session=${session}
59 ... folder=${RESTCONF_MODULES_DIR}
61 Wait until Keyword succeeds
66 ... ${OPERATIONAL_RSPS_URI}
67 [Teardown] Remove SFC Elements
72 [Documentation] Connect Create session and initialize ODL version specific variables
73 ClusterManagement Setup
74 Create Session session http://${ODL_SYSTEM_1_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
77 [Documentation] Add Elements to the Controller via API REST
78 Add Elements To URI From File ${SERVICE_FORWARDERS_URI} ${SERVICE_FORWARDERS_FILE}
79 Add Elements To URI From File ${SERVICE_NODES_URI} ${SERVICE_NODES_FILE}
80 Add Elements To URI From File ${SERVICE_FUNCTIONS_URI} ${SERVICE_FUNCTIONS_FILE}
81 Wait Until Keyword Succeeds 60s 2s Check Service Function Types Added ${SF_NAMES}
82 Add Elements To URI From File ${SERVICE_CHAINS_URI} ${SERVICE_CHAINS_FILE}
83 Add Elements To URI From File ${SERVICE_FUNCTION_PATHS_URI} ${SERVICE_FUNCTION_PATHS_FILE}
84 Wait until Keyword succeeds 60s 2s Get Data From URI session ${OPERATIONAL_RSPS_URI}
87 [Documentation] Remove Elements from the Controller via API REST
88 Remove All Elements At URI ${SERVICE_FUNCTIONS_URI}
89 Remove All Elements At URI ${SERVICE_FORWARDERS_URI}
90 Remove All Elements At URI ${SERVICE_NODES_URI}
91 Remove All Elements At URI ${SERVICE_CHAINS_URI}
92 Remove All Elements At URI ${SERVICE_FUNCTION_PATHS_URI}
94 Resolve Http Session for Controller
95 ${session} = Resolve_Http_Session_For_Member member_index=1