LISP: Separate Lithium and Beryllium tests 04/31304/6
authorLorand Jakab <lojakab@cisco.com>
Thu, 17 Dec 2015 17:18:50 +0000 (19:18 +0200)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 19 Dec 2015 00:43:12 +0000 (00:43 +0000)
See this thread [1] for more info.

[1] https://lists.opendaylight.org/pipermail/lispflowmapping-dev/2015-December/000532.html

Change-Id: Ied5a1a0eeae2c8c719eb61255855c445e099b340
Signed-off-by: Lorand Jakab <lojakab@cisco.com>
csit/libraries/LISPFlowMapping.robot
csit/libraries/LISPFlowMapping__Lithium.robot [new file with mode: 0644]
csit/libraries/Utils.robot
csit/suites/lispflowmapping/all/020_RPC_CRUD.robot [new file with mode: 0644]
csit/suites/lispflowmapping/all/030_RPC_Datatypes.robot [new file with mode: 0644]
csit/suites/lispflowmapping/basic/010_Restconf_OK.robot [deleted file]
csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot [deleted file]
csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot [moved from csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot with 85% similarity]
csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot [new file with mode: 0644]
csit/testplans/lispflowmapping-all.txt
csit/testplans/lispflowmapping-msmr.txt [new file with mode: 0644]

index 6ee0ab481267064e2e92db592327156419d34d21..cd11661f788aae09f01641af51408db8b5b433bc 100644 (file)
@@ -5,7 +5,7 @@ Documentation     This resource file defines keywords that are used in more
 ...               variables are coming from.
 
 *** Variables ***
-${ODL_VERSION}    Be
+${JSON_DIR}      ${CURDIR}/../variables/lispflowmapping/Be
 
 *** Keywords ***
 Authentication Key Should Be
@@ -17,21 +17,10 @@ Authentication Key Should Be
 Get Authentication Key
     [Arguments]    ${resp}
     ${output}=    Get From Dictionary    ${resp.json()}    output
-    ${authkey}=    Run Keyword If    "${ODL_VERSION}" == "Li"    Get Authentication Key Lithium    ${output}
-    ...    ELSE    Get Authentication Key Beryllium    ${output}
-    [Return]    ${authkey}
-
-Get Authentication Key Beryllium
-    [Arguments]    ${output}
     ${mapping_authkey}=    Get From Dictionary    ${output}    mapping-authkey
     ${authkey}=    Get From Dictionary    ${mapping_authkey}    key-string
     [Return]    ${authkey}
 
-Get Authentication Key Lithium
-    [Arguments]    ${output}
-    ${authkey}=    Get From Dictionary    ${output}    authkey
-    [Return]    ${authkey}
-
 Ipv4 Rloc Should Be
     [Arguments]    ${resp}    ${address}
     [Documentation]    Check if the RLOC in the ${resp} is ${address}
@@ -44,62 +33,15 @@ Ipv4 Rloc Should Be
 Get Eid Record
     [Arguments]    ${resp}
     ${output}=    Get From Dictionary    ${resp.json()}    output
-    ${eid_record}=    Run Keyword If    "${ODL_VERSION}" == "Li"    Get Eid Record Lithium    ${output}
-    ...    ELSE    Get Eid Record Beryllium    ${output}
-    [Return]    ${eid_record}
-
-Get Eid Record Beryllium
-    [Arguments]    ${output}
     ${eid_record}=    Get From Dictionary    ${output}    mapping-record
     [Return]    ${eid_record}
 
-Get Eid Record Lithium
-    [Arguments]    ${output}
-    ${eid_record}=    Get From Dictionary    ${output}    eidToLocatorRecord
-    ${eid_record}=    Get From List    ${eid_record}    0
-    [Return]    ${eid_record}
-
 Get Ipv4 Rloc
