From: Lorand Jakab Date: Tue, 1 Dec 2015 18:55:51 +0000 (+0200) Subject: Migrate LISP tests to new Beryllium API X-Git-Tag: release/beryllium-sr1~273 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=84c75ad43a4cbc947605a2c172971a1e2be80121;hp=dabeb636c8e0c4235e9162eaa746acc4bd541f33;p=integration%2Ftest.git Migrate LISP tests to new Beryllium API Change-Id: I2966e71907dfedf690c54074b31065e5eac73770 Signed-off-by: Lorand Jakab --- diff --git a/csit/libraries/LISPFlowMapping.robot b/csit/libraries/LISPFlowMapping.robot index 6f15ad4857..6ee0ab4812 100644 --- a/csit/libraries/LISPFlowMapping.robot +++ b/csit/libraries/LISPFlowMapping.robot @@ -8,6 +8,76 @@ Documentation This resource file defines keywords that are used in more ${ODL_VERSION} Be *** 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}= 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} + ${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}= 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} diff --git a/csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot b/csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot index 5731c48f5b..8f0552de82 100644 --- a/csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot +++ b/csit/suites/lispflowmapping/basic/020_RPC_CRUD.robot @@ -11,12 +11,12 @@ Resource ../../../libraries/LISPFlowMapping.robot Resource ../../../libraries/Utils.robot *** Variables *** -${IPV4_C_KEY} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-key_ipv4.json -${IPV4_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_ipv4.json -${MISS_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_missing.json -${IPV4_U_KEY} ${CURDIR}/../../../variables/lispflowmapping/rpc_update-key_ipv4.json -${IPV4_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv4_ipv4.json -${IPV4_U_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_update-mapping_ipv4_ipv4.json +${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 *** Test Cases *** Create Key @@ -38,9 +38,7 @@ 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}:get-key ${get_key} - ${output}= Get From Dictionary ${resp.json()} output - ${password}= Get From Dictionary ${output} authkey - Should Be Equal As Strings ${password} password + Authentication Key Should Be ${resp} password Update Key [Documentation] Update an existing key for an IPv4 EID @@ -51,9 +49,7 @@ 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}:get-key ${get_key} - ${output}= Get From Dictionary ${resp.json()} output - ${password}= Get From Dictionary ${output} authkey - Should Be Equal As Strings ${password} updated-password + Authentication Key Should Be ${resp} updated-password Delete Key [Documentation] Delete an existing key for an IPv4 EID @@ -84,15 +80,7 @@ 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}:get-mapping ${get_mapping} - ${output}= Get From Dictionary ${resp.json()} output - ${eid_record}= Get From Dictionary ${output} eidToLocatorRecord - ${eid_record_0}= Get From List ${eid_record} 0 - ${loc_record}= Get From Dictionary ${eid_record_0} LocatorRecord - ${loc_record_0}= Get From List ${loc_record} 0 - ${loc}= Get From Dictionary ${loc_record_0} LispAddressContainer - ${address}= Get From Dictionary ${loc} Ipv4Address - ${ipv4}= Get From Dictionary ${address} Ipv4Address - Should Be Equal As Strings ${ipv4} 10.10.10.10 + Ipv4 Rloc Should Be ${resp} 10.10.10.10 Update Mapping [Documentation] Update an existing mapping for an IPv4 EID @@ -103,15 +91,7 @@ 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}:get-mapping ${get_mapping} - ${output}= Get From Dictionary ${resp.json()} output - ${eid_record}= Get From Dictionary ${output} eidToLocatorRecord - ${eid_record_0}= Get From List ${eid_record} 0 - ${loc_record}= Get From Dictionary ${eid_record_0} LocatorRecord - ${loc_record_0}= Get From List ${loc_record} 0 - ${loc}= Get From Dictionary ${loc_record_0} LispAddressContainer - ${address}= Get From Dictionary ${loc} Ipv4Address - ${ipv4}= Get From Dictionary ${address} Ipv4Address - Should Be Equal As Strings ${ipv4} 20.20.20.20 + Ipv4 Rloc Should Be ${resp} 20.20.20.20 Delete Mapping [Documentation] Delete an existing mapping for an IPv4 EID diff --git a/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot b/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot index 9494517621..afbaa41d9d 100644 --- a/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot +++ b/csit/suites/lispflowmapping/basic/030_RPC_Datatypes.robot @@ -14,25 +14,25 @@ Resource ../../../libraries/LISPFlowMapping.robot Resource ../../../libraries/Utils.robot *** Variables *** -${IPV4_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv4_ipv4.json -${IPV4_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_ipv4.json -${IPV6_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv6_ipv4.json -${IPV6_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_ipv6.json -${MAC_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_mac_ipv4.json -${MAC_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_mac.json -${DN_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_dn_ipv4.json -${DN_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_dn.json -${AS_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_as_ipv4.json -${AS_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_as.json -${IID_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_iid_ipv4.json -${IID_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_iid.json -${SD_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_srcdst_ipv4.json -${SD_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_srcdst.json -${KV_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_kv_ipv4.json -${KV_RD} ${CURDIR}/../../../variables/lispflowmapping/rpc_get-remove_kv.json -${LST_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv4_list.json -${APP_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv4_appdata.json -${ELP_C_MAP} ${CURDIR}/../../../variables/lispflowmapping/rpc_add-mapping_ipv4_elp.json +${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 @@ -89,10 +89,8 @@ Check Datatype 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} - ${output}= Get From Dictionary ${resp.json()} output - ${eid_record}= Get From Dictionary ${output} eidToLocatorRecord - ${eid_record_0}= Get From List ${eid_record} 0 - Dictionary Should Contain Key ${eid_record_0} LocatorRecord + ${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} diff --git a/csit/variables/Variables.py b/csit/variables/Variables.py index 228eb32aed..f3bf705bae 100644 --- a/csit/variables/Variables.py +++ b/csit/variables/Variables.py @@ -143,9 +143,9 @@ GBP_TENANTS_API = "/restconf/config/policy:tenants" GBP_TUNNELS_API = "/restconf/config/opendaylight-inventory:nodes" # LISP Flow Mapping variables -LFM_RPC_API = "/restconf/operations/mappingservice" +LFM_RPC_API = "/restconf/operations/odl-mappingservice" LFM_RPC_API_LI = "/restconf/operations/lfm-mapping-database" -LFM_SB_RPC_API = "/restconf/operations/lisp-sb" +LFM_SB_RPC_API = "/restconf/operations/odl-lisp-sb" # Other global variables # TODO: Move these to more apropriate sections. diff --git a/csit/variables/lispflowmapping/Be/rpc_add-key_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-key_ipv4.json new file mode 100644 index 0000000000..33c7d0aa0f --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-key_ipv4.json @@ -0,0 +1,12 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "mapping-authkey": { + "key-string": "password", + "key-type": 1 + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_as_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_as_ipv4.json new file mode 100644 index 0000000000..86f5f6d0e4 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_as_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:as-number-afi", + "as-number": 64500 + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_dn_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_dn_ipv4.json new file mode 100644 index 0000000000..c1565c05bf --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_dn_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:distinguished-name-afi", + "distinguished-name": "stringAsIs" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_iid_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_iid_ipv4.json new file mode 100644 index 0000000000..c66aeafcfd --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_iid_ipv4.json @@ -0,0 +1,33 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:instance-id-lcaf", + "instance-id": { + "iid": 1, + "mask-length": 32, + "address": "192.0.2.0/32" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_appdata.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_appdata.json new file mode 100644 index 0000000000..fa48df93b1 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_appdata.json @@ -0,0 +1,37 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:application-data-lcaf", + "application-data": { + "address": "10.10.10.10", + "protocol": 17, + "ip-tos": 128, + "local-port-low": 80, + "local-port-high": 81, + "remote-port-low": 6667, + "remote-port-high": 7000 + } + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_elp.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_elp.json new file mode 100644 index 0000000000..cd979295c8 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_elp.json @@ -0,0 +1,42 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:explicit-locator-path-lcaf", + "explicit-locator-path": { + "hop": [ + { + "hop-id": "Hop 1", + "address": "20.20.20.20", + "lrs-bits": "lookup rloc-probe strict" + }, + { + "hop-id": "Hop 2", + "address": "30.30.30.30", + "lrs-bits": "lookup strict" + } + ] + } + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_ipv4.json new file mode 100644 index 0000000000..278c190137 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_list.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_list.json new file mode 100644 index 0000000000..3941d42c9b --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv4_list.json @@ -0,0 +1,34 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:afi-list-lcaf", + "afi-list": { + "address-list": [ + "10.10.10.10", + "2001:db8::1" + ] + } + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv6_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv6_ipv4.json new file mode 100644 index 0000000000..e14b235ff9 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_ipv6_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "2001:db8::1/128" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_kv_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_kv_ipv4.json new file mode 100644 index 0000000000..373eb4fcf4 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_kv_ipv4.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:key-value-address-lcaf", + "key-value-address": { + "key": "192.0.2.1", + "value": "192.0.2.2" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_mac_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_mac_ipv4.json new file mode 100644 index 0000000000..c438e88d9b --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_mac_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:mac-afi", + "mac": "00:11:22:33:44:55" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_add-mapping_srcdst_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_add-mapping_srcdst_ipv4.json new file mode 100644 index 0000000000..e4a305d004 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_add-mapping_srcdst_ipv4.json @@ -0,0 +1,32 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "192.0.2.1/32", + "dest": "192.0.2.2/32" + } + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "10.10.10.10" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_as.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_as.json new file mode 100644 index 0000000000..d94b3499f3 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_as.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:as-number-afi", + "as-number": 64500 + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_dn.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_dn.json new file mode 100644 index 0000000000..a045d20c50 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_dn.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:distinguished-name-afi", + "distinguished-name": "stringAsIs" + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_iid.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_iid.json new file mode 100644 index 0000000000..dd14beeb35 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_iid.json @@ -0,0 +1,12 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:instance-id-lcaf", + "instance-id": { + "iid": 1, + "mask-length": 32, + "address": "192.0.2.0/32" + } + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv4.json new file mode 100644 index 0000000000..2c6353a79f --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv4.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv6.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv6.json new file mode 100644 index 0000000000..f19e5dfd47 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_ipv6.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:ipv6-prefix-afi", + "ipv6-prefix": "2001:db8::1/128" + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_kv.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_kv.json new file mode 100644 index 0000000000..6f0d3caee5 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_kv.json @@ -0,0 +1,11 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:key-value-address-lcaf", + "key-value-address": { + "key": "192.0.2.1", + "value": "192.0.2.2" + } + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_mac.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_mac.json new file mode 100644 index 0000000000..0005405461 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_mac.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:mac-afi", + "mac": "00:11:22:33:44:55" + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_missing.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_missing.json new file mode 100644 index 0000000000..c406c85eeb --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_missing.json @@ -0,0 +1,8 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.255/32" + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_get-remove_srcdst.json b/csit/variables/lispflowmapping/Be/rpc_get-remove_srcdst.json new file mode 100644 index 0000000000..101a945d58 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_get-remove_srcdst.json @@ -0,0 +1,11 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:source-dest-key-lcaf", + "source-dest-key": { + "source": "192.0.2.1/32", + "dest": "192.0.2.2/32" + } + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_update-key_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_update-key_ipv4.json new file mode 100644 index 0000000000..ce652f783e --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_update-key_ipv4.json @@ -0,0 +1,12 @@ +{ + "input": { + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "mapping-authkey": { + "key-string": "updated-password", + "key-type": 1 + } + } +} diff --git a/csit/variables/lispflowmapping/Be/rpc_update-mapping_ipv4_ipv4.json b/csit/variables/lispflowmapping/Be/rpc_update-mapping_ipv4_ipv4.json new file mode 100644 index 0000000000..edd069cd12 --- /dev/null +++ b/csit/variables/lispflowmapping/Be/rpc_update-mapping_ipv4_ipv4.json @@ -0,0 +1,29 @@ +{ + "input": { + "mapping-record": { + "recordTtl": 1440, + "action": "NoAction", + "authoritative": true, + "eid": { + "address-type": "ietf-lisp-address-types:ipv4-prefix-afi", + "ipv4-prefix": "192.0.2.1/32" + }, + "LocatorRecord": [ + { + "locator-id": "ISP1", + "priority": 1, + "weight": 1, + "multicastPriority": 255, + "multicastWeight": 0, + "localLocator": true, + "rlocProbed": false, + "routed": false, + "rloc": { + "address-type": "ietf-lisp-address-types:ipv4-afi", + "ipv4": "20.20.20.20" + } + } + ] + } + } +} diff --git a/csit/variables/lispflowmapping/rpc_add-key_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-key_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-key_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-key_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_as_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_as_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_as_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_as_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_dn_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_dn_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_dn_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_dn_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_iid_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_iid_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_iid_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_iid_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_ipv4_appdata.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_appdata.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_ipv4_appdata.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_appdata.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_ipv4_elp.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_elp.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_ipv4_elp.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_elp.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_ipv4_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_ipv4_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_ipv4_list.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_list.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_ipv4_list.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv4_list.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_ipv6_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv6_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_ipv6_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_ipv6_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_kv_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_kv_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_kv_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_kv_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_mac_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_mac_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_mac_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_mac_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_add-mapping_srcdst_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_add-mapping_srcdst_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_add-mapping_srcdst_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_add-mapping_srcdst_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_as.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_as.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_as.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_as.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_dn.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_dn.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_dn.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_dn.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_iid.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_iid.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_iid.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_iid.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_ipv6.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_ipv6.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_ipv6.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_ipv6.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_kv.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_kv.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_kv.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_kv.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_mac.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_mac.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_mac.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_mac.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_missing.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_missing.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_missing.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_missing.json diff --git a/csit/variables/lispflowmapping/rpc_get-remove_srcdst.json b/csit/variables/lispflowmapping/Li/rpc_get-remove_srcdst.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_get-remove_srcdst.json rename to csit/variables/lispflowmapping/Li/rpc_get-remove_srcdst.json diff --git a/csit/variables/lispflowmapping/rpc_update-key_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_update-key_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_update-key_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_update-key_ipv4.json diff --git a/csit/variables/lispflowmapping/rpc_update-mapping_ipv4_ipv4.json b/csit/variables/lispflowmapping/Li/rpc_update-mapping_ipv4_ipv4.json similarity index 100% rename from csit/variables/lispflowmapping/rpc_update-mapping_ipv4_ipv4.json rename to csit/variables/lispflowmapping/Li/rpc_update-mapping_ipv4_ipv4.json diff --git a/tools/odl-lispflowmapping-performance-tests/mapping_blaster.py b/tools/odl-lispflowmapping-performance-tests/mapping_blaster.py index 15fc642a0d..2fac5249e6 100755 --- a/tools/odl-lispflowmapping-performance-tests/mapping_blaster.py +++ b/tools/odl-lispflowmapping-performance-tests/mapping_blaster.py @@ -28,53 +28,48 @@ class MappingRPCBlaster(object): getheaders = {'Accept': 'application/json'} RPC_URL_LI = 'restconf/operations/lfm-mapping-database:' - RPC_URL_BE = 'restconf/operations/mappingservice:' + RPC_URL_BE = 'restconf/operations/odl-mappingservice:' TIMEOUT = 10 # Template for adding mappings add_mapping_template = { u'input': { - u'recordTtl': 60, - u'maskLength': 32, - u'authoritative': True, - u'action': u'NoAction', - u'LispAddressContainer': { - u'Ipv4Address': { - u'afi': 1, - u'Ipv4Address': u'10.0.0.0' - } - }, - u'LocatorRecord': [ - { - u'name': u'ipv4:172.16.0.0', - u'priority': 1, - u'weight': 1, - u'multicastPriority': 255, - u'multicastWeight': 0, - u'localLocator': True, - u'rlocProbed': False, - u'routed': True, - u'LispAddressContainer': { - u'Ipv4Address': { - u'afi': 1, - u'Ipv4Address': u'172.16.0.0' + u'mapping-record': { + u'recordTtl': 60, + u'action': u'NoAction', + u'authoritative': True, + u'eid': { + u'address-type': + u'ietf-lisp-address-types:ipv4-prefix-afi', + u'ipv4-prefix': u'10.0.0.0/32' + }, + u'LocatorRecord': [ + { + u'locator-id': u'ipv4:172.16.0.0', + u'priority': 1, + u'weight': 1, + u'multicastPriority': 255, + u'multicastWeight': 0, + u'localLocator': True, + u'rlocProbed': False, + u'routed': True, + u'rloc': { + u'address-type': + u'ietf-lisp-address-types:ipv4-afi', + u'ipv4': u'172.16.0.0' } } - } - ] + ] + } } } # Template for getting mappings get_mapping_template = { u'input': { - u'LispAddressContainer': { - u'Ipv4Address': { - u'afi': 1, - u'Ipv4Address': u'10.0.0.0' - } - }, - u'mask-length': 32 + u'eid': { + u'ipv4-prefix': u'10.0.0.0' + } } } @@ -118,14 +113,13 @@ class MappingRPCBlaster(object): Returns: :return dict: mapping - template modified with the arguments """ - mapping = copy.deepcopy(self.add_mapping_template['input']) - mapping['maskLength'] = mask - mapping['LispAddressContainer']['Ipv4Address']['Ipv4Address'] \ - = str(netaddr.IPAddress(eid)) - mapping['LocatorRecord'][0]['name'] = 'ipv4:' \ + mapping = copy.deepcopy( + self.add_mapping_template['input']['mapping-record']) + mapping['eid']['ipv4-prefix'] = str(netaddr.IPAddress(eid)) \ + + '/' + mask + mapping['LocatorRecord'][0]['locator-id'] = 'ipv4:' \ + str(netaddr.IPAddress(rloc)) - address_container = mapping['LocatorRecord'][0]['LispAddressContainer'] - address_container['Ipv4Address']['Ipv4Address'] \ + mapping['LocatorRecord'][0]['rloc']['ipv4'] \ = str(netaddr.IPAddress(rloc)) return mapping @@ -149,9 +143,9 @@ class MappingRPCBlaster(object): rpc = dict(self.add_mapping_template) increment = pow(2, 32 - int(self.mask)) for i in range(self.nmappings): - rpc['input'] = self.mapping_from_tpl(self.start_eid + i * - increment, self.mask, - self.start_rloc + i) + rpc['input']['mapping-record'] = self.mapping_from_tpl( + self.start_eid + i * increment, self.mask, + self.start_rloc + i) rpc_json = json.dumps(rpc) self.send_rpc(self.session, 'add-mapping', rpc_json) self.session.close() @@ -163,9 +157,8 @@ class MappingRPCBlaster(object): increment = pow(2, 32 - int(self.mask)) for i in range(self.nmappings): eid = self.start_eid + i * increment - rpc['input']['LispAddressContainer']['Ipv4Address']['Ipv4Address']\ - = str(netaddr.IPAddress(eid)) - rpc['input']['mask-length'] = self.mask + rpc['input']['eid']['ipv4-prefix'] = str(netaddr.IPAddress(eid)) \ + + '/' + self.mask rpc_json = json.dumps(rpc) self.send_rpc(self.session, 'get-mapping', rpc_json) self.session.close()