aboutsummaryrefslogtreecommitdiffstats
path: root/ice_validator/tests/fixtures
diff options
context:
space:
mode:
authorLovett, Trevor <trevor.lovett@att.com>2019-10-07 16:06:17 -0500
committerLovett, Trevor (tl2972) <tl2972@att.com>2019-10-07 16:12:35 -0500
commitd78c645df31a19567667d3e6d3acdf0474f39bf1 (patch)
treeb048fa852adb672cde6ddcd44922698bf6ae6325 /ice_validator/tests/fixtures
parentc238e85627eb8f34e030e043df8d2dc7e85e68f7 (diff)
[VVP] Enforce R-35666 by ensuring a network exists for int_ parameters
Implements a basic sanity check that if parameters match the internal network naming convention, then we ensure the network itself was defined in a heat template. Change-Id: I37c84e2c62745a51a90dd60f0aaeb213d784f003 Issue-ID: VVP-327 Signed-off-by: Lovett, Trevor (tl2972) <trevor.lovett@att.com>
Diffstat (limited to 'ice_validator/tests/fixtures')
-rw-r--r--ice_validator/tests/fixtures/test_internal_networks/fail/base.yaml41
-rw-r--r--ice_validator/tests/fixtures/test_internal_networks/fail/module.yaml41
-rw-r--r--ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/base.yaml41
-rw-r--r--ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/module.yaml41
-rw-r--r--ice_validator/tests/fixtures/test_internal_networks/pass/single_file/base.yaml46
-rw-r--r--ice_validator/tests/fixtures/test_network_format/fail/contrail/invalid_contrail_network_name.yaml42
-rw-r--r--ice_validator/tests/fixtures/test_network_format/fail/neutron/invalid_neutron_net_name.yaml42
-rw-r--r--ice_validator/tests/fixtures/test_network_format/fail/subnet/missing_subnet.yaml (renamed from ice_validator/tests/fixtures/test_network_format/fail/invalid_naming_used_for_network.yaml)27
-rw-r--r--ice_validator/tests/fixtures/test_network_format/pass/valid_heat_template.yaml40
9 files changed, 306 insertions, 55 deletions
diff --git a/ice_validator/tests/fixtures/test_internal_networks/fail/base.yaml b/ice_validator/tests/fixtures/test_internal_networks/fail/base.yaml
new file mode 100644
index 0000000..d73dea3
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_internal_networks/fail/base.yaml
@@ -0,0 +1,41 @@
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+heat_template_version: 2015-05-23
+
+resources:
+
+ int_other_network:
+ type: OS::Neutron::Net
diff --git a/ice_validator/tests/fixtures/test_internal_networks/fail/module.yaml b/ice_validator/tests/fixtures/test_internal_networks/fail/module.yaml
new file mode 100644
index 0000000..1644859
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_internal_networks/fail/module.yaml
@@ -0,0 +1,41 @@
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+heat_template_version: 2015-05-23
+
+parameters:
+
+ db_int_oam_floating_v6_ip:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/base.yaml b/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/base.yaml
new file mode 100644
index 0000000..a35b7d5
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/base.yaml
@@ -0,0 +1,41 @@
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+heat_template_version: 2015-05-23
+
+resources:
+
+ int_oam_network:
+ type: OS::Neutron::Net
diff --git a/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/module.yaml b/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/module.yaml
new file mode 100644
index 0000000..1644859
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_internal_networks/pass/multi_file/module.yaml
@@ -0,0 +1,41 @@
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+heat_template_version: 2015-05-23
+
+parameters:
+
+ db_int_oam_floating_v6_ip:
+ type: string
diff --git a/ice_validator/tests/fixtures/test_internal_networks/pass/single_file/base.yaml b/ice_validator/tests/fixtures/test_internal_networks/pass/single_file/base.yaml
new file mode 100644
index 0000000..45f6896
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_internal_networks/pass/single_file/base.yaml
@@ -0,0 +1,46 @@
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+heat_template_version: 2015-05-23
+
+parameters:
+
+ db_int_oam_floating_v6_ip:
+ type: string
+
+resources:
+
+ int_oam_network:
+ type: OS::Neutron::Net
diff --git a/ice_validator/tests/fixtures/test_network_format/fail/contrail/invalid_contrail_network_name.yaml b/ice_validator/tests/fixtures/test_network_format/fail/contrail/invalid_contrail_network_name.yaml
new file mode 100644
index 0000000..d89564b
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_network_format/fail/contrail/invalid_contrail_network_name.yaml
@@ -0,0 +1,42 @@
+# -*- coding: utf8 -*-
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+#
+#
+---
+resources:
+ int_oam_netork:
+ type: OS::ContrailV2::VirtualNetwork
diff --git a/ice_validator/tests/fixtures/test_network_format/fail/neutron/invalid_neutron_net_name.yaml b/ice_validator/tests/fixtures/test_network_format/fail/neutron/invalid_neutron_net_name.yaml
new file mode 100644
index 0000000..d573ad8
--- /dev/null
+++ b/ice_validator/tests/fixtures/test_network_format/fail/neutron/invalid_neutron_net_name.yaml
@@ -0,0 +1,42 @@
+# -*- coding: utf8 -*-
+# ============LICENSE_START=======================================================
+# org.onap.vvp/validation-scripts
+# ===================================================================
+# Copyright © 2017 AT&T Intellectual Property. All rights reserved.
+# ===================================================================
+#
+# Unless otherwise specified, all software contained herein is licensed
+# under the Apache License, Version 2.0 (the "License");
+# you may not use this software except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+#
+#
+# Unless otherwise specified, all documentation contained herein is licensed
+# under the Creative Commons License, Attribution 4.0 Intl. (the "License");
+# you may not use this documentation except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://creativecommons.org/licenses/by/4.0/
+#
+# Unless required by applicable law or agreed to in writing, documentation
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ============LICENSE_END============================================
+#
+#
+---
+resources:
+ int_oam_netork:
+ type: OS::Neutron::Net
diff --git a/ice_validator/tests/fixtures/test_network_format/fail/invalid_naming_used_for_network.yaml b/ice_validator/tests/fixtures/test_network_format/fail/subnet/missing_subnet.yaml
index 2854c0c..506f573 100644
--- a/ice_validator/tests/fixtures/test_network_format/fail/invalid_naming_used_for_network.yaml
+++ b/ice_validator/tests/fixtures/test_network_format/fail/subnet/missing_subnet.yaml
@@ -38,32 +38,7 @@
#
---
resources:
- vm_type_1_int_intranet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: int_intranet_net_name }
-
- vm_type_1_int_vpnnet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: int_vpnnet_net_id }
-
- vm_type_1_extnet_net_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: extnet_net_name }
-
- vm_type_1_extnet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: extnet_net_id }
-
- int_oam_netork:
+ int_oam_network:
type: OS::Neutron::Net
properties:
name: { get_param: int_oam_net_name }
-
- vm_type_1_int_oam_1_port:
- type: OS::Neutron::Port
- properties:
- gbgdfjk: { get_resource: int_oam_net }
diff --git a/ice_validator/tests/fixtures/test_network_format/pass/valid_heat_template.yaml b/ice_validator/tests/fixtures/test_network_format/pass/valid_heat_template.yaml
index 8755077..3035deb 100644
--- a/ice_validator/tests/fixtures/test_network_format/pass/valid_heat_template.yaml
+++ b/ice_validator/tests/fixtures/test_network_format/pass/valid_heat_template.yaml
@@ -38,37 +38,19 @@
#
---
resources:
- vm_type_1_int_intranet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: int_intranet_net_name }
-
- vm_type_1_int_vpnnet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: int_vpnnet_net_id }
-
- vm_type_1_extnet_net_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: extnet_net_name }
-
- vm_type_1_extnet_0_port:
- type: OS::Neutron::Port
- properties:
- network: { get_param: extnet_net_id }
int_oam_network:
- type: OS::Neutron::Net
- properties:
- name: { get_param: int_oam_net_name }
+ type: OS::Neutron::Net
int_oam_subnet:
- type: OS::Neutron::Subnet
- properties:
- network: { get_resource: int_oam_network }
-
- vm_type_1_int_oam_1_port:
- type: OS::Neutron::Port
+ type: OS::Neutron::Subnet
+ properties:
+ network: { get_resource: int_oam_network }
+
+ int_other_network:
+ type: OS::ContrailV2::VirtualNetwork
+
+ int_other_subnet:
+ type: OS::Neutron::Subnet
properties:
- network: { get_resource: int_oam_net }
+ network: { get_resource: int_other_network }