Make ovn-central network interface configurable
[multicloud/k8s.git] / kud / tests / multus.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2018
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 ##############################################################################
10
11 set -o errexit
12 set -o nounset
13 set -o pipefail
14
15 source _common.sh
16 source _functions.sh
17
18 csar_id=49408ca6-b75b-11e8-8076-525400feed26
19
20 # Setup
21 populate_CSAR_multus $csar_id
22
23 pushd ${CSAR_DIR}/${csar_id}
24 kubectl apply -f bridge-network.yaml
25
26 setup $multus_deployment_name
27
28 # Test
29 deployment_pod=$(kubectl get pods | grep  $multus_deployment_name | awk '{print $1}')
30 echo "===== $deployment_pod details ====="
31 kubectl exec -it $deployment_pod -- ip a
32 multus_nic=$(kubectl exec -it $deployment_pod -- ip a)
33 if [[ $multus_nic != *"net1"* ]]; then
34     echo "The $deployment_pod pod doesn't contain the net1 nic"
35     exit 1
36 else
37     echo "Test Completed!"
38 fi
39
40 # Teardown
41 teardown $multus_deployment_name
42 popd