-    [Arguments]    ${loc_record}
-    ${ipv4}=    Run Keyword If    "${ODL_VERSION}" == "Li"    Get Ipv4 Rloc Lithium    ${loc_record}
-    ...    ELSE    Get Ipv4 Rloc Beryllium    ${loc_record}
-    [Return]    ${ipv4}
-
-Get Ipv4 Rloc Beryllium
     [Arguments]    ${loc_record}
     ${loc}=    Get From Dictionary    ${loc_record}    rloc
     ${ipv4}=    Get From Dictionary    ${loc}    ipv4
     [Return]    ${ipv4}
 
-Get Ipv4 Rloc Lithium
-    [Arguments]    ${loc_record}
-    ${loc}=    Get From Dictionary    ${loc_record}    LispAddressContainer
-    ${address}=    Get From Dictionary    ${loc}    Ipv4Address
-    ${ipv4}=    Get From Dictionary    ${address}    Ipv4Address
-    [Return]    ${ipv4}
-
 Check Mapping Removal
     [Arguments]    ${json}
-    Run Keyword If    "${ODL_VERSION}" == "Li"    Check Mapping Removal Lithium    ${json}
-    ...    ELSE    Post Log Check    ${LFM_RPC_API}:get-mapping    ${json}    404
-
-Check Mapping Removal Lithium
-    [Arguments]    ${json}
-    ${resp}=    Post Log Check    ${LFM_RPC_API}:get-mapping    ${json}
-    ${output}=    Get From Dictionary    ${resp.json()}    output
-    ${eid_record}=    Get From Dictionary    ${output}    eidToLocatorRecord
-    ${eid_record_0}=    Get From List    ${eid_record}    0
-    ${action}=    Get From Dictionary    ${eid_record_0}    action
-    Should Be Equal As Strings    ${action}    NativelyForward
-
-Post Log Check
-    [Arguments]    ${uri}    ${body}    ${status_code}=200
-    [Documentation]    Post body to uri, log response content, and check status
-    ${resp}=    RequestsLibrary.Post    session    ${uri}    ${body}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    ${status_code}
-    [Return]    ${resp}
-
-Create Session And Set External Variables
-    Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
-    Run Keyword If    "${ODL_VERSION}" == "Li"    Set Suite Variable    ${LFM_RPC_API}    ${LFM_RPC_API_LI}
+    Post Log Check    ${LFM_RPC_API}:get-mapping    ${json}    404
diff --git a/csit/libraries/LISPFlowMapping__Lithium.robot b/csit/libraries/LISPFlowMapping__Lithium.robot
new file mode 100644 (file)
index 0000000..9eae663
--- /dev/null
@@ -0,0 +1,53 @@
+*** Settings ***
+Documentation     This resource file defines keywords that are used in more
+...               than one lispflowmapping test suite. Those suites include
+...               ../variables/Variables.py, which is where some of the
+...               variables are coming from.
+
+*** Variables ***
+${JSON_DIR}       ${CURDIR}/../variables/lispflowmapping/Li
+
+*** Keywords ***
+Authentication Key Should Be
+    [Arguments]    ${resp}    ${password}
+    [Documentation]    Check if the authentication key in the ${resp} is ${password}
+    ${authkey}=    Get Authentication Key    ${resp}
+    Should Be Equal As Strings    ${authkey}    ${password}
+
+Get Authentication Key
+    [Arguments]    ${resp}
+    ${output}=    Get From Dictionary    ${resp.json()}    output
+    ${authkey}=    Get From Dictionary    ${output}    authkey
+    [Return]    ${authkey}
+
+Ipv4 Rloc Should Be
+    [Arguments]    ${resp}    ${address}
+    [Documentation]    Check if the RLOC in the ${resp} is ${address}
+    ${eid_record}=    Get Eid Record    ${resp}
+    ${loc_record}=    Get From Dictionary    ${eid_record}    LocatorRecord
+    ${loc_record_0}=    Get From List    ${loc_record}    0
+    ${ipv4}=    Get Ipv4 Rloc    ${loc_record_0}
+    Should Be Equal As Strings    ${ipv4}    ${address}
+
+Get Eid Record
+    [Arguments]    ${resp}
+    ${output}=    Get From Dictionary    ${resp.json()}    output
+    ${eid_record}=    Get From Dictionary    ${output}    eidToLocatorRecord
+    ${eid_record}=    Get From List    ${eid_record}    0
+    [Return]    ${eid_record}
+
+Get Ipv4 Rloc
+    [Arguments]    ${loc_record}
+    ${loc}=    Get From Dictionary    ${loc_record}    LispAddressContainer
+    ${address}=    Get From Dictionary    ${loc}    Ipv4Address
+    ${ipv4}=    Get From Dictionary    ${address}    Ipv4Address
+    [Return]    ${ipv4}
+
+Check Mapping Removal
+    [Arguments]    ${json}
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-mapping    ${json}
+    ${output}=    Get From Dictionary    ${resp.json()}    output
+    ${eid_record}=    Get From Dictionary    ${output}    eidToLocatorRecord
+    ${eid_record_0}=    Get From List    ${eid_record}    0
+    ${action}=    Get From Dictionary    ${eid_record_0}    action
+    Should Be Equal As Strings    ${action}    NativelyForward
index 951bcc319fb5e5b98ee8dcb132c9aa8941d31168..4707b6add9ce45949f9025e3887a54ffc351c98d 100644 (file)
@@ -363,3 +363,11 @@ Check Item Occurrence
     [Documentation]    Check string for occurrences of items expressed in a list of dictionaries {item=occurrences}. 0 occurences means item is not present.
     : FOR    ${item}    IN    @{dictionary_item_occurrence}
     \    Should Contain X Times    ${string}    ${item}    &{dictionary_item_occurrence}[${item}]
