aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-02-05 16:17:58 -0600
committerLovett, Trevor <trevor.lovett@att.com>2019-02-05 16:18:27 -0600
commitf0711c0fcbdea9242c5ec11a64b1cbf614cc841b (patch)
treefd247de4e080abe3a591e63669bb16cb13ea9d16 /ice_validator
parent10535815da964c683e5f91030934652bfb3f53b8 (diff)
[VVP] Removing invalid tests
Change-Id: I9336fa834b08748cabb5ac49495f1591f15939f8 Issue-ID: VVP-150 Signed-off-by: Lovett, Trevor <trevor.lovett@att.com>
Diffstat (limited to 'ice_validator')
-rw-r--r--ice_validator/tests/fixtures/test_nova_servergroup_policies/fail/not_supported_policies.yml75
-rw-r--r--ice_validator/tests/fixtures/test_nova_servergroup_policies/pass/with_supported_policies.yml75
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_instance_uuid_volume_attachment.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id_2.yaml60
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param_2.yaml61
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_resource.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_2.yaml70
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_uppercase.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template.yaml149
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_2.yaml70
-rw-r--r--ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_3.yaml59
-rw-r--r--ice_validator/tests/test_nova_servergroup_policies.py87
-rw-r--r--ice_validator/tests/test_volume_resource_ids.py168
16 files changed, 0 insertions, 1768 deletions
diff --git a/ice_validator/tests/fixtures/test_nova_servergroup_policies/fail/not_supported_policies.yml b/ice_validator/tests/fixtures/test_nova_servergroup_policies/fail/not_supported_policies.yml
deleted file mode 100644
index 76ce293..0000000
--- a/ice_validator/tests/fixtures/test_nova_servergroup_policies/fail/not_supported_policies.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-resources:
- db_server_group:
- type: OS::Nova::ServerGroup
- properties:
- name:
- str_replace:
- params:
- $vnf_name: {get_param: vnf_name}
- template: $vnf_name-server_group1
- policies:
- - OS Profile
- lb_server_group:
- type: OS::Nova::ServerGroup
- properties:
- name:
- str_replace:
- params:
- $vnf_name: {get_param: vnf_name}
- template: $vnf_name-server_group2
- policies:
- - affinity
- db_0:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: db_server_group}
- db_1:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: db_server_group}
- lb_0:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: lb_server_group}
diff --git a/ice_validator/tests/fixtures/test_nova_servergroup_policies/pass/with_supported_policies.yml b/ice_validator/tests/fixtures/test_nova_servergroup_policies/pass/with_supported_policies.yml
deleted file mode 100644
index 023aefa..0000000
--- a/ice_validator/tests/fixtures/test_nova_servergroup_policies/pass/with_supported_policies.yml
+++ /dev/null
@@ -1,75 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-resources:
- db_server_group:
- type: OS::Nova::ServerGroup
- properties:
- name:
- str_replace:
- params:
- $vnf_name: {get_param: vnf_name}
- template: $vnf_name-server_group1
- policies:
- - anti-affinity
- lb_server_group:
- type: OS::Nova::ServerGroup
- properties:
- name:
- str_replace:
- params:
- $vnf_name: {get_param: vnf_name}
- template: $vnf_name-server_group2
- policies:
- - affinity
- db_0:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: db_server_group}
- db_1:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: db_server_group}
- lb_0:
- type: OS::Nova::Server
- properties:
- scheduler_hints:
- group: {get_param: lb_server_group}
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_instance_uuid_volume_attachment.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_instance_uuid_volume_attachment.yaml
deleted file mode 100644
index a504cd1..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_instance_uuid_volume_attachment.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: admin2_server_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id.yaml
deleted file mode 100644
index a5cea0c..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin2_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin2_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: admin_server_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id_2.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id_2.yaml
deleted file mode 100644
index 935c867..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_nova_server_id_2.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_ids:
- type: json
- description: Unique IDs for volumes
-
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin2_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : [admin_volume_ids, 0] }, delete_on_termination : "false" }]
- flavor: { get_param: admin2_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : [admin_volume_ids, 1] }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param.yaml
deleted file mode 100644
index 672abde..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin2_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: admin_server_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param_2.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param_2.yaml
deleted file mode 100644
index 05b760c..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_param_2.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_ids:
- type: json
- description: Unique IDs for volumes
-
-
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : [admin2_volume_ids, 0] }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : [admin_volume_ids, 1] }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_resource.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_resource.yaml
deleted file mode 100644
index df83d7c..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_resource.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin2_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: admin_server_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment.yaml
deleted file mode 100644
index d971b1c..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin2_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: admin_server_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_2.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_2.yaml
deleted file mode 100644
index 673a8db..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_2.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-heat_template_version: 2015-04-30
-
-description: Heat template using json string for volumes
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_ids:
- type: json
- description: Unique IDs for volumes
-
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: {get_param: [admin_volume_ids, 0]}
- instance_uuid: {get_resource: admin_server_0}
-
- admin_volume_attachment_1:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: {get_param: [admin2_volume_ids, 1]}
- instance_uuid: {get_resource: admin_server_1}
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_uppercase.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_uppercase.yaml
deleted file mode 100644
index b24e446..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/fail/mismatch_vm_type_volume_id_volume_attachment_uppercase.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin2_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: ADMIN_SERVER_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template.yaml
deleted file mode 100644
index 5e47d56..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template.yaml
+++ /dev/null
@@ -1,149 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
----
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_id_0:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_1:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_id_2:
- type: string
- description: reference to externally created cinder vol
-
- admin_volume_size_0:
- type: number
- description: Size of the volume to be created.
- constraints:
- - range: { min: 1, max: 1024 }
- description: must be between 1 and 1024 Gb.
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : admin_volume_id_0 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : admin_volume_id_1 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- ADMIN_SERVER_2:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 2] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_3:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 3] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_resource : admin_volume_id_3 }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_id_3:
- type: OS::Cinder::Volume
- properties:
- size: { get_param: admin_volume_size_0}
- availability_zone: { get_param: availability_zone_0 }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: { get_param: admin_volume_id_2 }
- mountpoint: /dev/vdb
- instance_uuid: { get_resource: ADMIN_SERVER_2 }
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_2.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_2.yaml
deleted file mode 100644
index d1ca7d5..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_2.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
-heat_template_version: 2015-04-30
-
-description: Heat template using json string for volumes
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_ids:
- type: json
- description: Unique IDs for volumes
-
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_volume_attachment_0:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: {get_param: [admin_volume_ids, 0]}
- instance_uuid: {get_resource: admin_server_0}
-
- admin_volume_attachment_1:
- type: OS::Cinder::VolumeAttachment
- properties:
- volume_id: {get_param: [admin_volume_ids, 1]}
- instance_uuid: {get_resource: admin_server_1}
diff --git a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_3.yaml b/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_3.yaml
deleted file mode 100644
index c6d9d87..0000000
--- a/ice_validator/tests/fixtures/test_volume_resource_ids/pass/valid_template_3.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
-heat_template_version: 2015-04-30
-
-description: Heat template description
-
-parameters:
-
- vnf_id:
- type: string
- description: Unique ID for this VNF instance
-
- vf_module_id:
- type: string
- description: Unique ID for this VF module
-
- vnf_name:
- type: string
- description: Unique name for this VNF instance
-
- admin_names:
- type: comma_delimited_list
- description: Names attribute for the VMs
-
- availability_zone_0:
- type: string
- description: availability zone to be used
-
- admin_flavor_name:
- type: string
- description: flavor to be used to create this vm must be one of the following flavors
-
- admin_volume_ids:
- type: json
- description: Unique IDs for volumes
-
-resources:
-
- admin_server_0:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 0] }
- block_device_mapping: [{ device_name: "vda", volume_id: { get_param : [admin_volume_ids, 0] }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
-
- admin_server_1:
- type: OS::Nova::Server
- properties:
- availability_zone: { get_param: availability_zone_0 }
- name: { get_param: [admin_names, 1] }
- block_device_mapping: [{ device_name: "vda", volume_id : { get_param : [admin_volume_ids, 1] }, delete_on_termination : "false" }]
- flavor: { get_param: admin_flavor_name}
- metadata:
- vnf_name: { get_param: vnf_name }
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
diff --git a/ice_validator/tests/test_nova_servergroup_policies.py b/ice_validator/tests/test_nova_servergroup_policies.py
deleted file mode 100644
index b3df88a..0000000
--- a/ice_validator/tests/test_nova_servergroup_policies.py
+++ /dev/null
@@ -1,87 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
-
-from tests import cached_yaml as yaml
-import pytest
-
-
-def test_nova_servergroup_policies(yaml_file):
- """
- Check that nova servergroup resources using either anti-affinity or
- affinity rules in policies
- """
- req_rules = ["affinity", "anti-affinity"]
-
- with open(yaml_file) as fh:
- yml = yaml.load(fh)
-
- # skip if resources are not defined
- if "resources" not in yml:
- pytest.skip("No resources specified in the heat template")
-
- invalid_policies = []
- for r_id, v1 in yml["resources"].items():
- if not isinstance(v1, dict):
- continue
- if "properties" not in v1:
- continue
- if v1.get("type") != "OS::Nova::ServerGroup":
- continue
- if "policies" not in v1["properties"].keys():
- continue
-
- try:
- all_rules = v1["properties"]["policies"]
- detected_rules = set(all_rules) & set(req_rules)
- if len(detected_rules) == 0:
- invalid_policies.append(
- "{} policies must include one of {}".format(
- r_id, ", ".join(req_rules)
- )
- )
- elif len(detected_rules) > 1:
- invalid_policies.append(
- "{} policies must include only one of {}".format(
- r_id, ", ".join(req_rules)
- )
- )
- except ValueError:
- continue
-
- assert not invalid_policies, ". ".join(invalid_policies)
diff --git a/ice_validator/tests/test_volume_resource_ids.py b/ice_validator/tests/test_volume_resource_ids.py
deleted file mode 100644
index c6af6a7..0000000
--- a/ice_validator/tests/test_volume_resource_ids.py
+++ /dev/null
@@ -1,168 +0,0 @@
-# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
-# org.onap.vvp/validation-scripts
-# ===================================================================
-# Copyright © 2019 AT&T Intellectual Property. All rights reserved.
-# ===================================================================
-#
-# Unless otherwise specified, all software contained herein is licensed
-# under the Apache License, Version 2.0 (the "License");
-# you may not use this software except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-#
-#
-# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
-# you may not use this documentation except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# https://creativecommons.org/licenses/by/4.0/
-#
-# Unless required by applicable law or agreed to in writing, documentation
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-# ============LICENSE_END============================================
-#
-#
-import re
-import pytest
-from tests import cached_yaml as yaml
-from .utils.vm_types import get_vm_type_for_nova_server
-
-
-def test_volume_resource_ids(yaml_file):
- """
- Check that all resource ids for cinder volumes follow the right
- naming convention to include the {vm_type} of the
- nova server it is associated to
- """
- with open(yaml_file) as fh:
- yml = yaml.load(fh)
-
- # skip if resources are not defined
- if "resources" not in yml:
- pytest.skip("No resources specified in the heat template")
-
- volume_pattern = re.compile(r"(.+?)_volume_id_\d+")
- resources = yml["resources"]
-
- invalid_volumes = []
- for k, v in resources.items():
- if not isinstance(v, dict):
- continue
- if "type" not in v:
- continue
- if v["type"] not in ["OS::Nova::Server", "OS::Cinder::VolumeAttachment"]:
- continue
-
- if v["type"] == "OS::Nova::Server":
- # check block_device_mapping and make sure the right
- # {vm_type} is used
- if "properties" not in v:
- continue
- if "block_device_mapping" not in v["properties"]:
- continue
-
- vm_type = get_vm_type_for_nova_server(v)
- if not vm_type:
- continue
- vm_type = vm_type.lower()
-
- # get the volume_id from the block_device_mapping
- properties = v["properties"]
- for v2 in properties["block_device_mapping"]:
- for k3, v3 in v2.items():
- if k3 != "volume_id":
- continue
- if not isinstance(v3, dict):
- continue
-
- volume_id = v3.get("get_param") or v3.get("get_resource")
- if not volume_id:
- continue
- if isinstance(volume_id, list):
- volume_id = volume_id[0].lower()
- else:
- volume_id = volume_id.lower()
-
- if vm_type + "_" not in volume_id:
- invalid_volumes.append(volume_id)
-
- elif v["type"] == "OS::Cinder::VolumeAttachment":
- # check the volume attachment and the {vm_type}
- # of the corresponding nova server
- if "properties" not in v:
- continue
- if "volume_id" not in v["properties"]:
- continue
- if "instance_uuid" not in v["properties"]:
- continue
-
- properties = v["properties"]
-
- # get the instance_uuid and when applicable
- # the nova server instance
- instance_uuid = None
- nova_server = None
-
- if "get_param" in properties["instance_uuid"]:
- continue
- elif "get_resource" in properties["instance_uuid"]:
- instance_uuid = properties["instance_uuid"]["get_resource"]
- if not resources[instance_uuid]:
- continue
- nova_server = resources[instance_uuid]
- instance_uuid = instance_uuid.lower()
- else:
- continue
-
- # get the volume_id
- volume_id = None
- volume_id = properties["volume_id"].get("get_param") or properties[
- "volume_id"
- ].get("get_resource")
- if not volume_id:
- continue
- if isinstance(volume_id, list):
- volume_id = volume_id[0].lower()
- else:
- volume_id = volume_id.lower()
-
- # do not test the case when the instance_uuid and
- # volume_id are not defined
- if not instance_uuid and not volume_id:
- continue
-
- if nova_server:
- vm_type = get_vm_type_for_nova_server(nova_server)
- if not vm_type:
- continue
- vm_type = vm_type.lower()
- if vm_type + "_" not in volume_id:
- invalid_volumes.append(volume_id)
- else:
- # extract the assumed {vm_type} from volume_id
- m = volume_pattern.match(volume_id)
- if m:
- vm_type = m.group(1).lower()
- if vm_type + "_" not in instance_uuid:
- invalid_volumes.append(volume_id)
- else:
- continue
-
- msg = "The following volumes have invalid resource IDs: {}".format(
- ", ".join(invalid_volumes)
- )
- assert not set(invalid_volumes), msg