aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/fixtures
diff options
context:
space:
mode:
authorstark, steven <ss820f@att.com>2018-09-14 07:55:49 -0700
committerstark, steven <ss820f@att.com>2018-09-14 07:55:49 -0700
commit60d5ad7d00eadd6395eca186e6fa76a43df3c6cf (patch)
tree95d83d0a70a948707ead37800bc547da7f5861b2 /ice_validator/tests/fixtures
parent31d5da59b39d38760cc519a2c5e5b70357b539e8 (diff)
[VVP] udpating scripts for casablanca 2
adding scripts updates adding docrators for sections 5.2.6 - end closes out VVP 80 Change-Id: Iecac476949aa3ae3982f8c77671869583eb313d6 Issue-ID: VVP-80 Signed-off-by: stark, steven <ss820f@att.com>
Diffstat (limited to 'ice_validator/tests/fixtures')
-rw-r--r--ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/fail/fail.yaml (renamed from ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_1.yaml)61
-rw-r--r--ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/pass/pass.yaml (renamed from ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_2.yaml)49
-rw-r--r--ice_validator/tests/fixtures/test_availability_zone_get_param/fail/not_using_get_param.yaml8
-rw-r--r--ice_validator/tests/fixtures/test_env_no_resource_registry/fail/bad.env6
-rw-r--r--ice_validator/tests/fixtures/test_env_no_resource_registry/pass/good.env6
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/fail/STARKDB-nested.yaml22
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.env60
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.yaml325
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/pass/STARKDB-nested.yaml22
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.env63
-rw-r--r--ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.yaml304
-rw-r--r--ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_default_value_specified.yaml8
-rw-r--r--ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_invalid_keys.yaml8
-rw-r--r--ice_validator/tests/fixtures/test_initial_configuration/fail/fail.yaml52
-rw-r--r--ice_validator/tests/fixtures/test_initial_configuration/pass/good_yaml_eg.yaml52
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml (renamed from ice_validator/tests/fixtures/test_nested_templates/fail/heat_template_missing_nested_files.yaml)15
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_1.yaml (renamed from ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_1.yaml)7
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml71
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml (renamed from ice_validator/tests/fixtures/test_nested_templates/pass/valid_nested_heat_template.yaml)19
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml (renamed from ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_2.yaml)7
-rw-r--r--ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml62
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail0.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail1.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_environment_context/pass/pass.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_resource_ids/pass/valid_heat_template.yaml2
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_vm_types/fail/inconsistent_vm_type.yaml13
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail0.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail1.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_nova_servers_workload_context/pass/pass.yaml59
-rw-r--r--ice_validator/tests/fixtures/test_port_resource_ids/pass/valid_template.yaml2
-rw-r--r--ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_1.yaml139
-rw-r--r--ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_3.yaml115
-rw-r--r--ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_2.yaml120
-rw-r--r--ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_1.yaml160
-rw-r--r--ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_2.yaml157
-rw-r--r--ice_validator/tests/fixtures/test_resource_has_no_condtion/fail/fail.yaml60
-rw-r--r--ice_validator/tests/fixtures/test_resource_has_no_condtion/pass/pass.yaml58
-rw-r--r--ice_validator/tests/fixtures/test_unique_resources_across_template/fail/duplicate_resource_template.yml14
-rw-r--r--ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_base_parameters.yaml (renamed from ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_parameters.yaml)0
39 files changed, 1587 insertions, 834 deletions
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_1.yaml b/ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/fail/fail.yaml
index 8341ba0..516e57f 100644
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_1.yaml
+++ b/ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/fail/fail.yaml
@@ -52,17 +52,6 @@ parameters:
vnf_name:
type: string
description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
ex1_vm_names:
type: comma_delimited_list
description: Name of the VM
@@ -73,40 +62,13 @@ parameters:
ex1_flavor_name:
type: string
label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex1_server_index:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
+ description: Type of instance (flavor) to be used
+ #ex1_key:
+ # type: string
+ # label: key pair
+ # description: Name of the key apir the nova server will use
resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- user_data:
- get_resource: ex_software_config_0
ex1_nova_server_0:
type: OS::Nova::Server
@@ -116,19 +78,6 @@ resources:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vnf_name: { get_param: vnf_name }
- project_id: { get_param: "OS::project_id" }
- image: { get_param: ex1_image_name }
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
image: { get_param: ex1_image_name}
flavor: { get_param: ex1_flavor_name }
key_name: { get_param: ex1_key }
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_2.yaml b/ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/pass/pass.yaml
index 54edcc8..84e9b6d 100644
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_2.yaml
+++ b/ice_validator/tests/fixtures/test_all_get_param_have_defined_parameter/pass/pass.yaml
@@ -52,21 +52,6 @@ parameters:
vnf_name:
type: string
description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
ex1_vm_names:
type: comma_delimited_list
description: Name of the VM
@@ -84,27 +69,6 @@ parameters:
description: Name of the key apir the nova server will use
resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- user_data:
- get_resource: ex_software_config_0
ex1_nova_server_0:
type: OS::Nova::Server
@@ -114,19 +78,6 @@ resources:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
vnf_name: { get_param: vnf_name }
- metering.stack: { get_param: "OS::stack_id" }
image: { get_param: ex1_image_name}
flavor: { get_param: ex1_flavor_name }
key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key } \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_availability_zone_get_param/fail/not_using_get_param.yaml b/ice_validator/tests/fixtures/test_availability_zone_get_param/fail/not_using_get_param.yaml
index fa457b5..4016bb9 100644
--- a/ice_validator/tests/fixtures/test_availability_zone_get_param/fail/not_using_get_param.yaml
+++ b/ice_validator/tests/fixtures/test_availability_zone_get_param/fail/not_using_get_param.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,12 +37,15 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
resources:
vm_type_b_server_0:
type: OS::Nova::Server
properties:
- availability_zone: { str_replace: availability_zone_0 }
+ availability_zone: { not_str_replace: availability_zone_0 }
name: { get_param: vm_type_b_name_0 }
flavor: { get_param: vm_type_b_flavor_name}
image: { get_param: vm_type_b_image_name}
@@ -51,3 +54,4 @@ resources:
vnf_id: { get_param: vnf_id }
vf_module_id: { get_param: vf_module_id }
key_name: { get_param: vm_type_b_key_name }
+
diff --git a/ice_validator/tests/fixtures/test_env_no_resource_registry/fail/bad.env b/ice_validator/tests/fixtures/test_env_no_resource_registry/fail/bad.env
index 7be0e88..2802d00 100644
--- a/ice_validator/tests/fixtures/test_env_no_resource_registry/fail/bad.env
+++ b/ice_validator/tests/fixtures/test_env_no_resource_registry/fail/bad.env
@@ -2,11 +2,11 @@
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# 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);
+# 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
#
@@ -21,7 +21,7 @@
#
#
# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the License);
+# 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
#
diff --git a/ice_validator/tests/fixtures/test_env_no_resource_registry/pass/good.env b/ice_validator/tests/fixtures/test_env_no_resource_registry/pass/good.env
index 44a70dc..559e32d 100644
--- a/ice_validator/tests/fixtures/test_env_no_resource_registry/pass/good.env
+++ b/ice_validator/tests/fixtures/test_env_no_resource_registry/pass/good.env
@@ -2,11 +2,11 @@
# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
-# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# 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);
+# 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
#
@@ -21,7 +21,7 @@
#
#
# Unless otherwise specified, all documentation contained herein is licensed
-# under the Creative Commons License, Attribution 4.0 Intl. (the License);
+# 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
#
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/fail/STARKDB-nested.yaml b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/STARKDB-nested.yaml
new file mode 100644
index 0000000..97bc4cf
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/STARKDB-nested.yaml
@@ -0,0 +1,22 @@
+heat_template_version: 2015-04-30
+
+description: fdsafsfsa
+
+parameters:
+
+ my_nested_parameter:
+ type: number
+ description: sdfnklafd
+ #constraints:
+ # - range: { min: 100, max: 400 }
+
+resources:
+
+ my_nested_resource2:
+ type: test
+ properties:
+ my_nested_parameter: {get_param: my_nested_parameter}
+
+outputs:
+ test_value:
+ value: { get_param: my_nested_parameter } \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.env b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.env
new file mode 100644
index 0000000..1ce6cc4
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.env
@@ -0,0 +1,60 @@
+parameters:
+
+ fw_oam_route_prefixes: nsaflj
+
+ myvm_net_fqdn: nasfln
+
+ vnf_id: sadfadf
+
+ vf_module_id: sadfadf
+
+ vf_module_name: sadfadf
+
+ vnf_name: sadfadf
+
+ starkdb_name: bghbhjb
+
+ STARKDB_name: bghbhjb
+
+ #STARKDB_image_name: sadfadf
+
+ #STARKDB_flavor_dvdfg: sadfadf
+
+ TESTDB_name: bghbhjb
+
+
+ #TESTDB_image_name: sadfadf
+
+ #TESTDB_flavor_name: sadfadf
+
+ stark_vol1_id: sanfkl
+
+ param_X: sadnfklsadnfl
+
+ priv_net_id: 123214
+
+ priv_sub2net_id: 123123
+
+ int_priv_net_id: sndfj
+
+ workload_context: asdfsadfs
+
+ environment_context: asdfsadfs
+
+ availability_zone_0: sadnfjk
+
+ STARKDB_private_v6_ips: ansdfj
+
+ int_priv_subnet_name: safbdjk
+
+ STARKDB_crazy_floating_ip: safd
+
+ crazy_net_id: safd
+
+ crazy_subnet_id: asfd
+
+ STARKDB_crazy_ip_0: sadf
+
+ STARKDB_crazy_ip_1: fsad
+
+ TESTDB_name2: asnjkv
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.yaml b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.yaml
new file mode 100644
index 0000000..23f4e1a
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/fail/fail.yaml
@@ -0,0 +1,325 @@
+heat_template_version: 2015-04-30
+
+description: fdsafsfsa
+
+parameters:
+
+ fw_oam_route_prefixes:
+ type: string
+ description: nsjalfdn
+
+ myvm_net_fqdn:
+ type: string
+ description: nasfln
+
+ STARKDB_private_v6_ips:
+ type: comma_delimited_list
+ description: ndsajlfn
+
+ workload_context:
+ type: string
+ description: Unique ID for this VNF instance
+
+ availability_zone_0:
+ type: json
+ description: Unique ID for this VNF instance
+
+ environment_context:
+ type: string
+ description: Unique ID for this VNF instance
+
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+
+ vf_module_id:
+ type: json
+ description: Unique ID for this VNF module instance
+
+ vnf_name:
+ type: string
+ description: Unique name for this VNF instance
+
+ starkdb_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_name:
+ type: json
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_image_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_flavor_dvdfg:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+
+ TESTDB_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_name2:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_image_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_flavor_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ stark_vol1_id:
+ type: number
+ description: myvolume
+ constraints:
+ - range: { min: 100, max: 400 }
+
+ param_X:
+ type: string
+ description: fdafsda
+
+ priv_net_id:
+ type: string
+ description: external network
+
+ #priv_sub2net_id:
+ # type: json
+ # description: external subnetwork
+
+ int_priv_subnet_name:
+ type: string
+ description: sadnfjls
+
+ int_priv_net_id:
+ type: string
+ description: internal network name
+
+ STARKDB_crazy_floating_ip:
+ type: string
+ description: asnfjl
+
+ crazy_net_id:
+ type: string
+ description: ansfkld
+
+ crazy_subnet_id:
+ type: string
+ description: asdfnkal
+
+ STARKDB_crazy_ip_0:
+ type: string
+ description: nsalfd
+
+ STARKDB_crazy_ip_1:
+ type: string
+ description: nsalfd
+
+ stark_rg_count:
+ type: string
+ description: nafs
+
+resources:
+
+ STARKDB_cinder_attach:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ server: { get_resource: STARKDB_server_0 }
+ volume: { get_param: stark_vol1_id }
+
+ STARKDB_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: STARKDB_image_name }
+ flavor: { get_param: STARKDB_flavor_dvdfg }
+ name: { get_param: starkdb_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: { get_resource: STARKDB_0_int_priv_port_0 }
+ - port: { get_resource: STARKDB_0_PRIV_port_1}
+ - port: { get_resource: STARKDB_0_crazy_port_0 }
+ - network: { get_param: int_priv_net_id }
+ user_data: { get_file: deep-nested.file }
+
+
+ STARKDB_server_1:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: STARKDB_image_name }
+ flavor: { get_param: STARKDB_flavor_dvdfg }
+ name: { get_param: STARKDB_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: STARKDB_1_int_priv_port_0}
+ - port: {get_resource: STARKDB_1_crazy_port_0}
+ - network: { get_param: int_priv_net_id }
+
+ TESTDB_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: TESTDB_image_name }
+ flavor: { get_param: TESTDB_flavor_name }
+ name: { get_param: TESTDB_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: TESTDB_0_int_priv_port_0}
+ - network: { get_param: int_priv_net_id }
+
+ availability_zone: { get_param: availability_zone_0 }
+
+ TESTDB_server_1:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: TESTDB_image_name }
+ flavor: { get_param: TESTDB_flavor_name }
+ name: { get_param: TESTDB_name2 }
+ metadata:
+ test_fqdn: { get_param: myvm_net_fqdn }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: TESTDB_0_int_priv_port_0}
+ - network: { get_param: int_priv_net_id }
+
+ vol_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_param: stark_vol1_id }
+ server: { get_resource: STARKDB_server_0 }
+
+ int_private_net_id:
+ type: OS::Neutron::Net
+ properties:
+ name: { get_param: int_priv_net_id }
+
+ priv_network:
+ type: OS::Neutron::Net
+ properties:
+ fnsdf: nksldfnkl
+
+ stark_nested_resource:
+ type: STARKDB-nested.yaml
+ properties:
+ my_nested_parame: { get_param: vnf_id }
+
+ int_priv_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: { get_param: int_priv_subnet_name}
+ network_id: { get_resource: int_private_net_id }
+
+ STARKDB_0_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_private_net_id }
+ fixed_ips:
+ - subnet_id: { get_resource: int_priv_subnet }
+ - ip_address: { get_param: STARKDB_private_v6_ips }
+
+
+ STARKDB_0_crazy_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: crazy_net_id }
+ fixed_ips:
+ - subnet_id: { get_param: crazy_subnet_id }
+ - ip_address: { get_param: STARKDB_crazy_ip_0 }
+ allowed_address_pairs: [ { "ip_address": {get_param:
+ STARKDB_crazy_floating_ip}}]
+
+
+ STARKDB_1_crazy_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: crazy_net_id }
+ fixed_ips:
+ - subnet_id: { get_param: crazy_subnet_id }
+ - ip_address: { get_param: STARKDB_crazy_ip_1 }
+ allowed_address_pairs: [ { "ip_address": {get_param:
+ STARKDB_crazy_floating_ip}}]
+
+ STARKDB_1_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_private_net_id }
+
+
+ TESTDB_0_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: int_priv_net_id }
+
+ STARKDB_0_PRIV_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: priv_net_id }
+
+ STARKDB_cloud_config:
+ type: OS::Heat::CloudConfig
+
+
+ myrouteprefix:
+ type: OS::ContrailV2::InterfaceRouteTable
+ properties:
+ name:
+ str_replace:
+ template: VNF_NAME_interface_route_table
+ params:
+ VNF_NAME: { get_param: vnf_name }
+ interface_route_table_routes:
+ interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
+ test: safd
+
+ stark_rg:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: stark_rg_count }
+ resource_def:
+ type: STARKDB-nested.yaml
+ properties:
+ my_nested_parameter: 4
+
+outputs:
+ test_output:
+ value: { list_join: [',', [ { get_param: param_X }, { get_param: stark_vol1_id } ] ] }
+
+ int_priv_su2bnet_id:
+ value: { get_resource: int_priv_subnet }
+
+ int_priv_net_id:
+ value: { get_resource: int_private_net_id }
+
+ STARKDB_crazy_floating_ip:
+ value: { get_param: STARKDB_crazy_floating_ip }
+
+ crazy_subnet_id:
+ value: { get_param: crazy_subnet_id }
+
+ crazy_net_id:
+ value: { get_param: crazy_net_id }
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/pass/STARKDB-nested.yaml b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/STARKDB-nested.yaml
new file mode 100644
index 0000000..97bc4cf
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/STARKDB-nested.yaml
@@ -0,0 +1,22 @@
+heat_template_version: 2015-04-30
+
+description: fdsafsfsa
+
+parameters:
+
+ my_nested_parameter:
+ type: number
+ description: sdfnklafd
+ #constraints:
+ # - range: { min: 100, max: 400 }
+
+resources:
+
+ my_nested_resource2:
+ type: test
+ properties:
+ my_nested_parameter: {get_param: my_nested_parameter}
+
+outputs:
+ test_value:
+ value: { get_param: my_nested_parameter } \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.env b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.env
new file mode 100644
index 0000000..46d2728
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.env
@@ -0,0 +1,63 @@
+parameters:
+
+ #fw_oam_route_prefixes: nsaflj
+
+ #myvm_net_fqdn: nasfln
+
+ #vnf_id: sadfadf
+
+ #vf_module_id: sadfadf
+
+ #vnf_name: sadfadf
+
+ #starkdb_name: bghbhjb
+
+ #STARKDB_name: bghbhjb
+
+ STARKDB_image_name: sadfadf
+
+ STARKDB_flavor_dvdfg: sadfadf
+
+ #TESTDB_name: bghbhjb
+
+ TESTDB_avail_hosts: test
+
+ TESTDB_image_name: sadfadf
+
+ TESTDB_flavor_name: sadfadf
+
+ stark_vol1_id: sanfkl
+
+ param_X: sadnfklsadnfl
+
+ priv_net_id: 123214
+
+ #priv_sub2net_id: 123123
+
+ #int_priv_net_id: sndfj
+
+ #workload_context: asdfsadfs
+
+ #environment_context: asdfsadfs
+
+ #availability_zone_0: sadnfjk
+
+ #STARKDB_private_v6_ips: ansdfj
+
+ #int_priv_subnet_name: safbdjk
+
+ #STARKDB_crazy_floating_ip: safd
+
+ crazy_net_id: safd
+
+ #crazy_subnet_id: asfd
+
+ #STARKDB_crazy_ip_0: sadf
+
+ #STARKDB_crazy_ip_1: fsad
+
+ #TESTDB_name2: asnjkv
+
+ stark_rg_count: najsf
+
+ my_nested_parameter: nasjlf \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.yaml b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.yaml
new file mode 100644
index 0000000..42f23ee
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_environment_file_parameters/pass/pass.yaml
@@ -0,0 +1,304 @@
+heat_template_version: 2015-04-30
+
+description: fdsafsfsa
+
+parameters:
+
+ fw_oam_route_prefixes:
+ type: string
+ description: nsjalfdn
+
+ myvm_net_fqdn:
+ type: string
+ description: nasfln
+
+ TESTDB_avail_hosts:
+ type: string
+ description: nsfadl
+
+ STARKDB_private_v6_ips:
+ type: comma_delimited_list
+ description: ndsajlfn
+
+ workload_context:
+ type: string
+ description: Unique ID for this VNF instance
+
+ availability_zone_0:
+ type: json
+ description: Unique ID for this VNF instance
+
+ environment_context:
+ type: string
+ description: Unique ID for this VNF instance
+
+ vnf_id:
+ type: string
+ description: Unique ID for this VNF instance
+
+ vf_module_id:
+ type: json
+ description: Unique ID for this VNF module instance
+
+ vnf_name:
+ type: string
+ description: Unique name for this VNF instance
+
+ starkdb_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_name:
+ type: json
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_image_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ STARKDB_flavor_dvdfg:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+
+ TESTDB_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_name2:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_image_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ TESTDB_flavor_name:
+ type: string
+ description: fdhsfbsakdjnfjdsank
+
+ stark_vol1_id:
+ type: number
+ description: myvolume
+ constraints:
+ - range: { min: 100, max: 400 }
+
+ param_X:
+ type: string
+ description: fdafsda
+
+ priv_net_id:
+ type: string
+ description: external network
+
+ #priv_sub2net_id:
+ # type: json
+ # description: external subnetwork
+
+ int_priv_subnet_name:
+ type: string
+ description: sadnfjls
+
+ int_priv_net_id:
+ type: string
+ description: internal network name
+
+ STARKDB_crazy_floating_ip:
+ type: string
+ description: asnfjl
+
+ crazy_net_id:
+ type: string
+ description: ansfkld
+
+ crazy_subnet_id:
+ type: string
+ description: asdfnkal
+
+ STARKDB_crazy_ip_0:
+ type: string
+ description: nsalfd
+
+ STARKDB_crazy_ip_1:
+ type: string
+ description: nsalfd
+
+ stark_rg_count:
+ type: string
+ description: njlasd
+
+ my_nested_parameter:
+ type: string
+ description: naskl
+
+resources:
+
+ STARKDB_cinder_attach:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ server: { get_resource: STARKDB_server_0 }
+ volume: { get_param: stark_vol1_id }
+
+ STARKDB_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: STARKDB_image_name }
+ flavor: { get_param: STARKDB_flavor_dvdfg }
+ name: { get_param: starkdb_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: { get_resource: STARKDB_0_int_priv_port_0 }
+ - port: { get_resource: STARKDB_0_PRIV_port_1}
+ - port: { get_resource: STARKDB_0_crazy_port_0 }
+
+
+ STARKDB_server_1:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: STARKDB_image_name }
+ flavor: { get_param: STARKDB_flavor_dvdfg }
+ name: { get_param: STARKDB_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: STARKDB_1_int_priv_port_0}
+ - port: {get_resource: STARKDB_1_crazy_port_0}
+
+ TESTDB_server_0:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: TESTDB_image_name }
+ flavor: { get_param: TESTDB_flavor_name }
+ name: { get_param: TESTDB_name }
+ metadata:
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: TESTDB_0_int_priv_port_0}
+ availability_zone: { get_param: availability_zone_0 }
+
+ TESTDB_server_1:
+ type: OS::Nova::Server
+ properties:
+ image: { get_param: TESTDB_image_name }
+ flavor: { get_param: TESTDB_flavor_name }
+ name: { get_param: TESTDB_name2 }
+ metadata:
+ test_fqdn: { get_param: myvm_net_fqdn }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ vnf_name: { get_param: vnf_name }
+ #int_network_id: { get_resource: int_priv_network }
+ workload_context: { get_param: workload_context }
+ environment_context: { get_param: environment_context }
+ networks:
+ - port: {get_resource: TESTDB_0_int_priv_port_0}
+ availability_zone: { get_param: [ TESTDB_avail_hosts, 0 ] }
+
+
+ vol_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_param: stark_vol1_id }
+ server: { get_resource: STARKDB_server_0 }
+
+ int_private_net_id:
+ type: OS::Neutron::Net
+ properties:
+ name: { get_param: int_priv_net_id }
+
+ priv_network:
+ type: OS::Neutron::Net
+ properties:
+ fnsdf: nksldfnkl
+
+ int_priv_subnet:
+ type: OS::Neutron::Subnet
+ properties:
+ name: { get_param: int_priv_subnet_name}
+ network_id: { get_resource: int_private_net_id }
+
+ STARKDB_0_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_private_net_id }
+ fixed_ips:
+ - subnet_id: { get_resource: int_priv_subnet }
+ - ip_address: { get_param: STARKDB_private_v6_ips }
+
+
+ STARKDB_0_crazy_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: crazy_net_id }
+ fixed_ips:
+ - subnet_id: { get_param: crazy_subnet_id }
+ - ip_address: { get_param: STARKDB_crazy_ip_0 }
+ allowed_address_pairs: [ { "ip_address": {get_param:
+ STARKDB_crazy_floating_ip}}]
+
+
+ STARKDB_1_crazy_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: crazy_net_id }
+ fixed_ips:
+ - subnet_id: { get_param: crazy_subnet_id }
+ - ip_address: { get_param: STARKDB_crazy_ip_1 }
+ allowed_address_pairs: [ { "ip_address": {get_param:
+ STARKDB_crazy_floating_ip}}]
+
+ STARKDB_1_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_private_net_id }
+
+
+ TESTDB_0_int_priv_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: int_priv_net_id }
+
+ STARKDB_0_PRIV_port_1:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_param: priv_net_id }
+
+ STARKDB_cloud_config:
+ type: OS::Heat::CloudConfig
+
+
+ myrouteprefix:
+ type: OS::ContrailV2::InterfaceRouteTable
+ properties:
+ name:
+ str_replace:
+ template: VNF_NAME_interface_route_table
+ params:
+ VNF_NAME: { get_param: vnf_name }
+ interface_route_table_routes:
+ interface_route_table_routes_route: { get_param: fw_oam_route_prefixes }
+ test: safd
+
+ stark_rg:
+ type: OS::Heat::ResourceGroup
+ properties:
+ count: { get_param: stark_rg_count }
+ resource_def:
+ type: STARKDB-nested.yaml
+ properties:
+ my_nested_parameter: {get_param: my_nested_parameter}
diff --git a/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_default_value_specified.yaml b/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_default_value_specified.yaml
index e57ebe5..cd2a398 100644
--- a/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_default_value_specified.yaml
+++ b/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_default_value_specified.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,9 +37,12 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
parameters:
- a!:
+ a$:
type: string
label: human-readable name of the parameter
description: description of the parameter
@@ -51,3 +54,4 @@ parameters:
- allowed_pattern: "[A-Z]+[a-zA-Z0-9]*"
description: User name must start with an uppercase character
immutable: true
+
diff --git a/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_invalid_keys.yaml b/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_invalid_keys.yaml
index c3cc4c5..8fc93b0 100644
--- a/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_invalid_keys.yaml
+++ b/ice_validator/tests/fixtures/test_heat_parameter_section/fail/parameter_invalid_keys.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,9 +37,12 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
parameters:
- a!:
+ a$:
type: string
label: human-readable name of the parameter
description: description of the parameter
@@ -52,3 +55,4 @@ parameters:
description: User name must start with an uppercase character
immutable: true
dummy_key: "dummy_key"
+
diff --git a/ice_validator/tests/fixtures/test_initial_configuration/fail/fail.yaml b/ice_validator/tests/fixtures/test_initial_configuration/fail/fail.yaml
new file mode 100644
index 0000000..d37fa18
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_initial_configuration/fail/fail.yaml
@@ -0,0 +1,52 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+---
+ a: 1
+ b:
+ c: 3
+ d: 4
+ e:
+ f: 4
+ g:
+ h:
+ test: test
+ k: g
+basdnafdlsnsakdlfsdaf
+ test: out
diff --git a/ice_validator/tests/fixtures/test_initial_configuration/pass/good_yaml_eg.yaml b/ice_validator/tests/fixtures/test_initial_configuration/pass/good_yaml_eg.yaml
new file mode 100644
index 0000000..559c598
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_initial_configuration/pass/good_yaml_eg.yaml
@@ -0,0 +1,52 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+---
+ a: 1
+ b:
+ c: 3
+ d: 4
+ e:
+ f: 4
+ g:
+ h:
+ test: test
+ k: g
+
+ test: out \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_nested_templates/fail/heat_template_missing_nested_files.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml
index 87a3aa6..a6a8a0e 100644
--- a/ice_validator/tests/fixtures/test_nested_templates/fail/heat_template_missing_nested_files.yaml
+++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/heat_template.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,8 +37,11 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
-nested_template_description: base
+description: base
parameters:
vm_type_volume_name_0:
@@ -50,13 +53,13 @@ resources:
server_0:
type: nested_template_1.yaml
properties:
- name: {get_param: server_name_0}
+ name: { get_param: server_name_0 }
my_resource_group_1:
- type: OS::Nova::Server
+ type: OS::Heat::ResourceGroup
properties:
count: 5
- resource_def: { type: nested_template_2.yaml }
+ resource_def: { type: nested_template_bad.yaml }
outputs:
vm_type_volume_id_0:
- value: {get_resource: vm_type_volume_0} \ No newline at end of file
+ value: {get_resource: vm_type_volume_0}
diff --git a/ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_1.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_1.yaml
index cb8e4a9..5f2732f 100644
--- a/ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_1.yaml
+++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_1.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,6 +37,9 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
heat_template_version: 2013-05-23
@@ -56,4 +59,4 @@ resources:
type: OS::Nova::Server
properties:
image: myimage
- flavor: m1.small \ No newline at end of file
+ flavor: m1.small
diff --git a/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml b/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml
new file mode 100644
index 0000000..9271e4b
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nested_parameters/fail/nested_template_bad.yaml
@@ -0,0 +1,71 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+---
+heat_template_version: 2013-05-23
+
+resources:
+ volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 1
+
+ volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_resource: volume }
+ instance_uuid: { get_resource: instance }
+
+ instance:
+ type: OS::Nova::Server
+ properties:
+ image: myimage
+ flavor: m1.small
+
+parameters:
+ admin_volume_size_0:
+ type: number
+ description: Size of the volume to be created.
+ constraints:
+ - range: { min: 1, max: 1024 }
+ description: nested templates MAY NOT have constraints.
+
diff --git a/ice_validator/tests/fixtures/test_nested_templates/pass/valid_nested_heat_template.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml
index 74b795f..bb9585b 100644
--- a/ice_validator/tests/fixtures/test_nested_templates/pass/valid_nested_heat_template.yaml
+++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/heat_template.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,7 +37,18 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
+description: base
+
+parameters:
+ vm_type_volume_name_0:
+ type: string
+ vm_type_volume_size_0:
+ type: number
+
resources:
server_0:
type: nested_template_1.yaml
@@ -47,4 +58,8 @@ resources:
type: OS::Heat::ResourceGroup
properties:
count: 5
- resource_def: { type: nested_template_2.yaml } \ No newline at end of file
+ resource_def: { type: nested_template_good.yaml }
+
+outputs:
+ vm_type_volume_id_0:
+ value: {get_resource: vm_type_volume_0}
diff --git a/ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_2.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml
index cb8e4a9..5f2732f 100644
--- a/ice_validator/tests/fixtures/test_nested_templates/pass/nested_template_2.yaml
+++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_1.yaml
@@ -1,5 +1,5 @@
# -*- coding: utf8 -*-
-# ============LICENSE_START=======================================================
+# ============LICENSE_START====================================================
# org.onap.vvp/validation-scripts
# ===================================================================
# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
@@ -37,6 +37,9 @@
#
# ECOMP is a trademark and service mark of AT&T Intellectual Property.
#
+
+# VERSION = '1.0.0'
+
---
heat_template_version: 2013-05-23
@@ -56,4 +59,4 @@ resources:
type: OS::Nova::Server
properties:
image: myimage
- flavor: m1.small \ No newline at end of file
+ flavor: m1.small
diff --git a/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml
new file mode 100644
index 0000000..5f2732f
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nested_parameters/pass/nested_template_good.yaml
@@ -0,0 +1,62 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+---
+heat_template_version: 2013-05-23
+
+resources:
+ volume:
+ type: OS::Cinder::Volume
+ properties:
+ size: 1
+
+ volume_attachment:
+ type: OS::Cinder::VolumeAttachment
+ properties:
+ volume_id: { get_resource: volume }
+ instance_uuid: { get_resource: instance }
+
+ instance:
+ type: OS::Nova::Server
+ properties:
+ image: myimage
+ flavor: m1.small
diff --git a/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail0.yaml b/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail0.yaml
new file mode 100644
index 0000000..94473c3
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail0.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "environment_context" of type "string".
+# FAIL: no "environment_context"
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: environment_context}
+
+parameters:
+ environment_Kontext:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail1.yaml b/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail1.yaml
new file mode 100644
index 0000000..daaf406
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_environment_context/fail/fail1.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "environment_context" of type "string".
+# FAIL: "environment_context" not type "string"
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: environment_context}
+
+parameters:
+ environment_context:
+ type: number
diff --git a/ice_validator/tests/fixtures/test_nova_servers_environment_context/pass/pass.yaml b/ice_validator/tests/fixtures/test_nova_servers_environment_context/pass/pass.yaml
new file mode 100644
index 0000000..c882d66
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_environment_context/pass/pass.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "environment_context" of type "string".
+
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: environment_context}
+
+parameters:
+ environment_context:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_nova_servers_resource_ids/pass/valid_heat_template.yaml b/ice_validator/tests/fixtures/test_nova_servers_resource_ids/pass/valid_heat_template.yaml
index 3796de9..eb07cae 100644
--- a/ice_validator/tests/fixtures/test_nova_servers_resource_ids/pass/valid_heat_template.yaml
+++ b/ice_validator/tests/fixtures/test_nova_servers_resource_ids/pass/valid_heat_template.yaml
@@ -60,7 +60,7 @@ resources:
flavor: { get_param: vm_type_b_flavor_name}
image: { get_param: vm_type_b_image_name}
- VM_TYPE_B_SERVER_1:
+ vm_type_b_server_1:
type: OS::Nova::Server
properties:
name: { get_param: vm_type_b_name_1 }
diff --git a/ice_validator/tests/fixtures/test_nova_servers_vm_types/fail/inconsistent_vm_type.yaml b/ice_validator/tests/fixtures/test_nova_servers_vm_types/fail/inconsistent_vm_type.yaml
index 219bf94..253905c 100644
--- a/ice_validator/tests/fixtures/test_nova_servers_vm_types/fail/inconsistent_vm_type.yaml
+++ b/ice_validator/tests/fixtures/test_nova_servers_vm_types/fail/inconsistent_vm_type.yaml
@@ -67,4 +67,15 @@ resources:
name: { get_param: vm_type_b_name_1 }
flavor: { get_param: vm_type_b_flavor_name}
image: { get_param: vm_type_b_image_name}
- \ No newline at end of file
+ networks:
+ - port: { get_resource: vm_type_b_0_int_vm_type_b_port_0 }
+
+ int_vm_type_b_net_id:
+ type: OS::Neutron::Net
+ properties:
+ fnsdf: nksldfnkl
+
+ vm_type_b_0_int_vm_type_b_port_0:
+ type: OS::Neutron::Port
+ properties:
+ network: { get_resource: int_vm_type_b_net_id }
diff --git a/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail0.yaml b/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail0.yaml
new file mode 100644
index 0000000..762ffc0
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail0.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "workload_context" of type "string".
+# FAIL: no "workload_context"
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: workload_context}
+
+parameters:
+ workload_Kontext:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail1.yaml b/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail1.yaml
new file mode 100644
index 0000000..e713737
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_workload_context/fail/fail1.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "workload_context" of type "string".
+# FAIL: "workload_context" not type "string"
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: workload_context}
+
+parameters:
+ workload_context:
+ type: number
diff --git a/ice_validator/tests/fixtures/test_nova_servers_workload_context/pass/pass.yaml b/ice_validator/tests/fixtures/test_nova_servers_workload_context/pass/pass.yaml
new file mode 100644
index 0000000..c7138aa
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_nova_servers_workload_context/pass/pass.yaml
@@ -0,0 +1,59 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+# resource of type "OS::Nova::Server" has metadata
+# which references parameter "workload_context" of type "string".
+
+---
+resources:
+ vm_type_a_server_0:
+ type: OS::Nova::Server
+ properties:
+ name: { get_param: [vm_type_a_names, 0] }
+ flavor: { get_param: vm_type_a_flavor_name}
+ image: { get_param: vm_type_a_image_name}
+ metadata:
+ my_attribute: {get_param: workload_context}
+
+parameters:
+ workload_context:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_port_resource_ids/pass/valid_template.yaml b/ice_validator/tests/fixtures/test_port_resource_ids/pass/valid_template.yaml
index 50f2bd1..504fbdc 100644
--- a/ice_validator/tests/fixtures/test_port_resource_ids/pass/valid_template.yaml
+++ b/ice_validator/tests/fixtures/test_port_resource_ids/pass/valid_template.yaml
@@ -94,7 +94,7 @@ parameters:
int_vpnnet_net_id:
type: string
- description: network id for the internal network vpnnet
+ description: network id for the internal network vpnnet
int_oam_net_name:
type: string
description: name for the OAM network to be created in the resources section
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_1.yaml b/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_1.yaml
deleted file mode 100644
index 702b639..0000000
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_1.yaml
+++ /dev/null
@@ -1,139 +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============================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
----
-heat_template_version: 2013-05-23
-
-description: Simple template to deploy a single compute instance
-
-parameters:
- vnf_id:
- description: Unique ID for this VNF
- type: string
- vf_module_id:
- description: Unique ID for this VF module
- type: string
- vnf_name:
- type: string
- description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
- ex1_vm_names:
- type: comma_delimited_list
- description: Name of the VM
- ex1_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex1_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex1_server_index:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
-
-resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- networks:
- - network: { get_param: int_network_net_id }
- user_data:
- get_resource: ex_software_config_0
-
- ex1_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, 0 ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key } \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_3.yaml b/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_3.yaml
deleted file mode 100644
index 37374db..0000000
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_definition_3.yaml
+++ /dev/null
@@ -1,115 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: Simple template to deploy a single compute instance
-
-parameters:
- vnf_id:
- description: Unique ID for this VNF
- type: string
- vf_module_id:
- description: Unique ID for this VF module
- type: string
- vnf_name:
- type: string
- description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
- ex1_vm_names:
- type: comma_delimited_list
- description: Name of the VM
- ex1_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex1_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- int_network_net_id:
- type: string
- label: Network name
- description: Name of the network the nova server will connect to
- ex1_server_index:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
- availability_zone_0:
- type: string
- description: availabilityzone name
-
-
-resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_serverGroup:
- type: OS::Nova::ServerGroup
- properties:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- availability_zones: { list_join: [',', [ { get_param: availability_zone_0 }, { get_param: availability_zone_1 } ] ] }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- networks:
- - network: { get_param: int_network_net_id }
- user_data:
- get_resource: ex_software_config_0
-
- ex1_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, 0 ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_2.yaml b/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_2.yaml
deleted file mode 100644
index 10dd0dd..0000000
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/fail/missing_param_reference_2.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
-heat_template_version: 2013-05-23
-
-description: Simple template to deploy a single compute instance
-
-parameters:
- vnf_id:
- description: Unique ID for this VNF
- type: string
- vf_module_id:
- description: Unique ID for this VF module
- type: string
- vnf_name:
- type: string
- description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
- ex1_vm_names:
- type: comma_delimited_list
- description: Name of the VM
- ex1_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex1_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- int_network_net_id:
- type: string
- label: Network name
- description: Name of the network the nova server will connect to
- ex1_server_index:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
- availability_zone_0:
- type: string
- description: availabilityzone name
- availability_zone_1:
- type: string
- description: availabilityzone name
- availability_zone_2:
- type: string
- description: availabilityzone name
-
-resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_serverGroup:
- type: OS::Nova::ServerGroup
- properties:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- availability_zones: { list_join: [',', [ { get_param: availability_zone_0 }, { get_param: availability_zone_2 } ] ] }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- networks:
- - network: { get_param: int_network_net_id }
- user_data:
- get_resource: ex_software_config_0
-
- ex1_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, 0 ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_1.yaml b/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_1.yaml
deleted file mode 100644
index e852402..0000000
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_1.yaml
+++ /dev/null
@@ -1,160 +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============================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
----
-heat_template_version: 2013-05-23
-
-description: Simple template to deploy a single compute instance
-
-parameters:
- vnf_id:
- description: Unique ID for this VNF
- type: string
- vf_module_id:
- description: Unique ID for this VF module
- type: string
- vnf_name:
- type: string
- description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
- ex1_vm_names:
- type: comma_delimited_list
- description: Name of the VM
- ex1_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex1_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex1_server_index_0:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
- ex1_server_info:
- type: json
- label: Json containing server index
- description: Json containing the index of server
-
-resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- metering.stack: { get_param: "OS::stack_id" }
- project_id: { get_param: "OS::project_id" }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- user_data:
- get_resource: ex_software_config_0
-
- ex1_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, 0 ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index_0 } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
- ex1_nova_server_2:
- type: OS::Nova::Server
- properties:
- name:
- get_param:
- - ex1_vm_names
- - get_param:
- - ex1_server_info
- - ex1_server_metadata
- - ex1_server_index_1
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key } \ No newline at end of file
diff --git a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_2.yaml b/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_2.yaml
deleted file mode 100644
index ff8421f..0000000
--- a/ice_validator/tests/fixtures/test_referenced_and_defined_parameters_match/pass/params_referenced_are_defined_and_vice_versa_2.yaml
+++ /dev/null
@@ -1,157 +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============================================
-#
-# ECOMP is a trademark and service mark of AT&T Intellectual Property.
-#
----
-heat_template_version: 2013-05-23
-
-description: Simple template to deploy a single compute instance
-
-parameters:
- vnf_id:
- description: Unique ID for this VNF
- type: string
- vf_module_id:
- description: Unique ID for this VF module
- type: string
- vnf_name:
- type: string
- description: Unique name for this VNF instance
- ex_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- ex_vm_name:
- type: string
- description: Name of the VM
- ex1_vm_names:
- type: comma_delimited_list
- description: Name of the VM
- ex1_image_name:
- type: string
- label: Image name or ID
- description: Image to be used for compute instance
- ex1_flavor_name:
- type: string
- label: Flavor
- description: Type of instance (flavor) to be used
- ex1_key:
- type: string
- label: key pair
- description: Name of the key apir the nova server will use
- int_network_net_id:
- type: string
- label: Network name
- description: Name of the network the nova server will connect to
- ex1_server_index:
- type: number
- label: server index
- description: Index of server
- constraint:
- - range: { min: 1, max: 100 }
- availability_zone_0:
- type: string
- description: availabilityzone name
- availability_zone_1:
- type: string
- description: availabilityzone name
-
-resources:
- ex_software_config_0:
- type: OS::Heat::SoftwareConfig
- properties:
- group: ungrouped
- config:
- params:
- $stack_name: { get_param: 'OS::stack_name' }
-
- ex_nova_serverGroup:
- type: OS::Nova::ServerGroup
- properties:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- availability_zones: { list_join: [',', [ { get_param: availability_zone_0 }, { get_param: availability_zone_1 } ] ] }
-
- ex_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: ex_vm_name }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex_image_name }
- flavor: { get_param: ex_flavor_name }
- key_name: { get_param: ex_key }
- networks:
- - network: { get_param: int_network_net_id }
- user_data:
- get_resource: ex_software_config_0
-
- ex1_nova_server_0:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, 0 ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
-
- ex1_nova_server_1:
- type: OS::Nova::Server
- properties:
- name: { get_param: [ ex1_vm_names, { get_param: ex1_server_index } ] }
- metadata:
- vnf_id: { get_param: vnf_id }
- vf_module_id: { get_param: vf_module_id }
- vnf_name: { get_param: vnf_name }
- image: { get_param: ex1_image_name}
- flavor: { get_param: ex1_flavor_name }
- key_name: { get_param: ex1_key }
diff --git a/ice_validator/tests/fixtures/test_resource_has_no_condtion/fail/fail.yaml b/ice_validator/tests/fixtures/test_resource_has_no_condtion/fail/fail.yaml
new file mode 100644
index 0000000..343d761
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_resource_has_no_condtion/fail/fail.yaml
@@ -0,0 +1,60 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+---
+
+resources:
+ vm_type_b_server_0:
+ type: OS::Nova::Server
+ properties:
+ availability_zone: { get_param: availability_zone_a }
+ name: { get_param: vm_type_b_name_0 }
+ flavor: { get_param: vm_type_b_flavor_name}
+ image: { get_param: vm_type_b_image_name}
+ metadata:
+ vnf_name: { get_param: vnf_name }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ key_name: { get_param: vm_type_b_key_name }
+ conditions:
+ condition1: True
+
diff --git a/ice_validator/tests/fixtures/test_resource_has_no_condtion/pass/pass.yaml b/ice_validator/tests/fixtures/test_resource_has_no_condtion/pass/pass.yaml
new file mode 100644
index 0000000..6f745d8
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_resource_has_no_condtion/pass/pass.yaml
@@ -0,0 +1,58 @@
+# -*- 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============================================
+#
+# ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#
+
+# VERSION = '1.0.0'
+
+---
+
+resources:
+ vm_type_b_server_0:
+ type: OS::Nova::Server
+ properties:
+ availability_zone: { get_param: availability_zone_a }
+ name: { get_param: vm_type_b_name_0 }
+ flavor: { get_param: vm_type_b_flavor_name}
+ image: { get_param: vm_type_b_image_name}
+ metadata:
+ vnf_name: { get_param: vnf_name }
+ vnf_id: { get_param: vnf_id }
+ vf_module_id: { get_param: vf_module_id }
+ key_name: { get_param: vm_type_b_key_name }
+
diff --git a/ice_validator/tests/fixtures/test_unique_resources_across_template/fail/duplicate_resource_template.yml b/ice_validator/tests/fixtures/test_unique_resources_across_template/fail/duplicate_resource_template.yml
index 40543d1..d4abed5 100644
--- a/ice_validator/tests/fixtures/test_unique_resources_across_template/fail/duplicate_resource_template.yml
+++ b/ice_validator/tests/fixtures/test_unique_resources_across_template/fail/duplicate_resource_template.yml
@@ -42,17 +42,9 @@ resources:
volume_1:
type: OS::Cinder::Volume
properties:
- name:
- str_replace:
- template: VF_NAME_STACK_NAME_oam_volume
- params:
- VNF_NAME: {get_param: vnf_module_id }
+ name: test_name
+
volume_1:
type: OS::Cinder::Volume
properties:
- name:
- str_replace:
- template: VF_NAME_STACK_NAME_oam_volume
- params:
- VNF_NAME: {get_param: vnf_name }
- STACK_NAME: { get_param: 'OS::stack_name' }
+ name: test_name
diff --git a/ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_parameters.yaml b/ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_base_parameters.yaml
index d382920..d382920 100644
--- a/ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_parameters.yaml
+++ b/ice_validator/tests/fixtures/test_volume_outputs_consumed/fail/more_outputs_than_base_parameters.yaml