+
+Post Log Check
+    [Arguments]    ${uri}    ${body}    ${status_code}=200
+    [Documentation]    Post body to ${uri}, log response content, and check status
+    ${resp}=    RequestsLibrary.Post    session    ${uri}    ${body}
+    Log    ${resp.content}
+    Should Be Equal As Strings    ${resp.status_code}    ${status_code}
+    [Return]    ${resp}
diff --git a/csit/suites/lispflowmapping/all/020_RPC_CRUD.robot b/csit/suites/lispflowmapping/all/020_RPC_CRUD.robot
new file mode 100644 (file)
index 0000000..1b37d96
--- /dev/null
@@ -0,0 +1,105 @@
+*** Settings ***
+Documentation     Test suite to verify CRUD operations using RPCs
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/LISPFlowMapping__Lithium.robot
+Resource          ../../../libraries/Utils.robot
+
+*** Variables ***
+${IPV4_C_KEY}     ${JSON_DIR}/rpc_add-key_ipv4.json
+${IPV4_RD}        ${JSON_DIR}/rpc_get-remove_ipv4.json
+${MISS_RD}        ${JSON_DIR}/rpc_get-remove_missing.json
+${IPV4_U_KEY}     ${JSON_DIR}/rpc_update-key_ipv4.json
+${IPV4_C_MAP}     ${JSON_DIR}/rpc_add-mapping_ipv4_ipv4.json
+${IPV4_U_MAP}     ${JSON_DIR}/rpc_update-mapping_ipv4_ipv4.json
+
+*** Test Cases ***
+Create Key
+    [Documentation]    Create a key for an IPv4 EID
+    ${add_key}=    OperatingSystem.Get File    ${IPV4_C_KEY}
+    Post Log Check    ${LFM_RPC_API_LI}:add-key    ${add_key}
+
+Attempt To Create Key Again
+    [Documentation]    Try to overwrite existing IPv4 EID key
+    ${add_key}=    OperatingSystem.Get File    ${IPV4_C_KEY}
+    Post Log Check    ${LFM_RPC_API_LI}:add-key    ${add_key}    409
+
+Attempt To Read Non-Existing Key
+    [Documentation]    Try to read a non-existing key for an IPv4 EID
+    ${get_key}=    OperatingSystem.Get File    ${MISS_RD}
+    Post Log Check    ${LFM_RPC_API_LI}:get-key    ${get_key}    404
+
+Read Key
+    [Documentation]    Read an existing key for an IPv4 EID
+    ${get_key}=    OperatingSystem.Get File    ${IPV4_RD}
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-key    ${get_key}
+    Authentication Key Should Be    ${resp}    password
+
+Update Key
+    [Documentation]    Update an existing key for an IPv4 EID
+    ${update_key}=    OperatingSystem.Get File    ${IPV4_U_KEY}
+    Post Log Check    ${LFM_RPC_API_LI}:update-key    ${update_key}
+
+Read Updated Key
+    [Documentation]    Read the key updated in the previous test
+    ${get_key}=    OperatingSystem.Get File    ${IPV4_RD}
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-key    ${get_key}
+    Authentication Key Should Be    ${resp}    updated-password
+
+Delete Key
+    [Documentation]    Delete an existing key for an IPv4 EID
+    ${remove_key}=    OperatingSystem.Get File    ${IPV4_RD}
+    Post Log Check    ${LFM_RPC_API_LI}:remove-key    ${remove_key}
+
+Attempt To Read Deleted Key
+    [Documentation]    Try to read the key deleted in the previous test
+    ${get_key}=    OperatingSystem.Get File    ${IPV4_RD}
+    Post Log Check    ${LFM_RPC_API_LI}:get-key    ${get_key}    404
+
+Attempt To Update Non-Existing Key
+    [Documentation]    Update a non-existing key for an IPv4 EID
+    ${update_key}=    OperatingSystem.Get File    ${IPV4_U_KEY}
+    Post Log Check    ${LFM_RPC_API_LI}:update-key    ${update_key}    404
+
+Create Mapping
+    [Documentation]    Create a mapping for an IPv4 EID
+    ${add_mapping}=    OperatingSystem.Get File    ${IPV4_C_MAP}
+    Post Log Check    ${LFM_RPC_API_LI}:add-mapping    ${add_mapping}
+
+Attempt To Read Non-Existing Mapping
+    [Documentation]    Try to read a non-existing mapping for an IPv4 EID
+    ${get_mapping}=    OperatingSystem.Get File    ${MISS_RD}
+    Check Mapping Removal    ${get_mapping}
+
+Read Mapping
+    [Documentation]    Read an existing mapping for an IPv4 EID
+    ${get_mapping}=    OperatingSystem.Get File    ${IPV4_RD}
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-mapping    ${get_mapping}
+    Ipv4 Rloc Should Be    ${resp}    10.10.10.10
+
+Update Mapping
+    [Documentation]    Update an existing mapping for an IPv4 EID
+    ${update_mapping}=    OperatingSystem.Get File    ${IPV4_U_MAP}
+    Post Log Check    ${LFM_RPC_API_LI}:update-mapping    ${update_mapping}
+
+Read Updated Mapping
+    [Documentation]    Read the mapping updated in the previous test
+    ${get_mapping}=    OperatingSystem.Get File    ${IPV4_RD}
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-mapping    ${get_mapping}
+    Ipv4 Rloc Should Be    ${resp}    20.20.20.20
+
+Delete Mapping
+    [Documentation]    Delete an existing mapping for an IPv4 EID
+    ${remove_mapping}=    OperatingSystem.Get File    ${IPV4_RD}
+    Post Log Check    ${LFM_RPC_API_LI}:remove-mapping    ${remove_mapping}
+
+Attempt To Read Deleted Mapping
+    [Documentation]    Try to read the mapping deleted in the previous test
+    Sleep    200ms    Avoid race conditions
+    ${get_mapping}=    OperatingSystem.Get File    ${IPV4_RD}
+    Check Mapping Removal    ${get_mapping}
diff --git a/csit/suites/lispflowmapping/all/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/all/030_RPC_Datatypes.robot
new file mode 100644 (file)
index 0000000..34f87e8
--- /dev/null
@@ -0,0 +1,79 @@
+*** Settings ***
+Documentation     Test suite to verify data types using RPCs
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Test Setup        Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
+Test Teardown     Remove Datatype And Check Removal
+Test Template     Check Datatype
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/LISPFlowMapping__Lithium.robot
+Resource          ../../../libraries/Utils.robot
+
+*** Test Cases ***
+IPv4 Prefix
+    [Documentation]    Perform mapping operations with an IPv4 EID
+    rpc_add-mapping_ipv4_ipv4.json    rpc_get-remove_ipv4.json
+
+IPv6 Prefix
+    [Documentation]    Perform mapping operations with an IPv6 EID
+    rpc_add-mapping_ipv6_ipv4.json    rpc_get-remove_ipv6.json
+
+MAC Address
+    [Documentation]    Perform mapping operations with a MAC address EID
+    rpc_add-mapping_mac_ipv4.json    rpc_get-remove_mac.json
+
+Distinguished Name
+    [Documentation]    Perform mapping operations with a Distinguished Name EID
+    rpc_add-mapping_dn_ipv4.json    rpc_get-remove_dn.json
+
+AS Number
+    [Documentation]    Perform mapping operations with an Autonomous System Number EID
+    rpc_add-mapping_as_ipv4.json    rpc_get-remove_as.json
+
+Instance ID
+    [Documentation]    Perform mapping operations with an IPv4 EID in Instance ID 1
+    rpc_add-mapping_iid_ipv4.json    rpc_get-remove_iid.json
+
+Source/Destination
+    [Documentation]    Perform mapping operations with a Source/Destination EID
+    rpc_add-mapping_srcdst_ipv4.json    rpc_get-remove_srcdst.json
+
+Key/Value
+    [Documentation]    Perform mapping operations with a Key/Value EID
+    rpc_add-mapping_kv_ipv4.json    rpc_get-remove_kv.json
+
+AFI List
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an AFI List RLOC
+    rpc_add-mapping_ipv4_list.json    rpc_get-remove_ipv4.json
+
+Application Data
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an Application Data RLOC
+    rpc_add-mapping_ipv4_appdata.json    rpc_get-remove_ipv4.json
+
+Explicit Locator Path
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an ELP RLOC
+    rpc_add-mapping_ipv4_elp.json    rpc_get-remove_ipv4.json
+
+*** Keywords ***
+Check Datatype
+    [Arguments]    ${add_mapping_json_file}    ${get_mapping_json_file}
+    [Documentation]    Perform CRD operations using a specific datatype
+    ${add_mapping}=    OperatingSystem.Get File    ${JSON_DIR}/${add_mapping_json_file}
+    ${get_mapping}=    OperatingSystem.Get File    ${JSON_DIR}/${get_mapping_json_file}
+    Set Suite Variable    ${RPC_Datatype__current_json}    ${get_mapping}
+    Post Log Check    ${LFM_RPC_API_LI}:add-mapping    ${add_mapping}
+    Sleep    200ms    Avoid race conditions
+    ${resp}=    Post Log Check    ${LFM_RPC_API_LI}:get-mapping    ${get_mapping}
+    ${eid_record}=    Get Eid Record    ${resp}
+    Dictionary Should Contain Key    ${eid_record}    LocatorRecord
+
+Remove Datatype And Check Removal
+    Variable Should Exist    ${RPC_Datatype__current_json}
+    Post Log Check    ${LFM_RPC_API_LI}:remove-mapping    ${RPC_Datatype__current_json}
+    Sleep    200ms    Avoid race conditions
+    Check Mapping Removal    ${RPC_Datatype__current_json}
+    Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
diff --git a/csit/suites/lispflowmapping/basic/010_Restconf_OK.robot b/csit/suites/lispflowmapping/basic/010_Restconf_OK.robot
deleted file mode 100644 (file)
index 9efa093..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-*** Settings ***
-Documentation     Test suite to verify Restconf is OK
-Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
-Suite Teardown    Delete All Sessions
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/Utils.robot
-
-*** Variables ***
-${REST_CONTEXT}    /restconf/modules
-
-*** Test Cases ***
-Get Controller Modules
-    [Documentation]    Get the controller modules via Restconf
-    ${resp}    RequestsLibrary.Get    session    ${REST_CONTEXT}
-    Log    ${resp.content}
-    Should Be Equal As Strings    ${resp.status_code}    200
-    Should Contain    ${resp.content}    ietf-restconf
diff --git a/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot
deleted file mode 100644 (file)
index afbaa41..0000000
+++ /dev/null
@@ -1,100 +0,0 @@
-*** Settings ***
-Documentation     Test suite to verify data types using RPCs
-Suite Setup       Create Session And Set External Variables
-Suite Teardown    Delete All Sessions
-Test Setup        Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
-Test Teardown     Remove Datatype And Check Removal
-Test Template     Check Datatype
-Library           Collections
-Library           OperatingSystem
-Library           RequestsLibrary
-Library           ../../../libraries/Common.py
-Variables         ../../../variables/Variables.py
-Resource          ../../../libraries/LISPFlowMapping.robot
-Resource          ../../../libraries/Utils.robot
-
-*** Variables ***
-${IPV4_C_MAP}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv4_ipv4.json
-${IPV4_RD}        ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_ipv4.json
-${IPV6_C_MAP}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv6_ipv4.json
-${IPV6_RD}        ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_ipv6.json
-${MAC_C_MAP}      ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_mac_ipv4.json
-${MAC_RD}         ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_mac.json
-${DN_C_MAP}       ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_dn_ipv4.json
-${DN_RD}          ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_dn.json
-${AS_C_MAP}       ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_as_ipv4.json
-${AS_RD}          ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_as.json
-${IID_C_MAP}      ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_iid_ipv4.json
-${IID_RD}         ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_iid.json
-${SD_C_MAP}       ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_srcdst_ipv4.json
-${SD_RD}          ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_srcdst.json
-${KV_C_MAP}       ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_kv_ipv4.json
-${KV_RD}          ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_kv.json
-${LST_C_MAP}      ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv4_list.json
-${APP_C_MAP}      ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv4_appdata.json
-${ELP_C_MAP}      ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv4_elp.json
-
-*** Test Cases ***
-IPv4 Prefix
-    [Documentation]    Perform mapping operations with an IPv4 EID
-    ${IPV4_C_MAP}    ${IPV4_RD}
-
-IPv6 Prefix
-    [Documentation]    Perform mapping operations with an IPv6 EID
-    ${IPV6_C_MAP}    ${IPV6_RD}
-
-MAC Address
-    [Documentation]    Perform mapping operations with a MAC address EID
-    ${MAC_C_MAP}    ${MAC_RD}
-
-Distinguished Name
-    [Documentation]    Perform mapping operations with a Distinguished Name EID
-    ${DN_C_MAP}    ${DN_RD}
-
-AS Number
-    [Documentation]    Perform mapping operations with an Autonomous System Number EID
-    ${AS_C_MAP}    ${AS_RD}
-
-Instance ID
-    [Documentation]    Perform mapping operations with an IPv4 EID in Instance ID 1
-    ${IID_C_MAP}    ${IID_RD}
-
-Source/Destination
-    [Documentation]    Perform mapping operations with a Source/Destination EID
-    ${SD_C_MAP}    ${SD_RD}
-
-Key/Value
-    [Documentation]    Perform mapping operations with a Key/Value EID
-    ${KV_C_MAP}    ${KV_RD}
-
-AFI List
-    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an AFI List RLOC
-    ${LST_C_MAP}    ${IPV4_RD}
-
-Application Data
-    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an Application Data RLOC
-    ${APP_C_MAP}    ${IPV4_RD}
-
-Explicit Locator Path
-    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an ELP RLOC
-    ${ELP_C_MAP}    ${IPV4_RD}
-
-*** Keywords ***
-Check Datatype
-    [Arguments]    ${add_mapping_json_file}    ${get_mapping_json_file}
-    [Documentation]    Perform CRD operations using a specific datatype
-    ${add_mapping}=    OperatingSystem.Get File    ${add_mapping_json_file}
-    ${get_mapping}=    OperatingSystem.Get File    ${get_mapping_json_file}
-    Set Suite Variable    ${RPC_Datatype__current_json}    ${get_mapping}
-    Post Log Check    ${LFM_RPC_API}:add-mapping    ${add_mapping}
-    Sleep    200ms    Avoid race conditions
-    ${resp}=    Post Log Check    ${LFM_RPC_API}:get-mapping    ${get_mapping}
-    ${eid_record}=    Get Eid Record    ${resp}
-    Dictionary Should Contain Key    ${eid_record}    LocatorRecord
-
-Remove Datatype And Check Removal
-    Variable Should Exist    ${RPC_Datatype__current_json}
-    Post Log Check    ${LFM_RPC_API}:remove-mapping    ${RPC_Datatype__current_json}
-    Sleep    200ms    Avoid race conditions
-    Check Mapping Removal    ${RPC_Datatype__current_json}
-    Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
similarity index 85%
rename from csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot
rename to csit/suites/lispflowmapping/msmr/020_RPC_CRUD.robot
index 8f0552de829790ec47eaf016c18efaab540f39be..a3bbeb1f120770b4d0b7e44c55b4a5ef4604f4c6 100644 (file)
@@ -1,6 +1,6 @@
 *** Settings ***
 Documentation     Test suite to verify CRUD operations using RPCs
