aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kud/demo/firewall/charts/sink/templates/configmap.yaml7
-rw-r--r--kud/demo/firewall/charts/sink/templates/deployment.yaml7
-rw-r--r--kud/demo/firewall/charts/sink/values.yaml12
-rw-r--r--kud/demo/firewall/templates/onap-private-net.yaml2
-rw-r--r--kud/demo/firewall/templates/protected-private-net.yaml2
-rw-r--r--kud/demo/firewall/templates/unprotected-private-net.yaml4
-rw-r--r--kud/demo/firewall/values.yaml33
-rwxr-xr-xkud/tests/_common_test.sh50
-rwxr-xr-xkud/tests/_functions.sh23
-rwxr-xr-xkud/tests/integration_vcFW.sh1
-rwxr-xr-xkud/tests/ovn4nfv.sh1
-rw-r--r--kud/tests/ovn_provider_nw_test.sh1
12 files changed, 86 insertions, 57 deletions
diff --git a/kud/demo/firewall/charts/sink/templates/configmap.yaml b/kud/demo/firewall/charts/sink/templates/configmap.yaml
new file mode 100644
index 00000000..3abfef26
--- /dev/null
+++ b/kud/demo/firewall/charts/sink/templates/configmap.yaml
@@ -0,0 +1,7 @@
+piVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "sink.name" .}}-configmap
+data:
+ protected_net_gw: {{ .Values.global.protectedNetGw }}
+ protected_private_net_cidr: {{ .Values.global.protectedPrivateNetCidr }}
diff --git a/kud/demo/firewall/charts/sink/templates/deployment.yaml b/kud/demo/firewall/charts/sink/templates/deployment.yaml
index f5ccdae9..a988bc5d 100644
--- a/kud/demo/firewall/charts/sink/templates/deployment.yaml
+++ b/kud/demo/firewall/charts/sink/templates/deployment.yaml
@@ -26,14 +26,17 @@ spec:
spec:
containers:
- name: {{ .Chart.Name }}
- image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
+ image: "{{ .Values.image.sinkrepo }}:{{ .Values.image.sinktag }}"
+ envFrom:
+ - configMapRef:
+ name: {{ include "sink.name" . }}-configmap
imagePullPolicy: {{ .Values.image.pullPolicy }}
tty: true
stdin: true
securityContext:
privileged: true
- name: darkstat
- image: "{{ .Values.image.repo }}:{{ .Values.image.tag }}"
+ image: "{{ .Values.image.darkstatrepo }}:{{ .Values.image.darkstattag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
tty: true
stdin: true
diff --git a/kud/demo/firewall/charts/sink/values.yaml b/kud/demo/firewall/charts/sink/values.yaml
index 1ac6f08d..e2608e2f 100644
--- a/kud/demo/firewall/charts/sink/values.yaml
+++ b/kud/demo/firewall/charts/sink/values.yaml
@@ -5,12 +5,12 @@
replicaCount: 1
image:
- repository: akhilak/sink
- tag: latest
- pullPolicy: IfNotPresent
- repo: akhilak/darkstat
- tag: latest
- pullPolicy: IfNotPresent
+ sinkrepo: rtsood/onap-vfw-demo-sink
+ sinktag: 0.2.0
+ pullPolicy: Always
+ darkstatrepo: electrocucaracha/darkstat
+ darkstattag: latest
+ pullPolicy: Always
nameOverride: ""
fullnameOverride: ""
diff --git a/kud/demo/firewall/templates/onap-private-net.yaml b/kud/demo/firewall/templates/onap-private-net.yaml
index 5b7e9ee7..e4079e2c 100644
--- a/kud/demo/firewall/templates/onap-private-net.yaml
+++ b/kud/demo/firewall/templates/onap-private-net.yaml
@@ -6,4 +6,4 @@ spec:
cnitype : ovn4nfvk8s
name: {{ .Values.global.onapPrivateNetworkName }}
subnet: {{ .Values.global.onapPrivateNetCidr }}
- gateway: {{ .Values.global.protectedPrivateGateway }}
+ gateway: {{ .Values.global.onapPrivateNetGw }}
diff --git a/kud/demo/firewall/templates/protected-private-net.yaml b/kud/demo/firewall/templates/protected-private-net.yaml
index 43cb9233..33724472 100644
--- a/kud/demo/firewall/templates/protected-private-net.yaml
+++ b/kud/demo/firewall/templates/protected-private-net.yaml
@@ -6,4 +6,4 @@ spec:
cnitype : ovn4nfvk8s
name: {{ .Values.global.protectedNetworkName }}
subnet: {{ .Values.global.protectedNetCidr }}
- gateway: {{ .Values.global.protectedNetGw }}/{{ .Values.global.gatewayVariable }}
+ gateway: {{ .Values.global.protectedNetGw }}
diff --git a/kud/demo/firewall/templates/unprotected-private-net.yaml b/kud/demo/firewall/templates/unprotected-private-net.yaml
index 8f45eded..2c192598 100644
--- a/kud/demo/firewall/templates/unprotected-private-net.yaml
+++ b/kud/demo/firewall/templates/unprotected-private-net.yaml
@@ -5,5 +5,5 @@ metadata:
spec:
cnitype : ovn4nfvk8s
name: {{ .Values.global.unprotectedNetworkName }}
- subnet: {{ .Values.global.protectedNetCidr }}
- gateway: 192.168.10.1/24
+ subnet: {{ .Values.global.protectedPrivateNetCidr }}
+ gateway: {{ .Values.global.protectedPrivateNetGw }}
diff --git a/kud/demo/firewall/values.yaml b/kud/demo/firewall/values.yaml
index 7935828f..e8ab8cdb 100644
--- a/kud/demo/firewall/values.yaml
+++ b/kud/demo/firewall/values.yaml
@@ -17,25 +17,34 @@ resources:
#global vars for parent and subcharts.
global:
- demoArtifactsVersion: 1.5.0
+
+ #Networks
+ protectedNetworkName: protected-private-net
+ protectedNetCidr: 192.168.20.0/24
+ protectedNetGw: 192.168.20.100/24
+
+ unprotectedNetworkName: unprotected-private-net
+ protectedPrivateNetCidr: 192.168.10.0/24
+ protectedPrivateNetGw: 192.168.10.1/24
+
+ onapPrivateNetworkName: onap-private-net
+ onapPrivateNetCidr: 10.10.0.0/16
+ onapPrivateNetGw: 10.10.0.1/16
+
+ #vFirewall container
vfwPrivateIp0: 192.168.10.3
vfwPrivateIp1: 192.168.20.2
vfwPrivateIp2: 10.10.100.3
+ #Packetgen container
vpgPrivateIp0: 192.168.10.2
vpgPrivateIp1: 10.0.100.2
+ #Sink container
vsnPrivateIp0: 192.168.20.3
vsnPrivateIp1: 10.10.100.4
+
+ #########
+ ovnMultusNetworkName: ovn-networkobj
+ demoArtifactsVersion: 1.5.0
dcaeCollectorIp: 10.0.4.1
dcaeCollectorPort: 8081
- protectedNetGw: 192.168.20.100
- protectedNetCidr: 192.168.20.0/24
- protectedPrivateNetCidr: 192.168.10.0/24
- onapPrivateNetCidr: 10.10.0.0/16
- protectedNetGw: 192.168.20.100
- protectedNetworkName: protected-private-net
- unprotectedNetworkName: unprotected-private-net
- ovnMultusNetworkName: ovn-networkobj
- onapPrivateNetworkName: onap-private-net
- protectedPrivateGateway: 10.10.0.1/16
- gatewayVariable: 24
diff --git a/kud/tests/_common_test.sh b/kud/tests/_common_test.sh
index be22db9a..1c6af678 100755
--- a/kud/tests/_common_test.sh
+++ b/kud/tests/_common_test.sh
@@ -15,15 +15,45 @@ set -o pipefail
# install_deps() - Install dependencies required for functional tests
function install_deps {
if ! $(jq --version &>/dev/null); then
- source /etc/os-release || source /usr/lib/os-release
- case ${ID,,} in
- *suse)
- ;;
- ubuntu|debian)
- sudo apt-get install -y jq
- ;;
- rhel|centos|fedora)
- ;;
- esac
+ function ubuntu_deps {
+ sudo apt-get install -y jq
+ }
+ install_packages "" ubuntu_deps ""
fi
}
+
+# install_ovn_deps() - Install dependencies required for tests that require OVN
+function install_ovn_deps {
+ if ! $(yq --version &>/dev/null); then
+ install_deps # jq needed as it's dependency of yq
+ sudo -E pip install yq
+ fi
+ if ! $(ovn-nbctl --version &>/dev/null); then
+ function ovn_ubuntu_deps {
+ sudo apt-get install -y apt-transport-https
+ echo "deb https://packages.wand.net.nz $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/wand.list
+ sudo curl https://packages.wand.net.nz/keyring.gpg -o /etc/apt/trusted.gpg.d/wand.gpg
+ sudo apt-get update
+ sudo apt install -y ovn-common
+ }
+ install_packages "" ovn_ubuntu_deps ""
+ fi
+}
+
+function install_packages {
+ local suse_packages=$1
+ local ubuntu_debian_packages=$2
+ local rhel_centos_packages=$3
+ source /etc/os-release || source /usr/lib/os-release
+ case ${ID,,} in
+ *suse)
+ ($suse_packages)
+ ;;
+ ubuntu|debian)
+ ($ubuntu_debian_packages)
+ ;;
+ rhel|centos|fedora)
+ ($rhel_centos_packages)
+ ;;
+ esac
+}
diff --git a/kud/tests/_functions.sh b/kud/tests/_functions.sh
index 5efb56fe..542443d6 100755
--- a/kud/tests/_functions.sh
+++ b/kud/tests/_functions.sh
@@ -31,29 +31,6 @@ function _get_ovn_central_address {
echo "$(echo ${ansible_ifconfig#*>>} | tr '\n' ':')6641"
}
-# install_ovn_deps() - Install dependencies required for tests that require OVN
-function install_ovn_deps {
- if ! $(yq --version &>/dev/null); then
- sudo -E pip install yq
- fi
- if ! $(ovn-nbctl --version &>/dev/null); then
- source /etc/os-release || source /usr/lib/os-release
- case ${ID,,} in
- *suse)
- ;;
- ubuntu|debian)
- sudo apt-get install -y apt-transport-https
- echo "deb https://packages.wand.net.nz $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/wand.list
- sudo curl https://packages.wand.net.nz/keyring.gpg -o /etc/apt/trusted.gpg.d/wand.gpg
- sudo apt-get update
- sudo apt install -y ovn-common
- ;;
- rhel|centos|fedora)
- ;;
- esac
- fi
-}
-
# init_network() - This function creates the OVN resouces required by the test
function init_network {
local fname=$1
diff --git a/kud/tests/integration_vcFW.sh b/kud/tests/integration_vcFW.sh
index 0c6d0689..a4035207 100755
--- a/kud/tests/integration_vcFW.sh
+++ b/kud/tests/integration_vcFW.sh
@@ -13,6 +13,7 @@ set -o nounset
set -o pipefail
source _common.sh
+source _common_test.sh
source _functions.sh
csar_id=aa443e7e-c8ba-11e8-8877-525400b164ff
diff --git a/kud/tests/ovn4nfv.sh b/kud/tests/ovn4nfv.sh
index de8631f4..6be6aae8 100755
--- a/kud/tests/ovn4nfv.sh
+++ b/kud/tests/ovn4nfv.sh
@@ -12,6 +12,7 @@ set -o nounset
set -o pipefail
source _common.sh
+source _common_test.sh
source _functions.sh
csar_id=a1c5b53e-d7ab-11e8-85b7-525400e8c29a
diff --git a/kud/tests/ovn_provider_nw_test.sh b/kud/tests/ovn_provider_nw_test.sh
index 9b32d904..b2a8642c 100644
--- a/kud/tests/ovn_provider_nw_test.sh
+++ b/kud/tests/ovn_provider_nw_test.sh
@@ -13,6 +13,7 @@ set -o nounset
set -o pipefail
source _common.sh
+source _common_test.sh
source _functions.sh
# populate_CSAR_ovn4nfv() - Create content used for OVN4NFV functional test