X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Fdefault.robot;h=f734516005f3a9749e5ccfc187bfd20c9568131d;hb=89620b26d6bbf3dd9d9707851d8d140471d40b56;hp=97b2ed62f99560ff55fc0b77baaaf223c89e1a2b;hpb=76349c39381556bfdada101a8637f66b561276e2;p=csit.git diff --git a/resources/libraries/robot/shared/default.robot b/resources/libraries/robot/shared/default.robot index 97b2ed62f9..f734516005 100644 --- a/resources/libraries/robot/shared/default.robot +++ b/resources/libraries/robot/shared/default.robot @@ -91,9 +91,35 @@ | | | Crypto Device Verify | ${nodes['${dut}']} | force_init=${force_init} | | | ... | numvfs=${numvfs} +| Configure AVF interfaces on all DUTs +| | [Documentation] | Configure virtual functions for AVF interfaces on PCI +| | ... | interface on all DUTs. +| | ... +| | ... | *Arguments:* +| | ... | - numvfs - Number of VFs to initialize, 0 - disable the VFs +| | ... | (Optional). Type: integer, default value: ${1} +| | ... | - topology_type - Topology type. +| | ... | (Optional). Type: string, default value: L2 +| | ... +| | ... | *Example:* +| | ... +| | ... | \| Configure AVF device on all DUTs \| ${1} \| L2 \| +| | ... +| | [Arguments] | ${numvfs}=${1} | ${topology_type}=L2 +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | ${if1_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if1} +| | | ... | numvfs=${numvfs} | topology_type=${topology_type} +| | | ${if2_avf_arr}= | Init AVF interface | ${nodes['${dut}']} | ${${dut}_if2} +| | | ... | numvfs=${numvfs} | topology_type=${topology_type} +# Currently only one AVF is supported. +| | | Set Suite Variable | ${${dut}_if1_vf0} | ${if1_avf_arr[0]} +| | | Set Suite Variable | ${${dut}_if2_vf0} | ${if2_avf_arr[0]} + | Configure kernel module on all DUTs | | [Documentation] | Verify if specific kernel module is loaded on all DUTs. -| | ... | If parameter force_load is set to True, then try to initialize. +| | ... | If parameter force_load is set to True, then try to load. | | ... | | ... | *Arguments:* | | ... | - module - Module to verify. Type: string @@ -105,10 +131,8 @@ | | ... | | [Arguments] | ${module} | ${force_load}=${False} | | ... -| | ${duts}= | Get Matches | ${nodes} | DUT* -| | :FOR | ${dut} | IN | @{duts} -| | | Kernel Module Verify | ${nodes['${dut}']} | ${module} -| | | ... | force_load=${force_load} +| | Verify Kernel Module on All DUTs | ${nodes} | ${module} +| | ... | force_load=${force_load} | Create base startup configuration of VPP on all DUTs | | [Documentation] | Create base startup configuration of VPP to all DUTs. @@ -156,8 +180,18 @@ | | ${num_mbufs_int} | Convert to Integer | 16384 | | ${duts}= | Get Matches | ${nodes} | DUT* | | :FOR | ${dut} | IN | @{duts} -| | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} -| | | ... | ${${dut}_if1} | ${${dut}_if2} +| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error +| | | ... | Variable Should Exist | ${${dut}_if1} +| | | @{if_list}= | Run Keyword If | '${if1_status}' == 'PASS' +| | | ... | Create List | ${${dut}_if1} +| | | ... | ELSE | Create List | ${${dut}_if1_1} | ${${dut}_if1_2} +| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error +| | | ... | Variable Should Exist | ${${dut}_if2} +| | | Run Keyword If | '${if2_status}' == 'PASS' +| | | ... | Append To List | ${if_list} | ${${dut}_if2} +| | | ... | ELSE +| | | ... | Append To List | ${if_list} | ${${dut}_if2_1} | ${${dut}_if2_2} +| | | ${numa}= | Get interfaces numa node | ${nodes['${dut}']} | @{if_list} | | | ${smt_used}= | Is SMT enabled | ${nodes['${dut}']['cpuinfo']} | | | ${cpu_main}= | Cpu list per node str | ${nodes['${dut}']} | ${numa} | | | ... | skip_cnt=${1} | cpu_cnt=${1} @@ -182,6 +216,7 @@ | | | Set Tags | ${thr_count_int}T${cpu_count_int}C | | Set Test Variable | ${smt_used} | | Set Test Variable | ${thr_count_int} +| | Set Test Variable | ${cpu_count_int} | | Set Test Variable | ${rxq_count_int} | Create Kubernetes VSWITCH startup config on all DUTs @@ -230,6 +265,7 @@ | | | Set Tags | ${thr_count_int}T${cpu_count_int}C | | Set Test Variable | ${smt_used} | | Set Test Variable | ${thr_count_int} +| | Set Test Variable | ${cpu_count_int} | | Set Test Variable | ${rxq_count_int} | Create Kubernetes VNF'${i}' startup config on all DUTs @@ -258,6 +294,13 @@ | | :FOR | ${dut} | IN | @{duts} | | | Run keyword | ${dut}.Add DPDK No Multi Seg +| Add DPDK no PCI to all DUTs +| | [Documentation] | Add DPDK no-pci to VPP startup configuration to all DUTs. +| | ... +| | ${duts}= | Get Matches | ${nodes} | DUT* +| | :FOR | ${dut} | IN | @{duts} +| | | Run keyword | ${dut}.Add DPDK no PCI + | Add DPDK dev default RXD to all DUTs | | [Documentation] | Add DPDK num-rx-desc to VPP startup configuration to all | | ... | DUTs.