2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
16 source _common_test.sh
19 csar_id=aa443e7e-c8ba-11e8-8877-525400b164ff
22 if [[ ! -f $HOME/.ssh/id_rsa.pub ]]; then
23 echo -e "\n\n\n" | ssh-keygen -t rsa -N ""
25 populate_CSAR_vms_containers_vFW $csar_id
27 pushd ${CSAR_DIR}/${csar_id}
28 for net in $unprotected_private_net $protected_private_net $onap_private_net; do
29 echo "Create OVN Network $net network"
30 kubectl apply -f $net.yaml
32 for resource in onap-ovn4nfvk8s-network sink-service sink_configmap; do
33 kubectl apply -f $resource.yaml
35 setup $packetgen_deployment_name $firewall_deployment_name $sink_deployment_name
36 #kubectl port-forward deployment/$sink_deployment_name 667:667
39 for deployment_name in $packetgen_deployment_name $firewall_deployment_name; do
40 pod_name=$(kubectl get pods | grep $deployment_name | awk '{print $1}')
41 vm=$(kubectl virt virsh list | grep ".*$deployment_name" | awk '{print $2}')
42 echo "Pod name: $pod_name Virsh domain: $vm"
43 echo "ssh -i ~/.ssh/id_rsa.pub admin@$(kubectl get pods $pod_name -o jsonpath="{.status.podIP}")"
44 echo "kubectl attach -it $pod_name"
45 echo "=== Virtlet details ===="
46 echo "$(kubectl virt virsh dumpxml $vm | grep VIRTLET_)\n"
50 #teardown $packetgen_deployment_name $firewall_deployment_name $sink_deployment_name
51 #for net in $unprotected_private_net $protected_private_net $onap_private_net; do
52 # kubectl delete -f $net.yaml