CSIT-424: HC Test: JSON comparison function rework
[csit.git] / resources / libraries / robot / counters.robot
1 # Copyright (c) 2016 Cisco and/or its affiliates.
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:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
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.
13
14 *** Settings ***
15 | Documentation | VPP counters keywords
16 | Library | resources/libraries/python/VppCounters.py
17
18 *** Keywords ***
19 | Clear interface counters on all vpp nodes in topology
20 | | [Documentation] | Clear interface counters on all VPP nodes in topology
21 | | [Arguments] | ${nodes}
22 | | Vpp Nodes Clear Interface Counters | ${nodes}
23
24 | Vpp dump stats
25 | | [Documentation] | Dump stats table on VPP node
26 | | [Arguments] | ${node}
27 | | Vpp Dump Stats Table | ${node}
28
29 | Vpp get interface ipv6 counter
30 | | [Documentation] | Return IPv6 statistics for node interface
31 | | [Arguments] | ${node} | ${interface}
32 | | ${ipv6_counter}= | Vpp Get Ipv6 Interface Counter | ${node} | ${interface}
33 | | [Return] | ${ipv6_counter}
34
35 | Check ipv4 interface counter
36 | | [Documentation] | Check that ipv4 interface counter has right value
37 | | [Arguments] | ${node} | ${interface} | ${value}
38 | | ${ipv4_counter}= | Vpp get ipv4 interface counter | ${node} | ${interface}
39 | | Should Be Equal | ${ipv4_counter} | ${value}
40
41 | Show statistics on all DUTs
42 | | [Documentation] | Show VPP statistics on all DUTs
43 | | Sleep | 10 | Waiting for statistics to be collected
44 | | ${duts}= | Get Matches | ${nodes} | DUT*
45 | | :FOR | ${dut} | IN | @{duts}
46 | | | Vpp show stats | ${nodes['${dut}']}
47
48 | Vpp show stats
49 | | [Documentation] | Show [error, hardware, interface] stats
50 | | [Arguments] | ${node}
51 | | Vpp Show Errors | ${node}
52 | | Vpp Show Hardware Detail | ${node}
53 | | Vpp Show Runtime | ${node}
54
55 | Clear all counters on all DUTs
56 | | [Documentation] | Clear runtime, interface, hardware and error counters
57 | | ... | on all DUTs with VPP instance
58 | | Clear runtime counters on all DUTs
59 | | Clear interface counters on all DUTs
60 | | Clear hardware counters on all DUTs
61 | | Clear errors counters on all DUTs
62
63 | Clear runtime counters on all DUTs
64 | | [Documentation] | Clear VPP runtime counters on all DUTs
65 | | ${duts}= | Get Matches | ${nodes} | DUT*
66 | | :FOR | ${dut} | IN | @{duts}
67 | | | Vpp clear runtime | ${nodes['${dut}']}
68
69 | Clear interface counters on all DUTs
70 | | [Documentation] | Clear VPP interface counters on all DUTs
71 | | ${duts}= | Get Matches | ${nodes} | DUT*
72 | | :FOR | ${dut} | IN | @{duts}
73 | | | Vpp clear interface counters | ${nodes['${dut}']}
74
75 | Clear hardware counters on all DUTs
76 | | [Documentation] | Clear VPP hardware counters on all DUTs
77 | | ${duts}= | Get Matches | ${nodes} | DUT*
78 | | :FOR | ${dut} | IN | @{duts}
79 | | | Vpp clear hardware counters | ${nodes['${dut}']}
80
81 | Clear errors counters on all DUTs
82 | | [Documentation] | Clear VPP errors counters on all DUTs
83 | | ${duts}= | Get Matches | ${nodes} | DUT*
84 | | :FOR | ${dut} | IN | @{duts}
85 | | | Vpp clear errors counters | ${nodes['${dut}']}
86
87 | Show runtime counters on all DUTs
88 | | [Documentation] | Show VPP runtime counters on all DUTs
89 | | ${duts}= | Get Matches | ${nodes} | DUT*
90 | | :FOR | ${dut} | IN | @{duts}
91 | | | Vpp show runtime | ${nodes['${dut}']}