Adapts PLA to new SOL006 NSD descriptors format
Change-Id: I642e201b226aa29a8da1f59f6a7380c83d743bb1
Signed-off-by: garciaale <agarcia@whitestack.com>
diff --git a/osm_pla/test/nsd_unittest1.yaml b/osm_pla/test/nsd_unittest1.yaml
index b4832a7..58bbc31 100644
--- a/osm_pla/test/nsd_unittest1.yaml
+++ b/osm_pla/test/nsd_unittest1.yaml
@@ -12,55 +12,55 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
- nsd:
- - constituent-vnfd:
- - member-vnf-index: 1
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: 2
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: 3
- vnfd-id-ref: cirros_vnfd_v2
- description: Placement constraints NSD
- id: three_vnf_constrained_nsd
- name: three_vnf_constrained_nsd
- short-name: three_vnf_constrained_nsd
- vendor: ArctosLabs
- version: '1.0'
- vld:
- - id: three_vnf_constrained_nsd_vld1
- link-constraint:
- - constraint-type: LATENCY
- value: 150
- - constraint-type: JITTER
- value: 30
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld1
- short-name: ns_constrained_nsd_vld1
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: 1
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: 2
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - id: three_vnf_constrained_nsd_vld2
- link-constraint:
- - constraint-type: LATENCY
- value: 90
- - constraint-type: JITTER
- value: 30
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld2
- short-name: ns_constrained_nsd_vld2
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: 2
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: 3
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
\ No newline at end of file
+nsd:
+ nsd:
+ - description: Placement constraints NSD
+ designer: ArctosLabs
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: '1' # Old member-vnf-index
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ vnfd-id: cirros_vnfd_v2
+ - id: '2'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '2'
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ - constituent-cpd-id:
+ - constituent-base-element-id: '2'
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ - id: '3'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '3'
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ id: three_vnf_constrained_nsd
+ name: three_vnf_constrained_nsd
+ version: '1.0'
+ virtual-link-desc:
+ - id: three_vnf_constrained_nsd_vld1
+ vim-network-name: private
+ df:
+ - id: default-df
+ qos:
+ latency: 90
+ packet-delay-variation: 30
+ - id: three_vnf_constrained_nsd_vld2
+ vim-network-name: private
+ df:
+ - id: default-df
+ qos:
+ latency: 150
+ packet-delay-variation: 30
+ vnfd-id:
+ - cirros_vnfd_v2
diff --git a/osm_pla/test/nsd_unittest2.yaml b/osm_pla/test/nsd_unittest2.yaml
index be54166..355b451 100644
--- a/osm_pla/test/nsd_unittest2.yaml
+++ b/osm_pla/test/nsd_unittest2.yaml
@@ -12,51 +12,54 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
- nsd:
- - constituent-vnfd:
- - member-vnf-index: one
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: two
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: three
- vnfd-id-ref: cirros_vnfd_v2
- description: Placement no constraints NSD
- id: three_vnf_no_constrained_nsd
- name: three_vnf_no_constrained_nsd
- short-name: three_vnf_no_constrained_nsd
- vendor: ArctosLabs
- version: '1.0'
- vld:
- - id: three_vnf_no_constrained_nsd_vld1
- link-constraint:
- - constraint-type: JITTER
- value: 30
- mgmt-network: !!bool False
- name: ns_no_constrained_nsd_vld1
- short-name: ns_no_constrained_nsd_vld1
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: one
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - id: three_vnf_no_constrained_nsd_vld2
- link-constraint:
- - constraint-type: LATENCY
- value: 120
- mgmt-network: !!bool False
- name: ns_no_constrained_nsd_vld2
- short-name: ns_no_constrained_nsd_vld2
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: three
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
\ No newline at end of file
+nsd:
+ nsd:
+ - description: Placement no constraints NSD
+ designer: ArctosLabs
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: one
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: one
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_no_constrained_nsd_vld1
+ vnfd-id: cirros_vnfd_v2
+ - id: two
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_no_constrained_nsd_vld1
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_no_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ - id: three
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: three
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_no_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ id: three_vnf_no_constrained_nsd
+ name: three_vnf_no_constrained_nsd
+ version: '1.0'
+
+ virtual-link-desc:
+ - id: three_vnf_no_constrained_nsd_vld1
+ vim-network-name: private
+ df:
+ - id: default-df
+ qos:
+ packet-delay-variation: 30
+ - id: three_vnf_no_constrained_nsd_vld2
+ vim-network-name: private
+ df:
+ - id: default-df
+ qos:
+ latency: 120
+ vnfd-id:
+ - cirros_vnfd_v2
diff --git a/osm_pla/test/nsd_unittest3.yaml b/osm_pla/test/nsd_unittest3.yaml
index c66df82..1bfdee9 100644
--- a/osm_pla/test/nsd_unittest3.yaml
+++ b/osm_pla/test/nsd_unittest3.yaml
@@ -12,55 +12,60 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
+nsd:
nsd:
- - constituent-vnfd:
- - member-vnf-index: one
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: two
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: three
- vnfd-id-ref: cirros_vnfd_v2
- description: Placement constraints NSD
+ - vnfd-id:
+ - cirros_vnfd_v2
+
id: three_vnf_constrained_nsd
+ description: Placement constraints NSD
name: three_vnf_constrained_nsd
- short-name: three_vnf_constrained_nsd
- vendor: ArctosLabs
+ designer: ArctosLabs
version: '1.0'
- vld:
+
+ virtual-link-desc:
- id: three_vnf_constrained_nsd_vld1
- link-constraint:
- - constraint-type: LATENCY
- value: 150
- - constraint-type: JITTER
- value: 30
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld1
- short-name: ns_constrained_nsd_vld1
- type: ELAN
vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: one
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
+ df:
+ - id: default-df
+ qos:
+ latency: 150
+ packet-delay-variation: 30
- id: three_vnf_constrained_nsd_vld2
- link-constraint:
- - constraint-type: LATENCY
- value: 90
- - constraint-type: JITTER
- value: 30
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld2
- short-name: ns_constrained_nsd_vld2
- type: ELAN
vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: three
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
\ No newline at end of file
+ df:
+ - id: default-df
+ qos:
+ latency: 90
+ packet-delay-variation: 30
+
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: one
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: one
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ vnfd-id: cirros_vnfd_v2
+ - id: two
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ - id: three
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: three
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+
+
diff --git a/osm_pla/test/nsd_unittest4.yaml b/osm_pla/test/nsd_unittest4.yaml
index 68d8f7e..06fe593 100644
--- a/osm_pla/test/nsd_unittest4.yaml
+++ b/osm_pla/test/nsd_unittest4.yaml
@@ -12,24 +12,26 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
- nsd:
- - constituent-vnfd:
- - member-vnf-index: 1
- vnfd-id-ref: hackfest-basic_vnfd
- description: Generated by OSM package generator
- id: hackfest-basic_nsd
- name: hackfest-basic_nsd
- short-name: hackfest-basic_nsd
- vendor: Abubakr Magzoub, Lancaster University
- version: '1.0'
- vld:
- - id: hackfest-basic_nsd_vld0
- mgmt-network: !!bool True
- name: management
- short-name: management
- type: ELAN
- vnfd-connection-point-ref:
- - member-vnf-index-ref: 1
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: hackfest-basic_vnfd
+nsd:
+ nsd:
+ - description: Generated by OSM package generator
+ designer: Abubakr Magzoub, Lancaster University
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: '1'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: hackfest-basic_nsd_vld0
+ vnfd-id: hackfest-basic_vnfd
+ id: hackfest-basic_nsd
+ name: hackfest-basic_nsd
+ version: '1.0'
+ virtual-link-desc:
+ - id: hackfest-basic_nsd_vld0
+ mgmt-network: true
+ vnfd-id:
+ - hackfest-basic_vnfd
+
diff --git a/osm_pla/test/nsd_unittest_no_vld_constraints.yaml b/osm_pla/test/nsd_unittest_no_vld_constraints.yaml
index 7a440f4..2fb475c 100644
--- a/osm_pla/test/nsd_unittest_no_vld_constraints.yaml
+++ b/osm_pla/test/nsd_unittest_no_vld_constraints.yaml
@@ -12,45 +12,45 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
- nsd:
- - constituent-vnfd:
- - member-vnf-index: one
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: two
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index: three
- vnfd-id-ref: cirros_vnfd_v2
- description: Placement constraints NSD
- id: three_vnf_constrained_nsd
- name: three_vnf_constrained_nsd
- short-name: three_vnf_constrained_nsd
- vendor: ArctosLabs
- version: '1.0'
- vld:
- - id: three_vnf_constrained_nsd_vld1
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld1
- short-name: ns_constrained_nsd_vld1
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: one
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - id: three_vnf_constrained_nsd_vld2
- mgmt-network: !!bool False
- name: ns_constrained_nsd_vld2
- short-name: ns_constrained_nsd_vld2
- type: ELAN
- vim-network-name: private
- vnfd-connection-point-ref:
- - member-vnf-index-ref: two
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
- - member-vnf-index-ref: three
- vnfd-connection-point-ref: vnf-cp0
- vnfd-id-ref: cirros_vnfd_v2
\ No newline at end of file
+nsd:
+ nsd:
+ - description: Placement constraints NSD
+ designer: ArctosLabs
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: one
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: one
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ vnfd-id: cirros_vnfd_v2
+ - id: two
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld1
+ - constituent-cpd-id:
+ - constituent-base-element-id: two
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ - id: three
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: three
+ constituent-cpd-id: vnf-cp0-ext
+ virtual-link-profile-id: three_vnf_constrained_nsd_vld2
+ vnfd-id: cirros_vnfd_v2
+ id: three_vnf_constrained_nsd
+ name: three_vnf_constrained_nsd
+ version: '1.0'
+ virtual-link-desc:
+ - id: three_vnf_constrained_nsd_vld1
+ vim-network-name: private
+ - id: three_vnf_constrained_nsd_vld2
+ vim-network-name: private
+ vnfd-id:
+ - cirros_vnfd_v2
diff --git a/osm_pla/test/slice_hackfest_middle_nsd.yaml b/osm_pla/test/slice_hackfest_middle_nsd.yaml
index f8fa102..7619520 100644
--- a/osm_pla/test/slice_hackfest_middle_nsd.yaml
+++ b/osm_pla/test/slice_hackfest_middle_nsd.yaml
@@ -11,53 +11,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd-catalog:
- nsd:
- - id: slice_hackfest_middle_nsd
- name: slice_hackfest_middle_nsd
- short-name: slice_hackfest_middle_ns
- description: NSD to be used on Slice Session of the 8th hackfest
- vendor: OSM
- version: '1.0'
- logo: osm_2x.png
-
- constituent-vnfd:
- - member-vnf-index: "1"
- vnfd-id-ref: slice_hackfest_middle_vnfd
-
- connection-point:
- - name: nsd_cp_mgmt
- vld-id-ref: nsd_vnfd_vld_mgmt
- - name: nsd_cp_data1
- vld-id-ref: nsd_vnfd_vld_data1
- - name: nsd_cp_data2
- vld-id-ref: nsd_vnfd_vld_data2
-
- vld:
- - id: nsd_vnfd_vld_mgmt
- name: nsd_vnfd_vld_mgmt
- short-name: nsd_vnfd_vld_mgmt
- type: ELAN
- mgmt-network: !!bool True
- vnfd-connection-point-ref:
- - member-vnf-index-ref: "1"
- vnfd-id-ref: slice_hackfest_middle_vnfd
- vnfd-connection-point-ref: eth0
- - id: nsd_vnfd_vld_data1
- name: nsd_vnfd_vld_data1
- short-name: nsd_vnfd_vld_data1
- type: ELAN
- mgmt-network: !!bool False
- vnfd-connection-point-ref:
- - member-vnf-index-ref: "1"
- vnfd-id-ref: slice_hackfest_middle_vnfd
- vnfd-connection-point-ref: eth1
- - id: nsd_vnfd_vld_data2
- name: nsd_vnfd_vld_data2
- short-name: nsd_vnfd_vld_data2
- type: ELAN
- mgmt-network: !!bool False
- vnfd-connection-point-ref:
- - member-vnf-index-ref: "1"
- vnfd-id-ref: slice_hackfest_middle_vnfd
- vnfd-connection-point-ref: eth2
\ No newline at end of file
+nsd:
+ nsd:
+ - description: NSD to be used on Slice Session of the 8th hackfest
+ designer: OSM
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: '1'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: eth0-ext
+ virtual-link-profile-id: nsd_vnfd_vld_mgmt
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: eth1-ext
+ virtual-link-profile-id: nsd_vnfd_vld_data1
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: eth2-ext
+ virtual-link-profile-id: nsd_vnfd_vld_data2
+ vnfd-id: slice_hackfest_middle_vnfd
+ id: slice_hackfest_middle_nsd
+ name: slice_hackfest_middle_nsd
+ version: '1.0'
+ virtual-link-desc:
+ - id: nsd_vnfd_vld_mgmt
+ mgmt-network: true
+ - id: nsd_vnfd_vld_data1
+ - id: nsd_vnfd_vld_data2
+ vnfd-id:
+ - slice_hackfest_middle_vnfd
\ No newline at end of file
diff --git a/osm_pla/test/test_five_nsd.yaml b/osm_pla/test/test_five_nsd.yaml
index 0a209d1..c11f313 100644
--- a/osm_pla/test/test_five_nsd.yaml
+++ b/osm_pla/test/test_five_nsd.yaml
@@ -12,93 +12,93 @@
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-nsd:nsd-catalog:
+nsd:
nsd:
- description: Four cirros VNF latency and jitter constrained
+ designer: ArctosLabs
+ df:
+ - id: default-df
+ vnf-profile:
+ - id: '1'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: vnf_cp_one_cp-ext
+ virtual-link-profile-id: vl_two_vld
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: vnf_cp_two_cp-ext
+ virtual-link-profile-id: vld_vnf_mgmt1
+ - constituent-cpd-id:
+ - constituent-base-element-id: '1'
+ constituent-cpd-id: vnf_cp_two_cp-ext
+ virtual-link-profile-id: vld_vnf_mgmt2
+ vnfd-id: test_one_a_vnfd
+ - id: '2'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '2'
+ constituent-cpd-id: vnf_cp_one_cp-ext
+ virtual-link-profile-id: vl_two_vld
+ - constituent-cpd-id:
+ - constituent-base-element-id: '2'
+ constituent-cpd-id: vnf_cp_three_cp-ext
+ virtual-link-profile-id: vl_four_vld
+ - constituent-cpd-id:
+ - constituent-base-element-id: '2'
+ constituent-cpd-id: vnf_cp_two_cp-ext
+ virtual-link-profile-id: vl_five_vld
+ vnfd-id: test_two_vnfd
+ - id: '4'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '4'
+ constituent-cpd-id: vnf_cp_one_cp-ext
+ virtual-link-profile-id: vl_four_vld
+ - constituent-cpd-id:
+ - constituent-base-element-id: '4'
+ constituent-cpd-id: vnf_cp_two_cp-ext
+ virtual-link-profile-id: vld_vnf_mgmt2
+ vnfd-id: test_one_a_vnfd
+ - id: '3'
+ virtual-link-connectivity:
+ - constituent-cpd-id:
+ - constituent-base-element-id: '3'
+ constituent-cpd-id: vnf_cp_one_cp-ext
+ virtual-link-profile-id: vl_five_vld
+ - constituent-cpd-id:
+ - constituent-base-element-id: '3'
+ constituent-cpd-id: vnf_cp_two_cp-ext
+ virtual-link-profile-id: vld_vnf_mgmt1
+ vnfd-id: test_one_a_vnfd
id: test_five_nsd
name: test_five_nsd
- short-name: test_five_nsd
- vendor: ArctosLabs
version: '1.0'
- constituent-vnfd:
- - member-vnf-index: 1
- vnfd-id-ref: test_one_a_vnfd
- - member-vnf-index: 2
- vnfd-id-ref: test_two_vnfd
- - member-vnf-index: 3
- vnfd-id-ref: test_one_a_vnfd
- - member-vnf-index: 4
- vnfd-id-ref: test_one_a_vnfd
- vld:
- - name: vl_two_vld
- id: vl_two_vld
- mgmt-network: !!bool False
- type: ELAN
- link-constraint:
- - constraint-type: LATENCY
- value: 120
- - constraint-type: JITTER
- value: 20
- vnfd-connection-point-ref:
- - member-vnf-index-ref: '1'
- vnfd-connection-point-ref: vnf_cp_one_cp
- vnfd-id-ref: test_one_a_vnfd
- - member-vnf-index-ref: '2'
- vnfd-connection-point-ref: vnf_cp_one_cp
- vnfd-id-ref: test_two_vnfd
- - name: vl_four_vld
- id: vl_four_vld
- mgmt-network: !!bool False
- type: ELAN
- link-constraint:
- - constraint-type: LATENCY
- value: 50
- - constraint-type: JITTER
- value: 10
- vnfd-connection-point-ref:
- - member-vnf-index-ref: '2'
- vnfd-connection-point-ref: vnf_cp_three_cp
- vnfd-id-ref: test_two_vnfd
- - member-vnf-index-ref: '4'
- vnfd-connection-point-ref: vnf_cp_one_cp
- vnfd-id-ref: test_one_a_vnfd
- - name: vl_five_vld
- id: vl_five_vld
- mgmt-network: !!bool False
- type: ELAN
- link-constraint:
- - constraint-type: LATENCY
- value: 20
- - constraint-type: JITTER
- value: 10
- vnfd-connection-point-ref:
- - member-vnf-index-ref: '2'
- vnfd-connection-point-ref: vnf_cp_two_cp
- vnfd-id-ref: test_two_vnfd
- - member-vnf-index-ref: '3'
- vnfd-connection-point-ref: vnf_cp_one_cp
- vnfd-id-ref: test_one_a_vnfd
- - name: vld_vnf_mgmt
- id: vld_vnf_mgmt1
- mgmt-network: !!bool True
- type: ELAN
- vnfd-connection-point-ref:
- - member-vnf-index-ref: '1'
- vnfd-connection-point-ref: vnf_cp_two_cp
- vnfd-id-ref: test_one_a_vnfd
- - member-vnf-index-ref: '3'
- vnfd-connection-point-ref: vnf_cp_two_cp
- vnfd-id-ref: test_one_a_vnfd
- - name: vld_vnf_mgmt
- id: vld_vnf_mgmt2
- mgmt-network: !!bool True
- type: ELAN
- vnfd-connection-point-ref:
- - member-vnf-index-ref: '1'
- vnfd-connection-point-ref: vnf_cp_two_cp
- vnfd-id-ref: test_one_a_vnfd
- - member-vnf-index-ref: '4'
- vnfd-connection-point-ref: vnf_cp_two_cp
- vnfd-id-ref: test_one_a_vnfd
+ virtual-link-desc:
+ - id: vl_two_vld
+ df:
+ - id: default-df
+ qos:
+ latency: 120
+ packet-delay-variation: 20
+ - id: vl_four_vld
+ df:
+ - id: default-df
+ qos:
+ latency: 50
+ packet-delay-variation: 10
+ - id: vl_five_vld
+ df:
+ - id: default-df
+ qos:
+ latency: 20
+ packet-delay-variation: 10
+ - id: vld_vnf_mgmt1
+ mgmt-network: true
+ - id: vld_vnf_mgmt2
+ mgmt-network: true
+ vnfd-id:
+ - test_one_a_vnfd
+ - test_two_vnfd
diff --git a/osm_pla/test/test_nsPlacementDataFactory.py b/osm_pla/test/test_nsPlacementDataFactory.py
index 73cbac4..fe3c8da 100644
--- a/osm_pla/test/test_nsPlacementDataFactory.py
+++ b/osm_pla/test/test_nsPlacementDataFactory.py
@@ -367,7 +367,7 @@
{'cp_refs': ['two', 'three'], 'latency': 120}]
nsd = self._get_ut_nsd_from_file('nsd_unittest2.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -406,7 +406,7 @@
{'cp_refs': ['two', 'three'], 'latency': 90, 'jitter': 30}]
nsd = self._get_ut_nsd_from_file('nsd_unittest_no_vld_constraints.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -425,7 +425,7 @@
{'cp_refs': ['two', 'three'], 'latency': 90, 'jitter': 30}]
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -444,7 +444,7 @@
{'cp_refs': ['two', 'three'], 'latency': 121, 'jitter': 22}]
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -469,7 +469,7 @@
{'cp_refs': ['two', 'three']}]
nsd = self._get_ut_nsd_from_file('nsd_unittest_no_vld_constraints.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -488,7 +488,7 @@
{'cp_refs': ['two', 'three'], 'latency': 141, 'jitter': 42}]
nsd = self._get_ut_nsd_from_file('nsd_unittest_no_vld_constraints.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -513,7 +513,7 @@
{'cp_refs': ['two', 'three'], 'latency': 151}]
nsd = self._get_ut_nsd_from_file('nsd_unittest_no_vld_constraints.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -538,7 +538,7 @@
{'cp_refs': ['two', 'three']}]
nsd = self._get_ut_nsd_from_file('nsd_unittest_no_vld_constraints.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -560,7 +560,7 @@
{'cp_refs': ['2', '3'], 'latency': 20, 'jitter': 10}, ]
nsd = self._get_ut_nsd_from_file('test_five_nsd.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -573,7 +573,7 @@
vld_desc_expected = []
nsd = self._get_ut_nsd_from_file('nsd_unittest4.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -585,7 +585,7 @@
def test__produce_vld_desc_slice_nsd(self):
vld_desc_expected = []
nsd = self._get_ut_nsd_from_file('slice_hackfest_middle_nsd.yaml')
- nsd = nsd['nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -603,7 +603,7 @@
{'cp_refs': ['two', 'three'], 'latency': 90, 'jitter': 30}]
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -621,7 +621,7 @@
- fault case scenarios with non-existing vims, non-existing vnfds
"""
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -642,7 +642,7 @@
def test__produce_ns_desc_with_more_vims(self):
nsd = self._get_ut_nsd_from_file('nsd_unittest1.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(self.vim_accounts_more_vims),
self._produce_ut_vnf_test_price_list('vnf_price_list_more_vims.yaml'),
nsd=nsd,
@@ -652,7 +652,7 @@
ns_desc = nspdf._produce_ns_desc()
# check that all expected member-vnf-index are present
vnfs = [e['vnf_id'] for e in ns_desc]
- self.assertEqual(Counter([1, 3, 2]), Counter(vnfs), 'vnf_id invalid')
+ self.assertEqual(Counter({'1': 1, '2': 1, '3': 1}), Counter(vnfs), 'vnf_id invalid')
expected_keys = ['vnf_id', 'vnf_price_per_vim']
for e in ns_desc:
@@ -663,7 +663,7 @@
def test__produce_ns_desc_with_fewer_vims(self):
nsd = self._get_ut_nsd_from_file('nsd_unittest1.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(self.vim_accounts_fewer_vims),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -673,7 +673,7 @@
ns_desc = nspdf._produce_ns_desc()
# check that all expected member-vnf-index are present
vnfs = [e['vnf_id'] for e in ns_desc]
- self.assertEqual(Counter([1, 3, 2]), Counter(vnfs), 'vnf_id invalid')
+ self.assertEqual(Counter({'1': 1, '2': 1, '3': 1}), Counter(vnfs), 'vnf_id invalid')
expected_keys = ['vnf_id', 'vnf_price_per_vim']
for e in ns_desc:
@@ -684,7 +684,7 @@
def test__produce_ns_desc_w_pinning(self):
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
pinning = [{'member-vnf-index': 'two', 'vimAccountId': '331ffdec-44a8-4707-94a1-af7a292d9735'}]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
@@ -720,7 +720,7 @@
'vimeda92f47-29b9-4007-9709-c1833dbfbe31']]
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
@@ -755,7 +755,7 @@
'vimeda92f47-29b9-4007-9709-c1833dbfbe31']]
nsd = self._get_ut_nsd_from_file('nsd_unittest3.yaml')
- nsd = nsd['nsd:nsd-catalog']['nsd'][0]
+ nsd = nsd['nsd']['nsd'][0]
nspdf = NsPlacementDataFactory(self._produce_ut_vim_accounts_info(TestNsPlacementDataFactory.vim_accounts),
self._produce_ut_vnf_price_list(),
nsd=nsd,
diff --git a/osm_pla/test/test_server.py b/osm_pla/test/test_server.py
index 737ca68..9d7582f 100644
--- a/osm_pla/test/test_server.py
+++ b/osm_pla/test/test_server.py
@@ -194,9 +194,7 @@
"schema_version": "1.1", "config": {}}]
# FIXME this is not correct re mgmt-network setting.
-nsd_from_db = {"_id": "15fc1941-f095-4cd8-af2d-1000bd6d9eaa", "short-name": "three_vnf_constrained_nsd_low",
- "name": "three_vnf_constrained_nsd_low", "version": "1.0",
- "description": "Placement constraints NSD",
+nsd_from_db = {"_id": "15fc1941-f095-4cd8-af2d-1000bd6d9eaa",
"_admin": {"modified": 1567672251.7531693,
"storage": {"pkg-dir": "ns_constrained_nsd", "fs": "local",
"descriptor": "ns_constrained_nsd/ns_constrained_nsd.yaml",
@@ -206,33 +204,62 @@
"projects_write": ["0a5d0c5b-7e08-48a1-a686-642a038bbd70"], "operationalState": "ENABLED",
"userDefinedData": {}, "created": 1567672251.7531693,
"projects_read": ["0a5d0c5b-7e08-48a1-a686-642a038bbd70"]},
- "constituent-vnfd": [{"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index": "one"},
- {"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index": "two"},
- {"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index": "three"}],
- "id": "three_vnf_constrained_nsd_low", "vendor": "ArctosLabs",
- "vld": [{"type": "ELAN", "short-name": "ns_constrained_nsd_low_vld1",
- "link-constraint": [{"constraint-type": "LATENCY", "value": "100"},
- {"constraint-type": "JITTER", "value": "30"}],
- "vim-network-name": "external", "mgmt-network": True,
- "id": "three_vnf_constrained_nsd_low_vld1",
- "vnfd-connection-point-ref": [
- {"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index-ref": "one",
- "vnfd-connection-point-ref": "vnf-cp0"},
- {"vnfd-id-ref": "cirros_vnfd_v2",
- "member-vnf-index-ref": "two",
- "vnfd-connection-point-ref": "vnf-cp0"}],
- "name": "ns_constrained_nsd_vld1"},
- {"type": "ELAN", "short-name": "ns_constrained_nsd_low_vld2",
- "link-constraint": [{"constraint-type": "LATENCY", "value": "50"},
- {"constraint-type": "JITTER", "value": "30"}],
- "vim-network-name": "lanretxe", "mgmt-network": True,
- "id": "three_vnf_constrained_nsd_low_vld2",
- "vnfd-connection-point-ref": [
- {"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index-ref": "two",
- "vnfd-connection-point-ref": "vnf-cp0"},
- {"vnfd-id-ref": "cirros_vnfd_v2", "member-vnf-index-ref": "three",
- "vnfd-connection-point-ref": "vnf-cp0"}],
- "name": "ns_constrained_nsd_vld2"}]}
+ 'id': 'three_vnf_constrained_nsd_low',
+ 'name': 'three_vnf_constrained_nsd_low',
+ 'description': 'Placement constraints NSD',
+ 'designer': 'ArctosLabs',
+ 'version': '1.0',
+ 'vnfd-id': ['cirros_vnfd_v2'],
+ 'df': [{
+ 'id': 'default-df',
+ 'vnf-profile': [{
+ 'id': 'one',
+ 'vnfd-id': 'cirros_vnfd_v2',
+ 'virtual-link-connectivity': [{
+ 'virtual-link-profile-id': 'three_vnf_constrained_nsd_low_vld1',
+ 'constituent-cpd-id': [{
+ 'constituent-base-element-id': 'one',
+ 'constituent-cpd-id': 'vnf-cp0-ext'
+ }]
+ }]
+ }, {
+ 'id': 'two',
+ 'vnfd-id': 'cirros_vnfd_v2',
+ 'virtual-link-connectivity': [{
+ 'virtual-link-profile-id': 'three_vnf_constrained_nsd_low_vld1',
+ 'constituent-cpd-id': [{
+ 'constituent-base-element-id': 'two',
+ 'constituent-cpd-id': 'vnf-cp0-ext'
+ }]
+ }, {
+ 'virtual-link-profile-id': 'three_vnf_constrained_nsd_low_vld2',
+ 'constituent-cpd-id': [{
+ 'constituent-base-element-id': 'two',
+ 'constituent-cpd-id': 'vnf-cp0-ext'
+ }]
+ }]
+ }, {
+ 'id': 'three',
+ 'vnfd-id': 'cirros_vnfd_v2',
+ 'virtual-link-connectivity': [{
+ 'virtual-link-profile-id': 'three_vnf_constrained_nsd_low_vld2',
+ 'constituent-cpd-id': [{
+ 'constituent-base-element-id': 'three',
+ 'constituent-cpd-id': 'vnf-cp0-ext'
+ }]
+ }]
+ }]
+ }],
+ 'virtual-link-desc': [{
+ 'id': 'three_vnf_constrained_nsd_low_vld1',
+ 'mgmt-network': True,
+ 'vim-network-name': 'external'
+ }, {
+ 'id': 'three_vnf_constrained_nsd_low_vld2',
+ 'mgmt-network': True,
+ 'vim-network-name': 'lanretxe'
+ }],
+ }
######################################################