aboutsummaryrefslogtreecommitdiffstats
path: root/heat/vFW_CNF_CDS/templates/helm/vfw/templates/tests/ping.yaml
blob: 37b41832f8735c8988ae82504a33514509c23f4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
# Copyright © 2021 Samsung Electronics
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
{{- if eq .Values.Tests.enabled "yes" }}
apiVersion: batch/v1
kind: Job
metadata:
  name: "{{ .Values.vfw_name_0 }}-test"
  labels:
    vnf-name: {{ .Values.vnf_name }}
    vf-module-name: {{ .Values.vfw_name_0 }}
    release: {{ .Release.Name }}
    chart: {{ .Chart.Name }}
  annotations:
    "helm.sh/hook": test-success
spec:
  completions: 1
  template:
    metadata:
      annotations:
        k8s.v1.cni.cncf.io/networks: "{{ .Values.net_attachment_definition }}"
        k8s.plugin.opnfv.org/nfn-network: |
            { "type": "ovn4nfv",
              "interface": [
                {
                  "name": {{ .Values.int_private1_net_id | quote }},
                  "interface": "eth1" ,
                  "defaultGateway": "false"
                }
                {
                  "name": {{ .Values.int_private2_net_id | quote }},
                  "interface": "eth2" ,
                  "defaultGateway": "false"
                }
              ]
            }
    spec:
      restartPolicy: Never
      containers:
        - name: "ping-test-eth1"
          image: busybox
          command:
            - /bin/sh
            - -exc
            - "ping -c {{ .Values.Tests.ping_count }} -I eth1 {{ .Values.vfw_int_private1_ip_0 }}"
        - name: "ping-test-eth2"
          image: busybox
          command:
            - /bin/sh
            - -exc
            - "ping -c {{ .Values.Tests.ping_count }} -I eth2 {{ .Values.vfw_int_private2_ip_0 }}"
{{- end -}}