aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
AgeCommit message (Collapse)AuthorFilesLines
2017-02-02Refactor fragile msg macro W and W2 to not burry return control flow.Jon Loeliger1-1/+3
Instead, have them accept and assign a return paramter leaving the return control flow up to the caller. Clean up otherwise misleading returns present even after "NOT REACHED" comments. Change-Id: I0861921f73ab65d55b95eabd27514f0129152723 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-02-02Convert message macro S to accept a message pointer parameter;Jon Loeliger1-1/+1
Rather than blindly assume an unbound, fixed message parameter explicilty pass it as a paramter to the S() macro. Change-Id: Ieea1f1815cadd2eec7d9240408d69acdc3caa49a Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-02-02Ensure all M() and M2() second parameters are the message pointer.Jon Loeliger1-1/+1
Rather than maintain (?) an unused second parameter, t, and pull an unbound message pointer, mp, out of context, explicitly list the message pointer as the second parameter. Change-Id: I92143efda6211cdf6b935470f8c71579742a6b64 Signed-off-by: Jon Loeliger <jdl@netgate.com>
2017-01-28Add files to CLEANFILES for robust make clean.Burt Silverman1-0/+2
At the least, $(BUILT_SOURCES) should be added to CLEANFILES. Also beneficial is $(api_DATA), and in the case of Java, *.files and *.h. Also there is a vpp/app/version.h, and some grammar and lex files in vppapigen. Change-Id: Ic6d3f2d40ce65e1d9a8b88217fa1f36de393ebb4 Signed-off-by: Burt Silverman <burtms@gmail.com>
2017-01-25Repair plugin binary API message numberingDave Barach1-0/+2
Change-Id: I422a3f168bd483e011cfaf54af022cb79b78db02 Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-23binary-api debug CLI works with pluginsDave Barach1-36/+1
Change-Id: I81f33f5153d5afac94b66b5a8cb91da77463af79 Signed-off-by: Dave Barach <dave@barachs.net>
2017-01-17sample-plugin: fix buildDamjan Marion2-2/+2
Change-Id: I8a2c91c4148981db31317ef9d2c5c2c28942daa9 Signed-off-by: Damjan Marion <damarion@cisco.com>
2017-01-01Move java,lua api and remaining plugins to src/Damjan Marion9-0/+951
Change-Id: I1c3b87e886603678368428ae56a6bd3327cbc90d Signed-off-by: Damjan Marion <damarion@cisco.com>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion4-0/+1351
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>
f='#n84'>84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180
# Copyright (c) 2017 Cisco and/or its affiliates.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

*** Variables ***
# IP addresses for IPv6 link
| ${tg_to_dut_if2_ip}= | fd00:1234::1
| ${dut_to_tg_if2_ip}= | fd00:1234::2
| ${ipv6_prefix}= | ${64}
# Configuration which will be set and verified during tests.
| ${bd1_name}= | bd-01
| ${bd2_name}= | bd-02
| &{bd_settings}= | flood=${True} | forward=${True} | learn=${True}
| ... | unknown-unicast-flood=${True} | arp-termination=${True}
| &{if_settings}= | split_horizon_group=${1} | bvi=${False}
| &{if_settings2}= | split_horizon_group=${2} | bvi=${True}
| ${vhost_interface}= | test_vhost
| &{vhost_user_server}= | socket=/tmp/soc1 | role=server
| &{vhost_user_server_edit_1}= | socket=/tmp/soc12 | role=server
| &{vhost_user_server_edit_2}= | socket=/tmp/soc12 | role=client

*** Settings ***
| Library | resources.libraries.python.honeycomb.IPv6Management
| Library | resources.libraries.python.VPPUtil
| Resource | resources/libraries/robot/shared/default.robot
| Resource | resources/libraries/robot/honeycomb/honeycomb.robot
| Resource | resources/libraries/robot/honeycomb/interfaces.robot
| Resource | resources/libraries/robot/honeycomb/bridge_domain.robot
| Resource | resources/libraries/robot/honeycomb/ipv6_control.robot
| Resource | resources/libraries/robot/shared/testing_path.robot
| Resource | resources/libraries/robot/honeycomb/netconf.robot
| Resource | resources/libraries/robot/honeycomb/vhost_user.robot
| Variables | resources/test_data/honeycomb/netconf/triggers.py
| ...
| Suite Setup | Set Up Honeycomb Functional Test Suite | ${node}
| ...
| Suite Teardown | Run Keywords
| ... | Unconfigure IPv6 Management Interface | AND
| ... | Tear Down Honeycomb Functional Test Suite | ${node}
| ...
| Force Tags | HC_FUNC | HC_REST_ONLY
| ...
| Documentation | *Honeycomb IPv6 control interface test suite.*

*** Test Cases ***
| TC01: Honeycomb sets up l2 bridge domain
| | [Documentation] | Check if Honeycomb can create bridge domains on VPP node.
| | ...
| | [Setup] | Configure IPv6 Management Interface
| | When Honeycomb creates first l2 bridge domain
| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings}
| | Then Bridge domain Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings}

| TC02: Honeycomb removes bridge domains
| | [Documentation] | Check if Honeycomb can remove bridge domains from a VPP\
| | ... | node.
| | ...
| | Given Bridge domain Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${bd1_name} | ${bd_settings}
| | When Honeycomb removes all bridge domains | ${tunneled_node}
| | Then Honeycomb should show no bridge domains | ${tunneled_node}