-Suite Setup       Create Session And Set External Variables
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
 Suite Teardown    Delete All Sessions
 Library           Collections
 Library           OperatingSystem
@@ -11,12 +11,12 @@ Resource          ../../../libraries/LISPFlowMapping.robot
 Resource          ../../../libraries/Utils.robot
 
 *** Variables ***
-${IPV4_C_KEY}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-key_ipv4.json
-${IPV4_RD}        ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_ipv4.json
-${MISS_RD}        ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_get-remove_missing.json
-${IPV4_U_KEY}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_update-key_ipv4.json
-${IPV4_C_MAP}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_add-mapping_ipv4_ipv4.json
-${IPV4_U_MAP}     ${CURDIR}/../../../variables/lispflowmapping/${ODL_VERSION}/rpc_update-mapping_ipv4_ipv4.json
+${IPV4_C_KEY}     ${JSON_DIR}/rpc_add-key_ipv4.json
+${IPV4_RD}        ${JSON_DIR}/rpc_get-remove_ipv4.json
+${MISS_RD}        ${JSON_DIR}/rpc_get-remove_missing.json
+${IPV4_U_KEY}     ${JSON_DIR}/rpc_update-key_ipv4.json
+${IPV4_C_MAP}     ${JSON_DIR}/rpc_add-mapping_ipv4_ipv4.json
+${IPV4_U_MAP}     ${JSON_DIR}/rpc_update-mapping_ipv4_ipv4.json
 
 *** Test Cases ***
 Create Key
