X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=osm_nbi%2Ftests%2Ftest_pkg_descriptors.py;h=39c28fe49b153a4df5b8b7fd2dad6c54ceba1716;hb=4606e4a16206757655e95deeed44457f821f9e4e;hp=fd8cac94138f1485058a78d0140a538101f16f8b;hpb=41a52059cbcadb9bb7baebb38ff9503a362ea8e8;p=osm%2FNBI.git diff --git a/osm_nbi/tests/test_pkg_descriptors.py b/osm_nbi/tests/test_pkg_descriptors.py index fd8cac9..39c28fe 100644 --- a/osm_nbi/tests/test_pkg_descriptors.py +++ b/osm_nbi/tests/test_pkg_descriptors.py @@ -20,6 +20,30 @@ __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: @@ -49,7 +73,7 @@ db_vnfds_text = """ product-name: hackfest3charmed-vnf version: '1.0' mgmt-cp: vnf-mgmt-ext - + virtual-compute-desc: - id: mgmt-compute virtual-cpu: @@ -61,17 +85,17 @@ db_vnfds_text = """ 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 @@ -118,10 +142,10 @@ db_vnfds_text = """ - 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 @@ -131,7 +155,7 @@ db_vnfds_text = """ int-cpd: # Connection to int-cpd vdu-id: dataVM cpd: vnf-data - + df: - id: hackfest_default vdu-profile: @@ -179,8 +203,13 @@ db_vnfds_text = """ 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 @@ -190,18 +219,18 @@ db_vnfds_text = """ - name: ssh-password value: osm4u - seq: "2" + execution-environment-ref: simple-ee name: touch parameter: - name: filename value: config-primitive: - name: touch + execution-environment-ref: simple-ee parameter: - data-type: STRING default-value: name: filename - juju: - charm: simple """ db_nsds_text = """