X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fhoneycomb%2Fvxlan_gpe.robot;h=2f2cfc50b4f49c6388d919d3dc1ecf9dc801eff3;hp=3850eb83fa2f50a60336a99d7d487d4a1f130ecf;hb=67f247b4015b76641c6fab7c49e7d9862043c856;hpb=e8c787b699661f00e8358cc711bb20b8993dc87a diff --git a/resources/libraries/robot/honeycomb/vxlan_gpe.robot b/resources/libraries/robot/honeycomb/vxlan_gpe.robot index 3850eb83fa..2f2cfc50b4 100644 --- a/resources/libraries/robot/honeycomb/vxlan_gpe.robot +++ b/resources/libraries/robot/honeycomb/vxlan_gpe.robot @@ -13,9 +13,7 @@ *** Settings *** | Library | resources.libraries.python.InterfaceUtil -| ... | WITH NAME | interfaceCLI | Library | resources.libraries.python.honeycomb.HcAPIKwInterfaces.InterfaceKeywords -| ... | WITH NAME | InterfaceAPI *** Variables *** # Translation table used to convert values received from Honeycomb to values @@ -46,7 +44,7 @@ | | [Arguments] | ${node} | ${interface} | | ... | ${base_settings} | ${vxlan_gpe_settings} | | ... -| | interfaceAPI.Create VxLAN GPE interface +| | Create VxLAN GPE interface | | ... | ${node} | ${interface} | &{base_settings} | &{vxlan_gpe_settings} | Honeycomb removes VxLAN GPE interface @@ -64,9 +62,9 @@ | | ... | | [Arguments] | ${node} | ${interface} | | ... -| | interfaceAPI.Delete interface | ${node} | ${interface} +| | Delete interface | ${node} | ${interface} -| VxLAN GPE configuration from Honeycomb should be +| VxLAN GPE Operational Data From Honeycomb Should Be | | [Documentation] | Uses Honeycomb API to get operational data about the\ | | ... | given interface and compares them to the values provided as arguments. | | ... @@ -78,19 +76,19 @@ | | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| VxLAN GPE configuration from Honeycomb should be \ +| | ... | \| VxLAN GPE Operational Data From Honeycomb Should Be \ | | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${base_params} \ | | ... | \| ${vxlan_gpe_params} \| | | ... | | [Arguments] | ${node} | ${interface} | | ... | ${base_settings} | ${vxlan_gpe_settings} | | ... -| | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} +| | ${api_data}= | Get interface oper data | ${node} | ${interface} | | Should be equal as strings | | ... | ${api_data['name']} | ${base_settings['name']} | | Should be equal as strings | | ... | ${api_data['type']} | v3po:vxlan-gpe-tunnel -| | Run keyword if | '${base_settings['enabled']}' == 'true' +| | Run keyword if | $base_settings['enabled'] == True | | ... | Run keywords | | ... | Should be equal as strings | ${api_data['admin-status']} | up | | ... | AND @@ -101,7 +99,7 @@ | | ... | AND | | ... | Should be equal as strings | ${api_data['oper-status']} | down -| VxLAN GPE configuration from VAT should be +| VxLAN GPE Operational Data From VAT Should Be | | [Documentation] | Uses VAT to get operational data about the given\ | | ... | interface and compares them to the values provided as arguments. | | ... @@ -111,7 +109,7 @@ | | ... | - vxlan_gpe_settings - VxLAN GPE specific parameters. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| VxLAN GPE configuration from VAT should be \ +| | ... | \| VxLAN GPE Operational Data From VAT Should Be \ | | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| ${vxlan_gpe_params} \| | | ... | | [Arguments] | ${node} | ${interface} | ${vxlan_gpe_params} @@ -127,12 +125,15 @@ | | ... | ${vat_data['encap_vrf_id']} | ${vxlan_gpe_params['encap-vrf-id']} | | Should be equal as strings | | ... | ${vat_data['decap_vrf_id']} | ${vxlan_gpe_params['decap-vrf-id']} -| | Should be equal as strings | ${vat_data['protocol']} +# VAT dump multiplies protocol value by 16777216 +| | Should be equal as strings | ${vat_data['protocol']/16777216} | | ... | ${protocols['${vxlan_gpe_params['next-protocol']}']} -| Interface indices should be the same from Honeycomb and VAT -| | [Documentation] | Uses VAT and Honeycomb to get operational data about the\ -| | ... | given interface and compares the interface indexes. +| VxLAN GPE Interface indices from Honeycomb and VAT should correspond +| | [Documentation] | Uses VAT and Honeycomb to get operational data about the \ +| | ... | given VxLAN GPE interface and compares the interface indexes. The \ +| | ... | VxLAN GPE interface index from Honeycomb should be greater than \ +| | ... | index from VAT by one. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary @@ -140,25 +141,42 @@ | | ... | | ... | *Example:* | | ... -| | ... | \| Interface indices should be the same from Honeycomb and VAT \ -| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| +| | ... | \| VxLAN GPE Interface indices from Honeycomb and VAT should \ +| | ... | correspond \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| | | ... | | [Arguments] | ${node} | ${interface} | | ... -| | ${api_data}= | interfaceAPI.Get interface oper data | ${node} | ${interface} +| | ${api_data}= | Get interface oper data | ${node} | ${interface} | | ${vat_data}= | VxLAN GPE Dump | ${node} | ${interface} +| | ${sw_if_index}= | EVALUATE | ${vat_data['sw_if_index']} + 1 | | Should be equal as strings -| | ... | ${api_data['if-index']} | ${vat_data['sw_if_index']} +| | ... | ${api_data['if-index']} | ${sw_if_index} + +| VxLAN GPE Operational Data From Honeycomb Should Be empty +| | [Documentation] | Uses Honeycomb API to get operational data about\ +| | ... | the given interface and expects to fail. +| | ... +| | ... | *Arguments:* +| | ... | - node - information about a DUT node. Type: dictionary +| | ... +| | ... | *Example:* +| | ... | \| VxLAN GPE Operational Data From Honeycomb Should Be empty\ +| | ... | \| ${nodes['DUT1']} \| vxlan_gpe_tunnel0 \| +| | ... +| | [Arguments] | ${node} | ${interface} +| | ... +| | ${api_data}= | Get interface oper data | ${node} | ${interface} +| | Should be empty | ${api_data} -| VxLAN GPE configuration from VAT should be empty +| VxLAN GPE Operational Data From VAT Should Be empty | | [Documentation] | Uses VAT to get operational data about the given\ -| | ... | interface and expects empty dictionary. +| | ... | interface and expects an empty dictionary. | | ... | | ... | *Arguments:* | | ... | - node - information about a DUT node. Type: dictionary | | ... | | ... | *Example:* -| | ... | \| VxLAN GPE configuration from VAT should be empty\ +| | ... | \| VxLAN GPE Operational Data From VAT Should Be empty\ | | ... | \| ${nodes['DUT1']} \| | | ... | | [Arguments] | ${node} @@ -186,5 +204,5 @@ | | ... | ${base_settings} | ${vxlan_gpe_settings} | | ... | | Run keyword and expect error | *HoneycombError*not successful. * code: *00. -| | ... | interfaceAPI.Create VxLAN GPE interface +| | ... | Create VxLAN GPE interface | | ... | ${node} | ${interface} | &{base_settings} | &{vxlan_gpe_settings}