1 # Copyright (c) 2018 Huawei Technologies Co.,Ltd.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
15 | Library | resources.libraries.python.NodePath
16 | Documentation | *Utilities for the path computing, pcap reading*
18 | ... | Utilities for the path computing, pcap file reading and also the port
22 | Path for 2-node testing is set
23 | | [Documentation] | Compute the path for the 2 node testing.
25 | | ... | *Arguments:*
26 | | ... | - dut1_node - DUT1 node. Type: dictionary
27 | | ... | - dut2_node - DUT2 node. Type: dictionary
30 | | ... | - No value returned.
34 | | ... | \| Path for 2-node testing is set \| ${nodes['DUT1']} \
35 | | ... | \| ${nodes['DUT2'] \|
37 | | [Arguments] | ${dut1_node} | ${dut2_node}
38 | | Append Nodes | ${dut1_node} | ${dut2_node}
41 | Pick out the port used to execute test
42 | | [Documentation] | Pick out the port used to execute the test.
44 | | ... | *Arguments:*
45 | | ... | - No arguments.
48 | | ... | - No value returned.
52 | | ... | \| Pick out the port used to execute test \|
54 | | ${dut1_to_dut2_if} | ${dut1_node}= | Next Interface
55 | | ${dut2_to_dut1_if} | ${dut2_node}= | Next Interface
56 | | ${dut1_to_dut2_if_name}= | DMM Get Interface Name
57 | | ... | ${dut1_node} | ${dut1_to_dut2_if}
58 | | ${dut2_to_dut1_if_name}= | DMM Get Interface Name
59 | | ... | ${dut2_node} | ${dut2_to_dut1_if}
60 | | Set Suite Variable | ${dut1_node}
61 | | Set Suite Variable | ${dut2_node}
62 | | Set Suite Variable | ${dut1_to_dut2_if}
63 | | Set Suite Variable | ${dut2_to_dut1_if}
64 | | Set Suite Variable | ${dut1_to_dut2_if_name}
65 | | Set Suite Variable | ${dut2_to_dut1_if_name}