diff --git a/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/msmr/030_RPC_Datatypes.robot
new file mode 100644 (file)
index 0000000..de58fbf
--- /dev/null
@@ -0,0 +1,79 @@
+*** Settings ***
+Documentation     Test suite to verify data types using RPCs
+Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
+Suite Teardown    Delete All Sessions
+Test Setup        Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
+Test Teardown     Remove Datatype And Check Removal
+Test Template     Check Datatype
+Library           Collections
+Library           OperatingSystem
+Library           RequestsLibrary
+Library           ../../../libraries/Common.py
+Variables         ../../../variables/Variables.py
+Resource          ../../../libraries/LISPFlowMapping.robot
+Resource          ../../../libraries/Utils.robot
+
+*** Test Cases ***
+IPv4 Prefix
+    [Documentation]    Perform mapping operations with an IPv4 EID
+    rpc_add-mapping_ipv4_ipv4.json    rpc_get-remove_ipv4.json
+
+IPv6 Prefix
+    [Documentation]    Perform mapping operations with an IPv6 EID
+    rpc_add-mapping_ipv6_ipv4.json    rpc_get-remove_ipv6.json
+
+MAC Address
+    [Documentation]    Perform mapping operations with a MAC address EID
+    rpc_add-mapping_mac_ipv4.json    rpc_get-remove_mac.json
+
+Distinguished Name
+    [Documentation]    Perform mapping operations with a Distinguished Name EID
+    rpc_add-mapping_dn_ipv4.json    rpc_get-remove_dn.json
+
+AS Number
+    [Documentation]    Perform mapping operations with an Autonomous System Number EID
+    rpc_add-mapping_as_ipv4.json    rpc_get-remove_as.json
+
+Instance ID
+    [Documentation]    Perform mapping operations with an IPv4 EID in Instance ID 1
+    rpc_add-mapping_iid_ipv4.json    rpc_get-remove_iid.json
+
+Source/Destination
+    [Documentation]    Perform mapping operations with a Source/Destination EID
+    rpc_add-mapping_srcdst_ipv4.json    rpc_get-remove_srcdst.json
+
+Key/Value
+    [Documentation]    Perform mapping operations with a Key/Value EID
+    rpc_add-mapping_kv_ipv4.json    rpc_get-remove_kv.json
+
+AFI List
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an AFI List RLOC
+    rpc_add-mapping_ipv4_list.json    rpc_get-remove_ipv4.json
+
+Application Data
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an Application Data RLOC
+    rpc_add-mapping_ipv4_appdata.json    rpc_get-remove_ipv4.json
+
+Explicit Locator Path
+    [Documentation]    Perform mapping operations with an IPv4 EID mapped to an ELP RLOC
+    rpc_add-mapping_ipv4_elp.json    rpc_get-remove_ipv4.json
+
+*** Keywords ***
+Check Datatype
+    [Arguments]    ${add_mapping_json_file}    ${get_mapping_json_file}
+    [Documentation]    Perform CRD operations using a specific datatype
+    ${add_mapping}=    OperatingSystem.Get File    ${JSON_DIR}/${add_mapping_json_file}
+    ${get_mapping}=    OperatingSystem.Get File    ${JSON_DIR}/${get_mapping_json_file}
+    Set Suite Variable    ${RPC_Datatype__current_json}    ${get_mapping}
+    Post Log Check    ${LFM_RPC_API}:add-mapping    ${add_mapping}
+    Sleep    200ms    Avoid race conditions
+    ${resp}=    Post Log Check    ${LFM_RPC_API}:get-mapping    ${get_mapping}
+    ${eid_record}=    Get Eid Record    ${resp}
+    Dictionary Should Contain Key    ${eid_record}    LocatorRecord
+
+Remove Datatype And Check Removal
+    Variable Should Exist    ${RPC_Datatype__current_json}
+    Post Log Check    ${LFM_RPC_API}:remove-mapping    ${RPC_Datatype__current_json}
+    Sleep    200ms    Avoid race conditions
+    Check Mapping Removal    ${RPC_Datatype__current_json}
+    Set Suite Variable    ${RPC_Datatype__current_json}    ${EMPTY}
index 3ff95c36fd197baf1dc84bf73a619fa10f498385..1de62e9f68ea57709f0c99cd877d12890fb051fd 100644 (file)
@@ -1,2 +1,2 @@
 # Place the suites in run order:
-integration/test/csit/suites/lispflowmapping/basic
+integration/test/csit/suites/lispflowmapping/all
diff --git a/csit/testplans/lispflowmapping-msmr.txt b/csit/testplans/lispflowmapping-msmr.txt
new file mode 100644 (file)
index 0000000..1c8679e
--- /dev/null
@@ -0,0 +1,2 @@
+# Place the suites in run order:
+integration/test/csit/suites/lispflowmapping/msmr