CSIT-768: Refactor Python container libraries
[csit.git] / resources / libraries / robot / shared / 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
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 | Check ipv4 interface counter
25 | | [Documentation] | Check that ipv4 interface counter has right value
26 | | [Arguments] | ${node} | ${interface} | ${value}
27 | | ${ipv4_counter}= | Vpp get ipv4 interface counter | ${node}
28 | | ... | ${interface}
29 | | Should Be Equal | ${ipv4_counter} | ${value}
30
31 | Clear all counters on all DUTs
32 | | [Documentation] | Clear runtime, interface, hardware and error counters
33 | | ... | on all DUTs with VPP instance
34 | | Clear runtime counters on all DUTs | ${nodes}
35 | | Clear interface counters on all DUTs | ${nodes}
36 | | Clear hardware counters on all DUTs | ${nodes}
37 | | Clear error counters on all DUTs | ${nodes}