22a65b2e399570fea820e280d0f15e5099c17613
[csit.git] / tests / vpp / func / honeycomb / mgmt-notif-apihcnc-func.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 *** Variables ***
15 # Interfaces to run tests on.
16 | ${interface}= | ${node['interfaces']['port1']['name']}
17 | ${tap_interface}= | tap_test
18 | &{tap_settings}= | tap-name=tap_test | mac=08:00:27:c0:5d:37
19 | ... | device-instance=${1}
20
21 *** Settings ***
22 | Resource | resources/libraries/robot/shared/default.robot
23 | Resource | resources/libraries/robot/honeycomb/honeycomb.robot
24 | Resource | resources/libraries/robot/honeycomb/interfaces.robot
25 | Resource | resources/libraries/robot/honeycomb/tap.robot
26 | Resource | resources/libraries/robot/honeycomb/notifications.robot
27 | ...
28 | Documentation | *Honeycomb notifications test suite.*
29 | ...
30 | Suite Setup | Set Up Honeycomb Notifications Functional Test Suite
31 | ...
32 | Suite Teardown | Tear Down Honeycomb Functional Test Suite | ${node}
33 | ...
34 # HC2VPP-203 Notifications are not being sent since VPP 17.10
35 | Force Tags | HC_FUNC | EXPECTED_FAILING
36
37 *** Test Cases ***
38 | TC01: Honeycomb sends notification on interface state change
39 | | [Documentation] | Check if Honeycomb sends a state-changed notification\
40 | | ... | when the state of an interface is changed.
41 | | ...
42 | | Given Interface state from Honeycomb should be
43 | | ... | ${node} | ${interface} | down
44 | | And Interface state from VAT should be | ${node} | ${interface} | down
45 | | And Notification listener should be established | ${node}
46 | | When Honeycomb configures interface state | ${node} | ${interface} | up
47 | | Then Honeycomb should send interface state notification | ${interface} | up
48 | | When Honeycomb configures interface state | ${node} | ${interface} | down
49 | | And Honeycomb should send interface state notification | ${interface} | down
50
51 | TC02: Honeycomb sends notification on interface deletion
52 | | [Documentation] | Check if Honeycomb sends an interface-deleted notification
53 | | ... | when an interface is deleted.
54 | | ...
55 | | Given TAP Operational Data From Honeycomb Should Be
56 | | ... | ${node} | ${tap_interface} | ${tap_settings}
57 | | And TAP Operational Data From VAT Should Be
58 | | ... | ${node} | ${tap_interface} | ${tap_settings}
59 | | And Notification listener should be established | ${node}
60 | | When Honeycomb removes TAP interface | ${node} | ${tap_interface}
61 | | Then Honeycomb should send interface deleted notification | ${tap_interface}
62
63 *** Keywords ***
64 | Set Up Honeycomb Notifications Functional Test Suite
65 | | Set Up Honeycomb Functional Test Suite | ${node}
66 | | Honeycomb configures interface state
67 | | ... | ${node} | ${interface} | down
68 | | Honeycomb creates TAP interface
69 | | ... | ${node} | ${tap_interface} | ${tap_settings}