| TC03: Honeycomb creates vhost-user interface - server
| | [Documentation] | Check if Honeycomb creates a vhost-user interface, role:\
| | ... | server.
| | ...
| | Given vhost-user Operational Data From Honeycomb Should Be empty
| | ... | ${tunneled_node} | ${vhost_interface}
| | When Honeycomb creates vhost-user interface
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}
| | Then vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}

| TC04: Honeycomb modifies vhost-user interface - server
| | [Documentation] | Check if Honeycomb can modify properties of existing\
| | ... | vhost-user interface, role: server.
| | ...
| | Given vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}
| | When Honeycomb configures vhost-user interface
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1}
| | Then vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_1}
| | When Honeycomb configures vhost-user interface
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2}
| | Then vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server_edit_2}
| | When Honeycomb configures vhost-user interface
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}
| | Then vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}

| TC05: Honeycomb deletes vhost-user interface - server
| | [Documentation] | Check if Honeycomb can delete an existing vhost-user\
| | ... | interface, role: server.
| | ...
| | Given vhost-user Operational Data From Honeycomb Should Be
| | ... | ${tunneled_node} | ${vhost_interface} | ${vhost_user_server}
| | When Honeycomb removes vhost-user interface
| | ... | ${tunneled_node} | ${vhost_interface}
| | Then vhost-user Operational Data From Honeycomb Should Be empty
| | ... | ${tunneled_node} | ${vhost_interface}

| TC06: Honeycomb can create and delete interfaces
| | [Documentation] | Repeatedly create and delete an interface through Netconf\
| | ... | and check the reply for any errors.
| | ...
| | Given Netconf session should be established | ${tunneled_node}
| | And Honeycomb creates first L2 bridge domain
| | ... | ${tunneled_node} | bd_netconf | ${bd_settings}
| | :FOR | ${index} | IN RANGE | 20
| | | When Error trigger is sent | ${trigger_105}
| | | Then Replies should not contain RPC errors

| TC07: Honeycomb can create vlan subinterface
| | [Documentation] | Configure a Vlan sub-interface under a physical interface.
| | ...
| | Given Netconf session should be established | ${tunneled_node}
| | When Error Trigger Is Sent
| | ... | ${trigger_vlan} | interface=${interface}
| | Then Replies should not contain RPC errors

*** Keywords ***
| Configure IPv6 Management Interface
| | [Documentation] | Change one of VPP's data-plane interfaces on DUT into\
| | ... | a control-plane interface that Honeycomb can listen on. Setup IPv6\
| | ... | addresses on the link. Create an IPv4 to IPv6 tunnel on TG and create\
| | ... | suite variables.
| | ...
| | Configure path in 2-node circular topology
| | ... | ${nodes['TG']} | ${nodes['DUT1']} | ${nodes['TG']}
| | Stop VPP service on DUT | ${dut_node}
| | Stop Honeycomb Service on DUTs | ${dut_node}
| | Convert data-plane interface to control-plane
| | ... | ${dut_node} | ${dut_to_tg_if2}
| | Sleep | 5sec | Wait until Linux reclaims the interface.
| | ${tg_to_dut_if2_name}= | Get Interface Name by MAC
| | ... | ${tg_node} | ${tg_to_dut_if2_mac}
| | ${dut_to_tg_if2_name}= | Get Interface Name by MAC
| | ... | ${dut_node} | ${dut_to_tg_if2_mac}
| | ${tunneled_node}= | Copy Dictionary | ${dut_node}
| | Set To Dictionary | ${tunneled_node} | host | ${tg_node['host']}
| | ${interface}= | Get Interface Name | ${dut_node} | ${dut_to_tg_if1}
| | Set Suite Variable | ${interface}
| | Set Suite Variable | ${tunneled_node}
| | Set Suite Variable | ${tg_node}
| | Set Suite Variable | ${dut_node}
| | Set Suite Variable | ${dut_to_tg_if2}
| | Set Suite Variable | ${dut_to_tg_if2_name}
| | Set Suite Variable | ${tg_to_dut_if2_name}
| | Set management interface address
| | ... | ${tg_node} | ${tg_to_dut_if2_name}
| | ... | ${tg_to_dut_if2_ip} | ${ipv6_prefix}
| | Set management interface address
| | ... | ${dut_node} | ${dut_to_tg_if2_name}
| | ... | ${dut_to_tg_if2_ip} | ${ipv6_prefix}
| | Configure Control Interface Tunnel
| | ... | ${tg_node} | ${dut_node['honeycomb']['port']}
| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['port']}
| | Configure Control Interface Tunnel
| | ... | ${tg_node} | ${dut_node['honeycomb']['netconf_port']}
| | ... | ${dut_to_tg_if2_ip} | ${dut_node['honeycomb']['netconf_port']}
| | Start VPP service on DUT | ${dut_node}
| | Configure Honeycomb service on DUTs | ${dut_node}

| Unconfigure IPv6 Management Interface
| | [Documentation] | Remove all IP addresses from interfaces in the IPv6 link.
| | ...
| | Clear Interface Configuration | ${tg_node} | ${tg_to_dut_if2_name}
| | Clear Interface Configuration | ${dut_node} | ${dut_to_tg_if2_name}