X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Frobot%2Fshared%2Finterfaces.robot;h=128c3cb568c6c7acca2e22ede031a2d13a36e5cf;hp=3d2b70d065cfcda528831d08920b24ef5c26a376;hb=refs%2Fchanges%2F06%2F20706%2F53;hpb=f99c79a4035787aff0db70498d022095caa44043 diff --git a/resources/libraries/robot/shared/interfaces.robot b/resources/libraries/robot/shared/interfaces.robot index 3d2b70d065..128c3cb568 100644 --- a/resources/libraries/robot/shared/interfaces.robot +++ b/resources/libraries/robot/shared/interfaces.robot @@ -21,47 +21,61 @@ | | ... | *Set UP state on VPP interfaces in path on all DUT nodes and set | | ... | maximal MTU.* | | +| | FOR | ${dut} | IN | @{duts} +| | | Set interfaces in path up on DUT | ${dut} +| | END +| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} + +| Set interfaces in path up on DUT +| | [Documentation] +| | ... | *Set UP state on VPP interfaces in path on specified DUT node and +| | ... | set maximal MTU.* +| | +| | ... | *Arguments:* +| | ... | - dut - DUT node on which to set the interfaces up. +| | ... | Type: string +| | +| | ... | *Example:* +| | +| | ... | \| Set interfaces in path up on DUT \| DUT1 \| +| | +| | [Arguments] | ${dut} # TODO: Rework KW to set all interfaces in path UP and set MTU (including # software interfaces. Run KW at the start phase of VPP setup to split # from other "functional" configuration. This will allow modularity of this # library -| | FOR | ${dut} | IN | @{duts} -| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error -| | | ... | Variable Should Exist | ${${dut}_if1} -| | | Run Keyword If | '${if1_status}' == 'PASS' -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up -| | | ... | ELSE -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up -| | | Run Keyword Unless | '${if1_status}' == 'PASS' -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up -| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error -| | | ... | Variable Should Exist | ${${dut}_if2} -| | | Run Keyword If | '${if2_status}' == 'PASS' -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up -| | | ... | ELSE -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up -| | | Run Keyword Unless | '${if2_status}' == 'PASS' -| | | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up -| | END -| | FOR | ${dut} | IN | @{duts} -| | | ${if1_status} | ${value}= | Run Keyword And Ignore Error -| | | ... | Variable Should Exist | ${${dut}_if1} -| | | Run Keyword If | '${if1_status}' == 'PASS' -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1} -| | | ... | ELSE -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1} -| | | Run Keyword Unless | '${if1_status}' == 'PASS' -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2} -| | | ${if2_status} | ${value}= | Run Keyword And Ignore Error -| | | ... | Variable Should Exist | ${${dut}_if2} -| | | Run Keyword If | '${if2_status}' == 'PASS' -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2} -| | | ... | ELSE -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1} -| | | Run Keyword Unless | '${if2_status}' == 'PASS' -| | | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2} -| | END -| | All VPP Interfaces Ready Wait | ${nodes} | retries=${300} +| | ${if1_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${${dut}_if1} +| | Run Keyword If | '${if1_status}' == 'PASS' +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1} | up +| | ... | ELSE +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_1} | up +| | Run Keyword Unless | '${if1_status}' == 'PASS' +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if1_2} | up +| | ${if2_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${${dut}_if2} +| | Run Keyword If | '${if2_status}' == 'PASS' +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2} | up +| | ... | ELSE +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_1} | up +| | Run Keyword Unless | '${if2_status}' == 'PASS' +| | ... | Set Interface State | ${nodes['${dut}']} | ${${dut}_if2_2} | up +| | ${if1_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${${dut}_if1} +| | Run Keyword If | '${if1_status}' == 'PASS' +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1} +| | ... | ELSE +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_1} +| | Run Keyword Unless | '${if1_status}' == 'PASS' +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if1_2} +| | ${if2_status} | ${value}= | Run Keyword And Ignore Error +| | ... | Variable Should Exist | ${${dut}_if2} +| | Run Keyword If | '${if2_status}' == 'PASS' +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2} +| | ... | ELSE +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_1} +| | Run Keyword Unless | '${if2_status}' == 'PASS' +| | ... | VPP Set Interface MTU | ${nodes['${dut}']} | ${${dut}_if2_2} | Set single interfaces in path up | | [Documentation]