__author__ = "Pedro de la Cruz Ramos, pedro.delacruzramos@altran.com"
__date__ = "2019-11-20"
+
+# Exploit exists in the key kdu.helm-chart
+vnfd_exploit_text = """
+ _id: 00000000-0000-0000-0000-000000000000
+ id: n2vc-rce_vnfd
+ df:
+ - id: default-df
+ kdu:
+ - name: exploit
+ helm-chart: "local/exploit --post-renderer /bin/bash"
+ helm-version: v3
+"""
+
+# Exploit in kdu.helm-chart is fixed
+vnfd_exploit_fixed_text = """
+ id: n2vc-rce_vnfd
+ df:
+ - id: default-df
+ kdu:
+ - name: exploit
+ helm-chart: "local/exploit"
+ helm-version: v3
+"""
+
db_vnfds_text = """
---
- _admin:
product-name: hackfest3charmed-vnf
version: '1.0'
mgmt-cp: vnf-mgmt-ext
-
+
virtual-compute-desc:
- id: mgmt-compute
virtual-cpu:
num-virtual-cpu: 2
virtual-memory:
size: '2'
-
+
virtual-storage-desc:
- id: mgmt-storage
size-of-storage: '20'
- id: data-storage
size-of-storage: '20'
-
+
sw-image-desc:
- id: hackfest3-mgmt
name: hackfest3-mgmt
-
+
vdu:
- id: mgmtVM
name: mgmtVM
position: 2
virtual-interface:
type: VIRTIO
- - id: dataVM
+ - alarm:
+ - actions:
+ alarm:
+ - url: https://webhook.site
+ insufficient-data:
+ - url: https://webhook.site
+ ok:
+ - url: https://webhook.site
+ alarm-id: alarm-1
+ vnf-monitoring-param-ref: dataVM_cpu_util
+ id: dataVM
name: dataVM
sw-image-desc: hackfest3-mgmt
virtual-compute-desc: data-compute
- id: dataVM_cpu_util
name: dataVM_cpu_util
performance-metric: cpu_utilization
-
+
int-virtual-link-desc:
- id: internal
-
+
ext-cpd:
- id: vnf-mgmt-ext
int-cpd: # Connection to int-cpd
int-cpd: # Connection to int-cpd
vdu-id: dataVM
cpd: vnf-data
-
+
df:
- id: hackfest_default
- vnf-configuration-id: vnf-configuration-example
vdu-profile:
- id: mgmtVM
min-number-of-instances: 1
- id: dataVM
min-number-of-instances: 1
max-number-of-instances: 10
- vdu-configuration-id: vdu-configuration-example
instantiation-level:
- id: default
vdu-level:
deltas:
- id: delta1
vdu-delta:
- - id: vdudelta1
+ - id: dataVM
number-of-instances: 1
scaling-policy:
- name: auto_cpu_util_above_threshold
vnf-config-primitive-name-ref: touch
- trigger: pre-scale-in
vnf-config-primitive-name-ref: touch
-
- vnf-configuration:
- - id: vnf-configuration-example
- initial-config-primitive:
- - seq: "1"
- name: config
- parameter:
- - name: ssh-hostname
- value: <rw_mgmt_ip>
- - name: ssh-username
- value: ubuntu
- - name: ssh-password
- value: osm4u
- - seq: "2"
- name: touch
- parameter:
- - name: filename
- value: <touch_filename>
- config-primitive:
- - name: touch
- parameter:
- - data-type: STRING
- default-value: <touch_filename2>
- name: filename
- juju:
- charm: simple
+ healing-aspect:
+ - id: heal_dataVM
+ healing-policy:
+ - vdu-id: dataVM
+ event-name: heal-alarm
+ recovery-type: automatic
+ action-on-recovery: REDEPLOY_ONLY
+ cooldown-time: 180
+ day1: false
+ lcm-operations-configuration:
+ operate-vnf-op-config:
+ day1-2:
+ - id: hackfest3charmed-vnf
+ execution-environment-list:
+ - id: simple-ee
+ juju:
+ charm: simple
+ initial-config-primitive:
+ - seq: "1"
+ execution-environment-ref: simple-ee
+ name: config
+ parameter:
+ - name: ssh-hostname
+ value: <rw_mgmt_ip>
+ - name: ssh-username
+ value: ubuntu
+ - name: ssh-password
+ value: osm4u
+ - seq: "2"
+ execution-environment-ref: simple-ee
+ name: touch
+ parameter:
+ - name: filename
+ value: <touch_filename>
+ config-primitive:
+ - name: touch
+ execution-environment-ref: simple-ee
+ parameter:
+ - data-type: STRING
+ default-value: <touch_filename2>
+ name: filename
"""
db_nsds_text = """