From e5d7862c7c6c02847b8b4f95d2af0c5e9a454828 Mon Sep 17 00:00:00 2001 From: "Lovett, Trevor" Date: Mon, 15 Apr 2019 11:47:25 -0500 Subject: [VVP] Updated network param validations per reqts Change-Id: Idb0e051d6063cd94b733ed68093989d527592c9f Issue-ID: VVP-193 Signed-off-by: Lovett, Trevor Signed-off-by: Lovett, Trevor (tl2972) --- .../vnf_base.yaml | 53 +++++++++++++++ .../vnf_base.yaml | 50 ++++++++++++++ .../vnf_base.yaml | 50 ++++++++++++++ .../fail/fail_external_no_get_param/vnf_base.yaml | 53 +++++++++++++++ .../fail_incorrect_naming_convention/module1.yaml | 49 ++++++++++++++ .../fail_incorrect_naming_convention/vnf_base.yaml | 54 +++++++++++++++ .../module1.yaml | 49 ++++++++++++++ .../nested.yaml | 46 +++++++++++++ .../vnf_base.yaml | 53 +++++++++++++++ .../fail/fail_module_not_using_base/module1.yaml | 56 +++++++++++++++ .../fail/fail_module_not_using_base/vnf_base.yaml | 54 +++++++++++++++ .../fail/fail_network_role_mismatch/module1.yaml | 49 ++++++++++++++ .../fail/fail_network_role_mismatch/vnf_base.yaml | 51 ++++++++++++++ .../fail/fail_not_in_outputs/module1.yaml | 49 ++++++++++++++ .../fail/fail_not_in_outputs/vnf_base.yaml | 46 +++++++++++++ .../pass/nested.yaml | 49 ++++++++++++++ .../pass/pass0.yaml | 79 ++++++++++++++++++++++ .../pass/pass0_base.yaml | 54 +++++++++++++++ 18 files changed, 944 insertions(+) create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_get_param_with_list/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_invalid_param_format/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_network_role_mismatch/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_no_get_param/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/module1.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/module1.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/nested.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/module1.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/module1.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/module1.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/vnf_base.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/nested.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0.yaml create mode 100644 ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml (limited to 'ice_validator/tests/fixtures/test_neutron_port_network_attachment') diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_get_param_with_list/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_get_param_with_list/vnf_base.yaml new file mode 100644 index 0000000..8f9ff53 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_get_param_with_list/vnf_base.yaml @@ -0,0 +1,53 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +parameters: + external_net_id: + type: string + + external_net_name: + type: string + +resources: + + vmtype_0_external_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: [ {get_param: external_net_id}, 0 ]} diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_invalid_param_format/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_invalid_param_format/vnf_base.yaml new file mode 100644 index 0000000..42c81c0 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_invalid_param_format/vnf_base.yaml @@ -0,0 +1,50 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +parameters: + external_net: + type: string + +resources: + + vmtype_0_external_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: external_net } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_network_role_mismatch/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_network_role_mismatch/vnf_base.yaml new file mode 100644 index 0000000..3375480 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_network_role_mismatch/vnf_base.yaml @@ -0,0 +1,50 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +parameters: + external_net_id: + type: string + +resources: + + vmtype_0_other_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: external_net_id } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_no_get_param/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_no_get_param/vnf_base.yaml new file mode 100644 index 0000000..8954e32 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_external_no_get_param/vnf_base.yaml @@ -0,0 +1,53 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +parameters: + external_net_id: + type: string + + external_net_name: + type: string + +resources: + + vmtype_0_external_port_0: + type: OS::Neutron::Port + properties: + network: 123 diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/module1.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/module1.yaml new file mode 100644 index 0000000..bbab87d --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/module1.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_intranet_net: + type: string + + +resources: + + vmtype_0_int_intranet_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/vnf_base.yaml new file mode 100644 index 0000000..bb0b819 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_incorrect_naming_convention/vnf_base.yaml @@ -0,0 +1,54 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_intranet_network: + type: OS::Neutron::Net + properties: + name: network_name + +outputs: + + int_intranet_net: + value: { get_resource: int_intranet_network } + + int_intranet_net_name: + value: { get_attr: int_intranet_network } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/module1.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/module1.yaml new file mode 100644 index 0000000..25d8d15 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/module1.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_intranet_net_id: + type: string + + +resources: + + vmtype_0_int_intranet_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net_id } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/nested.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/nested.yaml new file mode 100644 index 0000000..456702c --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/nested.yaml @@ -0,0 +1,46 @@ +# -*- 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: + type: string + +resources: + + int_special_RVN: + type: OS::ContrailV2::VirtualNetwork diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/vnf_base.yaml new file mode 100644 index 0000000..7f7d616 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_internal_no_matching_network_base/vnf_base.yaml @@ -0,0 +1,53 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_other_network: + type: OS::Neutron::Net + properties: + name: network_name + + nested_resource: + type: nested.yaml + +outputs: + int_intranet_net_id: + value: { get_resource: int_other_network } \ No newline at end of file diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/module1.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/module1.yaml new file mode 100644 index 0000000..f415e46 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/module1.yaml @@ -0,0 +1,56 @@ +# -*- 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_intranet_net_id: + type: string + + + int_intranet_net_name: + type: string + + other_net_name: + type: string + + +resources: + + vmtype_0_int_intranet_port_0: + type: OS::Neutron::Port + properties: + network: 123 diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/vnf_base.yaml new file mode 100644 index 0000000..7c6e4df --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_module_not_using_base/vnf_base.yaml @@ -0,0 +1,54 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_intranet_network: + type: OS::Neutron::Net + properties: + name: network_name + +outputs: + + int_intranet_net_id: + value: { get_resource: int_intranet_network } + + int_intranet_net_name: + value: { get_attr: int_intranet_network } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/module1.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/module1.yaml new file mode 100644 index 0000000..fa81355 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/module1.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_intranet_net_id: + type: string + + +resources: + + vmtype_0_int_internal_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net_id } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/vnf_base.yaml new file mode 100644 index 0000000..13d96a3 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_network_role_mismatch/vnf_base.yaml @@ -0,0 +1,51 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_intranet_network: + type: OS::Neutron::Net + properties: + name: network_name + +outputs: + + int_intranet_net_id: + value: { get_resource: int_intranet_network } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/module1.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/module1.yaml new file mode 100644 index 0000000..25d8d15 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/module1.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_intranet_net_id: + type: string + + +resources: + + vmtype_0_int_intranet_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net_id } diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/vnf_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/vnf_base.yaml new file mode 100644 index 0000000..bb15eb9 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/fail/fail_not_in_outputs/vnf_base.yaml @@ -0,0 +1,46 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_intranet_network: + type: OS::Neutron::Net + properties: + name: network_name \ No newline at end of file diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/nested.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/nested.yaml new file mode 100644 index 0000000..3deba7c --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/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: + type: string + +resources: + + vm_typeX_0_intranet_port_3: + type: OS::Neutron::Port + properties: + network: { get_param: int_special_net } + diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0.yaml new file mode 100644 index 0000000..e9e6b91 --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0.yaml @@ -0,0 +1,79 @@ +# -*- 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_intranet_net_id: + type: string + + + int_intranet_net_name: + type: string + + other_net_name: + type: string + + +resources: + + vmtype_0_int_intranet_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net_id } + + vmtype_0_int_intranet_port_1: + type: OS::Neutron::Port + properties: + network: { get_param: int_intranet_net_name } + + vmtype_0_other_port_0: + type: OS::Neutron::Port + properties: + network: { get_param: other_net_name } + + int_module_network: + type: OS::Neutron::Net + properties: + name: network_name + + vmtype_1_int_module_port_0: + type: OS::Neutron::Port + properties: + network: { get_resource: int_module_network } + + nested_resource: + type: nested.yaml diff --git a/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml new file mode 100644 index 0000000..7c6e4df --- /dev/null +++ b/ice_validator/tests/fixtures/test_neutron_port_network_attachment/pass/pass0_base.yaml @@ -0,0 +1,54 @@ +# -*- 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============================================ +# +# +# VERSION: '1.0.0' + +resources: + + int_intranet_network: + type: OS::Neutron::Net + properties: + name: network_name + +outputs: + + int_intranet_net_id: + value: { get_resource: int_intranet_network } + + int_intranet_net_name: + value: { get_attr: int_intranet_network } -- cgit 1.2.3-korg