diff options
author | Lovett, Trevor <trevor.lovett@att.com> | 2019-02-07 10:46:33 -0800 |
---|---|---|
committer | Lovett, Trevor (tl2972) <tl2972@att.com> | 2019-02-08 12:41:46 -0600 |
commit | 981e09ed2538cd187b31e66f8c73792fb8d246eb (patch) | |
tree | e0262e53ffe33ab39e8081c285bc316c486fb20c /ice_validator/tests/fixtures | |
parent | 20c6955caddbb6e126755bbf4cc2412279d0a11f (diff) |
[VVP] Fixing internal network check
The test_neutron_port_internal_network test
is intended to check that internal networks
referenced in **incremental** modules are defined
and exported in the base template. The current
version of the test applies this check to nested
modules as well causing false violations to be flagged.
Issue-ID: VVP-163
Change-Id: I42cc81acf0cc2b6827ae8cf4e9a7faa4af91f9b4
Signed-off-by: Lovett, Trevor (tl2972) <tl2972@att.com>
Diffstat (limited to 'ice_validator/tests/fixtures')
3 files changed, 70 insertions, 23 deletions
diff --git a/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/nested.yaml b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/nested.yaml new file mode 100644 index 0000000..882a757 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/nested.yaml @@ -0,0 +1,49 @@ +# -*- coding: utf8 -*- +# ============LICENSE_START==================================================== +# org.onap.vvp/validation-scripts +# =================================================================== +# Copyright © 2019 AT&T Intellectual Property. All rights reserved. +# =================================================================== +# +# Unless otherwise specified, all software contained herein is licensed +# under the Apache License, Version 2.0 (the "License"); +# you may not use this software except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# +# Unless otherwise specified, all documentation contained herein is licensed +# under the Creative Commons License, Attribution 4.0 Intl. (the "License"); +# you may not use this documentation except in compliance with the License. +# You may obtain a copy of the License at +# +# https://creativecommons.org/licenses/by/4.0/ +# +# Unless required by applicable law or agreed to in writing, documentation +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# ============LICENSE_END============================================ + +parameters: + + int_special_net_id: + type: string + +resources: + + vm_typeX_0_intranet_port_3: + type: OS::Neutron::Port + properties: + network: { get_param: int_special_net_id } + diff --git a/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0.yaml b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0.yaml index 2309104..6983f7c 100644 --- a/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0.yaml +++ b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0.yaml @@ -2,7 +2,7 @@ # ============LICENSE_START==================================================== # org.onap.vvp/validation-scripts # =================================================================== -# Copyright © 2017 AT&T Intellectual Property. All rights reserved. +# Copyright © 2019 AT&T Intellectual Property. All rights reserved. # =================================================================== # # Unless otherwise specified, all software contained herein is licensed @@ -34,11 +34,7 @@ # limitations under the License. # # ============LICENSE_END============================================ -# -# -# VERSION: '1.0.0' ---- parameters: vm_typeX_bialy_vlan_filter: @@ -53,16 +49,15 @@ parameters: type: string subnet_id_param: type: string - int_extnet_net_id: - type: string - int_intranet_net_name: + int_intranet_net_id: type: string + resources: vm_typeX_0_intranet_port_2: type: OS::Neutron::Port properties: - network: { get_param: int_intranet_net_name } + network: { get_param: int_intranet_net_id } fixed_ips: - ip_address: { get_param: lb_1_int_intranet_floating_ip } subnet: { get_param: subnet_param } @@ -81,7 +76,7 @@ resources: vm_typeX_3_extnet_port_2: type: OS::Neutron::Port properties: - network: { get_param: int_extnet_net_id } + network: { get_param: int_intranet_net_id } fixed_ips: - ip_address: { get_param: lb_2_extnet_floating_v6_ip } subnet: { get_param: subnet_param } @@ -97,3 +92,14 @@ resources: metadata: port_type: SR-IOV_Mirrored_Trunk + int_special_network: + type: OS::Neutron::Net + + vm_typeX_3_extnet_port_3: + type: nested.yaml + properties: + int_special_net_id: { get_resource: int_special_network } + + + + diff --git a/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0_base.yaml index 797396c..248f780 100644 --- a/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0_base.yaml +++ b/ice_validator/tests/fixtures/test_neutron_port_internal_network/pass/pass0_base.yaml @@ -38,25 +38,17 @@ # # VERSION: '1.0.0' ---- -outputs: - int_extnet_net_id: - value: { get_resource: int_extnet_net_id } +parameters: int_intranet_net_name: - value: { get_param: int_intranet_net_name } - + type: string resources: int_intranet_network: type: OS::Neutron::Net - properties: - name: { get_param: int_intranet_net_name } - int_extnet_network: - type: OS::Neutron::Net +outputs: -parameters: - int_intranet_net_name: - type: string + int_intranet_net_id: + value: { get_resource: int_intranet_network } |