Skip to content

Commit

Permalink
remove agent-ctl and kafka (#1345)
Browse files Browse the repository at this point in the history
Signed-off-by: AndrejKilvady <[email protected]>
  • Loading branch information
AndrejKilvady authored May 17, 2019
1 parent 6b04f63 commit b421a31
Show file tree
Hide file tree
Showing 18 changed files with 0 additions and 99 deletions.
61 changes: 0 additions & 61 deletions tests/robot/libraries/docker.robot
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,6 @@ Add Agent Node Again
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec ${node} bash -c 'echo $HOSTNAME'
Set Suite Variable ${${node}_again_HOSTNAME} ${hostname}

Add Agent Node With Kafka
[Arguments] ${node}
Open SSH Connection ${node} ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine ${node} ${DOCKER_COMMAND} create -e MICROSERVICE_LABEL=${node} --sysctl net.ipv6.conf.all.disable_ipv6=0 -it -p ${${node}_REST_API_HOST_PORT}:${${node}_REST_API_PORT} --name ${node} ${${node}_DOCKER_IMAGE} bash
#Execute On Machine ${node} ${DOCKER_COMMAND} create -e MICROSERVICE_LABEL=${node} -it -p ${${node}_PING_HOST_PORT}:${${node}_PING_PORT} -p ${${node}_REST_API_HOST_PORT}:${${node}_REST_API_PORT} --name ${node} ${${node}_DOCKER_IMAGE}
Write To Machine ${node} ${DOCKER_COMMAND} start ${node}
Append To List ${NODES} ${node}
Create Session ${node} http://${DOCKER_HOST_IP}:${${node}_REST_API_HOST_PORT}
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec ${node} bash -c 'echo $HOSTNAME'
Set Suite Variable ${${node}_HOSTNAME} ${hostname}

Add Agent Node With Kafka Again
[Arguments] ${node}
Open SSH Connection ${node}_again ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine ${node}_again ${DOCKER_COMMAND} create -e MICROSERVICE_LABEL=${node} --sysctl net.ipv6.conf.all.disable_ipv6=0 -it -p ${${node}_AGAIN_REST_API_HOST_PORT}:${${node}_AGAIN_REST_API_PORT} --name ${node}_again ${${node}_DOCKER_IMAGE} bash
#Execute On Machine ${node} ${DOCKER_COMMAND} create -e MICROSERVICE_LABEL=${node} -it -p ${${node}_PING_HOST_PORT}:${${node}_PING_PORT} -p ${${node}_REST_API_HOST_PORT}:${${node}_REST_API_PORT} --name ${node} ${${node}_DOCKER_IMAGE}
Write To Machine ${node}_again ${DOCKER_COMMAND} start ${node}_again
Append To List ${NODES} ${node}_again
Create Session ${node}_again http://${DOCKER_HOST_IP}:${${node}_REST_API_HOST_PORT}
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec ${node} bash -c 'echo $HOSTNAME'
Set Suite Variable ${${node}_again_HOSTNAME} ${hostname}


Add Agent VPP Node
[Arguments] ${node} ${vswitch}=${FALSE}
${add_params}= Set Variable If ${vswitch} --pid=host -v "/var/run/docker.sock:/var/run/docker.sock" ${EMPTY}
Expand Down Expand Up @@ -92,22 +69,6 @@ Add Agent VPP Node With Own Vpp Config
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec ${node} bash -c 'echo $HOSTNAME'
Set Suite Variable ${${node}_HOSTNAME} ${hostname}

Add Agent VPP Node With Kafka
[Arguments] ${node} ${vswitch}=${FALSE}
${add_params}= Set Variable If ${vswitch} --pid=host -v "/var/run/docker.sock:/var/run/docker.sock" ${EMPTY}
Open SSH Connection ${node} ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine ${node} ${DOCKER_COMMAND} create -e MICROSERVICE_LABEL=${node} -e VPP_STATUS_PUBLISHERS=etcd -e INITIAL_LOGLVL=debug --sysctl net.ipv6.conf.all.disable_ipv6=0 -it --privileged -v "${VPP_AGENT_HOST_MEMIF_SOCKET_FOLDER}:${${node}_MEMIF_SOCKET_FOLDER}" -v "${DOCKER_SOCKET_FOLDER}:${${node}_SOCKET_FOLDER}" -p ${${node}_VPP_HOST_PORT}:${${node}_VPP_PORT} -p ${${node}_REST_API_HOST_PORT}:${${node}_REST_API_PORT} --name ${node} ${add_params} ${${node}_DOCKER_IMAGE}
Write To Machine ${node} ${DOCKER_COMMAND} start ${node}
Append To List ${NODES} ${node}
Open SSH Connection ${node}_term ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Open SSH Connection ${node}_vat ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
vpp_term: Open VPP Terminal ${node}
vat_term: Open VAT Terminal ${node}
Create Session ${node} http://${DOCKER_HOST_IP}:${${node}_REST_API_HOST_PORT}
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec ${node} bash -c 'echo $HOSTNAME'
Set Suite Variable ${${node}_HOSTNAME} ${hostname}


Add Agent Libmemif Node
[Arguments] ${node}
Open SSH Connection ${node} ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Expand Down Expand Up @@ -280,35 +241,13 @@ Update Agent In Dev Container
Write To Container Until Prompt dev make
Write To Container Until Prompt dev make install

Start Kafka Server
Open SSH Connection kafka ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine kafka ${KAFKA_SERVER_CREATE}
${out}= Write To Machine Until String kafka ${DOCKER_COMMAND} start -i kafka INFO success: kafka entered RUNNING state
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec kafka bash -c 'echo $HOSTNAME'
Set Suite Variable ${KAFKA_HOSTNAME} ${hostname}

Stop Kafka Server
Execute On Machine docker ${KAFKA_SERVER_DESTROY}

Start VPP Ctl Container
[Arguments] ${command}=bash
Open SSH Connection vpp_agent_ctl ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine vpp_agent_ctl ${DOCKER_COMMAND} create -it --name vpp_agent_ctl ${VPP_AGENT_CTL_IMAGE_NAME} ${command}
Write To Machine vpp_agent_ctl ${DOCKER_COMMAND} start -i vpp_agent_ctl
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec vpp_agent_ctl bash -c 'echo $HOSTNAME'
Set Suite Variable ${VPP_AGENT_CTL_HOSTNAME} ${hostname}

Stop VPP Ctl Container
Execute On Machine docker ${DOCKER_COMMAND} rm -f vpp_agent_ctl

Start SFC Controller Container With Own Config
[Arguments] ${config}
Open SSH Connection sfc_controller ${DOCKER_HOST_IP} ${DOCKER_HOST_USER} ${DOCKER_HOST_PSWD}
Execute On Machine sfc_controller ${DOCKER_COMMAND} create -it --name sfc_controller ${SFC_CONTROLLER_IMAGE_NAME}
SSHLibrary.Put_file ${DATA_FOLDER}/${config} /tmp/
Execute On Machine sfc_controller ${DOCKER_COMMAND} cp /tmp/${config} sfc_controller:${SFC_CONTROLLER_CONF_PATH}
Write To Machine sfc_controller ${DOCKER_COMMAND} start -i sfc_controller
#Sleep 400s
${hostname}= Execute On Machine docker ${DOCKER_COMMAND} exec sfc_controller sh -c 'echo $HOSTNAME'
Set Suite Variable ${SFC_CONTROLLER_HOSTNAME} ${hostname}

Expand Down
12 changes: 0 additions & 12 deletions tests/robot/libraries/setup-teardown.robot
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ Testsuite Setup
Enable SSH Logging ${OUTPUTDIR}/ssh.log
Open Connection To Docker Host
Create Connections For ETCD And Kafka
#Start Kafka Server
Start ETCD Server
#Run Keyword If "${CTL_TOOL}"== "vppctl" Start VPP Ctl Container
Start VPP Ctl Container
Get Env And SW Version docker
Make Datastore Snapshots startup

Expand All @@ -37,9 +34,6 @@ Testsuite Teardown
Make Datastore Snapshots teardown
Remove All Nodes
Stop ETCD Server
#Run Keyword If "${CTL_TOOL}"== "vppctl" Stop VPP Ctl Container
Stop VPP Ctl Container
#Stop Kafka Server
Get Connections
Close All Connections
Check Agent Logs For Errors
Expand All @@ -48,17 +42,11 @@ Testsuite Teardown
Test Setup
Open Connection To Docker Host
Create Connections For ETCD And Kafka
#Start Kafka Server
Start ETCD Server
#Run Keyword If "${CTL_TOOL}"== "vppctl" Start VPP Ctl Container
Start VPP Ctl Container
Make Datastore Snapshots startup

Test Teardown
Make Datastore Snapshots teardown
#Run Keyword If "${CTL_TOOL}"== "vppctl" Stop VPP Ctl Container
Stop VPP Ctl Container
#Stop Kafka Server
Stop ETCD Server
Remove All Nodes
Get Connections
Expand Down
1 change: 0 additions & 1 deletion tests/robot/suites/api/BFD/bfd_api.robot
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ Check Interfaces On VPP2
# Write To Machine agent_vpp_2_term show err
# vat_term: Interfaces Dump agent_vpp_1
# vat_term: Interfaces Dump agent_vpp_2
# Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
# Execute In Container agent_vpp_1 ip a
# Execute In Container agent_vpp_2 ip a

Expand Down
1 change: 0 additions & 1 deletion tests/robot/suites/crudIPv6/linux_ip_route_crudIPv6.robot
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Configure Environment

Show Interfaces Before Setup
vpp_term: Show Interfaces agent_vpp_1
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps

Setup Interfaces
etcdctl.Put Veth Interface Via Linux Plugin node=agent_vpp_1 namespace=ns1 name=ns1_veth1 host_if_name=ns1_veth1_linux mac=d2:74:8c:12:67:d2 peer=ns2_veth2 ip=${VETH_IP1} prefix=64
Expand Down
2 changes: 0 additions & 2 deletions tests/robot/suites/misc/etcd_clear.robot
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ Show Interfaces And Other Objects After Config
Write To Machine agent_vpp_2_term show err
vat_term: Interfaces Dump agent_vpp_1
vat_term: Interfaces Dump agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container agent_vpp_2 ip a

Expand Down Expand Up @@ -234,7 +233,6 @@ Final Sleep After Resync For Manual Checking
Sleep ${RESYNC_SLEEP}


*** Keywords ***
*** Keywords ***
TestSetup
Make Datastore Snapshots ${TEST_NAME}_test_setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ Show Interfaces And Other Objects After Resync
vat_term: Interfaces Dump agent_vpp_1
vat_term: Interfaces Dump agent_vpp_2
vat_term: Interfaces Dump agent_vpp_3
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container agent_vpp_2 ip a
Execute In Container agent_vpp_3 ip a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ Show Interfaces And Other Objects After Config
Write To Machine agent_vpp_2_term show err
vat_term: Interfaces Dump agent_vpp_1
vat_term: Interfaces Dump agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container agent_vpp_2 ip a

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ Configure Environment 2
Show Interfaces Before Setup 2
vpp_term: Show Interfaces agent_vpp_1
vpp_term: Show Interfaces agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps

Add Static Route From VPP1 Linux To VPP2 2
Put Linux Route node=agent_vpp_1 namespace=${EMPTY} interface=${NAME_VPP1_TAP1} routename=${NAME_VPP1_LINUX_TO_VPP2} ip=${IP_VPP2_TAP1_NETWORK} next_hop=${EMPTY}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ Start Containers And Add Nodes
Configure Environment 2
[Tags] setup
Configure Environment 1

Show Interfaces Before Setup 2
vpp_term: Show Interfaces agent_vpp_1
vpp_term: Show Interfaces agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps

Add Static Route From VPP1 Linux To VPP2 2
Put Linux Route node=agent_vpp_1 namespace=${EMPTY} interface=${NAME_VPP1_TAP1} routename=${NAME_VPP1_LINUX_TO_VPP2} ip=${IP_VPP2_TAP1_NETWORK} next_hop=${EMPTY}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,6 @@ Show Interfaces And Other Objects
Write To Machine agent_vpp_1_term show br
Write To Machine agent_vpp_1_term show err
vat_term: Interfaces Dump agent_vpp_1
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container node_1 ip a
Execute In Container node_2 ip a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ Show Interfaces And Other Objects After Config
Write To Machine agent_vpp_2_term show err
vat_term: Interfaces Dump agent_vpp_1
vat_term: Interfaces Dump agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container agent_vpp_2 ip a

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ Show Interfaces And Other Objects After Config
Write To Machine agent_vpp_2_term show err
vat_term: Interfaces Dump agent_vpp_1
vat_term: Interfaces Dump agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps
Execute In Container agent_vpp_1 ip a
Execute In Container agent_vpp_2 ip a

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,6 @@ Start Containers And Add Nodes
Configure Environment 2
[Tags] setup
Configure Environment 1

Show Interfaces Before Setup 2
vpp_term: Show Interfaces agent_vpp_1
vpp_term: Show Interfaces agent_vpp_2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ Configure Environment 2
[Tags] setup
Configure Environment 1

Show Interfaces Before Setup 2
vpp_term: Show Interfaces agent_vpp_1
vpp_term: Show Interfaces agent_vpp_2
Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps

Add Static Route From VPP1 Linux To VPP2 2
Put Linux Route node=agent_vpp_1 namespace=${EMPTY} interface=${NAME_VPP1_TAP1} routename=${NAME_VPP1_LINUX_TO_VPP2} ip=${IP_VPP2_TAP1_NETWORK} next_hop=${EMPTY}

Expand Down
3 changes: 0 additions & 3 deletions tests/robot/variables/common_variables.robot
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ ${SFC_CONTROLLER_CONF_PATH} /opt/sfc-controller/dev/sfc.conf

# Variables for container with agent and VPP
${AGENT_VPP_IMAGE_NAME} prod_vpp_agent
#${AGENT_VPP_ETCD_CONF_PATH} /opt/vnf-agent/dev/etcd.conf
#${AGENT_VPP_KAFKA_CONF_PATH} /opt/vnf-agent/dev/kafka.conf
${AGENT_VPP_ETCD_CONF_PATH} /opt/vpp-agent/dev/etcd.conf
${AGENT_VPP_KAFKA_CONF_PATH} /opt/vpp-agent/dev/kafka.conf
${VPP_AGENT_CTL_IMAGE_NAME} ${AGENT_VPP_IMAGE_NAME}
${VPP_AGENT_HOST_MEMIF_SOCKET_FOLDER} /run/vpp

${VPP_CONF_PATH} /etc/vpp/vpp.conf
Expand Down
1 change: 0 additions & 1 deletion tests/robot/variables/obsolete_common_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
KAFKA_SERVER_CREATE = 'sudo docker run -itd -p 2181:2181 -p 9092:9092 --env ADVERTISED_PORT=9092 --name kafka spotify/kafka'
KAFKA_SERVER_DESTROY = 'sudo docker rm -f kafka'

VPP_AGENT_CTL_IMAGE_NAME = 'containers.cisco.com/amarcine/prod_vpp_agent_shrink'
AGENT_VPP_IMAGE_NAME = 'containers.cisco.com/amarcine/prod_vpp_agent_shrink'
AGENT_VPP_ETCD_CONF_PATH = '/opt/vnf-agent/dev/etcd.conf'

Expand Down
1 change: 0 additions & 1 deletion tests/robot/variables/obsolete_jozo_local_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
DOCKER_HOST_USER = 'robot'
DOCKER_HOST_PSWD = 'robot'

VPP_AGENT_CTL_IMAGE_NAME = 'prod_vpp_agent'
AGENT_VPP_IMAGE_NAME = 'prod_vpp_agent'
AGENT_VPP_1_DOCKER_IMAGE = AGENT_VPP_IMAGE_NAME
AGENT_VPP_2_DOCKER_IMAGE = AGENT_VPP_IMAGE_NAME
Expand Down
1 change: 0 additions & 1 deletion tests/robot/variables/obsolete_tricorder_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
DOCKER_HOST_PSWD = 'rsa_id'
DOCKER_COMMAND = 'docker'

VPP_AGENT_CTL_IMAGE_NAME = 'prod_vpp_agent'
AGENT_VPP_IMAGE_NAME = 'prod_vpp_agent'

AGENT_VPP_1_DOCKER_IMAGE = AGENT_VPP_IMAGE_NAME
Expand Down

0 comments on commit b421a31

Please sign in to comment.