diff options
Diffstat (limited to 'models-interactions/model-yaml/src/test/resources/v1.0.0')
16 files changed, 1093 insertions, 0 deletions
diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_control_loop_no_control_loop_name.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_control_loop_no_control_loop_name.yaml new file mode 100644 index 000000000..768545307 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_control_loop_no_control_loop_name.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..cc4d0996f --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_exception_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_exception_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..c25cf707c --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_exception_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_exception: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_guard_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_guard_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..50ab0cf0a --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_guard_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_guard: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_retries_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_retries_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..eb8f08458 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_retries_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_retries: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_timeout_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_timeout_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..77c296363 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_failure_timeout_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_timeout: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_success_connected_to_unknown_policy.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_success_connected_to_unknown_policy.yaml new file mode 100644 index 000000000..ee2ee7f92 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_policy_success_connected_to_unknown_policy.yaml @@ -0,0 +1,37 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: unknown-policy diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_1.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_1.yaml new file mode 100644 index 000000000..ad5736b86 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_1.yaml @@ -0,0 +1,109 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: FOO + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + success: unique-policy-id-2-healthcheck-restart + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-2-healthcheck-restart + name: HealthCheck Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-3-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-4-healthcheck-rebuild + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-4-healthcheck-rebuild + name: HealthCheck the Rebuild Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-5-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-6-healthcheck-migrate + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + + - id: unique-policy-id-6-healthcheck-migrate + name: Healthcheck the Migrate Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_2.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_2.yaml new file mode 100644 index 000000000..c04e0ba71 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_2.yaml @@ -0,0 +1,109 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: FINAL_SUCCESS + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + success: unique-policy-id-2-healthcheck-restart + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-2-healthcheck-restart + name: HealthCheck Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-3-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-4-healthcheck-rebuild + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-4-healthcheck-rebuild + name: HealthCheck the Rebuild Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-5-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-6-healthcheck-migrate + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + + - id: unique-policy-id-6-healthcheck-migrate + name: Healthcheck the Migrate Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_no_trigger_id.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_no_trigger_id.yaml new file mode 100644 index 000000000..e5ee3fe4a --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/bad_trigger_no_trigger_id.yaml @@ -0,0 +1,35 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/empty.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/empty.yaml new file mode 100644 index 000000000..5337f9cc7 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/empty.yaml @@ -0,0 +1,14 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml new file mode 100644 index 000000000..20ae46e19 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_OpenLoop.yaml @@ -0,0 +1,26 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + version: 1.0.0 + controlLoopName: ControlLoop-Open-fac4ae3d-c3f5-4bab-8e54-0a8581ede132 + services: + - serviceName: Service + resources: + - resourceType: VF + resourceName: Example + trigger_policy: final_openloop + timeout: 0 + +policies: diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_Test.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_Test.yaml new file mode 100644 index 000000000..73486b08b --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_Test.yaml @@ -0,0 +1,109 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + success: unique-policy-id-2-healthcheck-restart + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-2-healthcheck-restart + name: HealthCheck Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-3-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-4-healthcheck-rebuild + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-4-healthcheck-rebuild + name: HealthCheck the Rebuild Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-5-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: VM + retry: 0 + timeout: 600 + success: unique-policy-id-6-healthcheck-migrate + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception + + - id: unique-policy-id-6-healthcheck-migrate + name: Healthcheck the Migrate Policy + description: + actor: APPC + recipe: HealthCheck + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_vService.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_vService.yaml new file mode 100644 index 000000000..009a49c19 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/policy_vService.yaml @@ -0,0 +1,75 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + version: 1.0.0 + controlLoopName: ControlLoop-vUSP-vCTS-cbed919f-2212-4ef7-8051-fe6308da1bda + services: + - serviceName: vUSP + resources: + - resourceName: vCTS + resourceType: VF + - resourceName: vCOM + resourceType: VF + - resourceName: vRAR + resourceType: VF + - resourceName: vLCS + resourceType: VF + - resourceName: v3CB + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy + description: + actor: APPC + recipe: Restart + target: VM + retry: 2 + timeout: 300 + success: final_success + failure: unique-policy-id-2-rebuild + failure_timeout: unique-policy-id-2-rebuild + failure_retries: unique-policy-id-2-rebuild + failure_exception: final_failure_exception + + - id: unique-policy-id-2-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: VM + retry: 0 + timeout: 600 + success: final_success + failure: unique-policy-id-3-migrate + failure_timeout: unique-policy-id-3-migrate + failure_retries: unique-policy-id-3-migrate + failure_exception: final_failure_exception + + - id: unique-policy-id-3-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: VM + retry: 0 + timeout: 600 + success: final_success + failure: final_failure + failure_timeout: final_failure_timeout + failure_retries: final_failure_retries + failure_exception: final_failure_exception diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/test.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/test.yaml new file mode 100644 index 000000000..440e7b309 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/test.yaml @@ -0,0 +1,318 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: APPC + recipe: Restart + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: unique-policy-id-2-modifyconfig + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: unique-policy-id-7-modifyconfig-for-failure + failure_guard: unique-policy-id-7-modifyconfig-for-failure + + - id: unique-policy-id-2-modifyconfig + name: ModifyConfig Policy + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + failure: unique-policy-id-3-rebuild + failure_timeout: unique-policy-id-3-rebuild + failure_retries: unique-policy-id-3-rebuild + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: unique-policy-id-3-rebuild + name: Rebuild Policy + description: + actor: APPC + recipe: Rebuild + target: + type: VM + resourceID: vm1 + retry: 0 + timeout: 600 + success: unique-policy-id-4-modifyconfig + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: unique-policy-id-4-modifyconfig + name: HealthCheck the Rebuild Policy + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + failure: unique-policy-id-5-migrate + failure_timeout: unique-policy-id-5-migrate + failure_retries: unique-policy-id-5-migrate + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: unique-policy-id-5-migrate + name: Migrate Policy + description: + actor: APPC + recipe: Migrate + target: + type: VM + resourceID: vm1 + retry: 0 + timeout: 600 + success: unique-policy-id-6-modifyconfig + failure: FINAL_FAILURE + failure_timeout: FINAL_FAILURE_TIMEOUT + failure_retries: FINAL_FAILURE_RETRIES + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: unique-policy-id-6-modifyconfig + name: ModifyConfig after Migrate Policy + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + failure: FINAL_FAILURE + failure_timeout: FINAL_FAILURE_TIMEOUT + failure_retries: FINAL_FAILURE_RETRIES + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: unique-policy-id-7-modifyconfig-for-failure + name: ModifyConfig for Failure + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + failure: FINAL_FAILURE + failure_timeout: FINAL_FAILURE_TIMEOUT + failure_retries: FINAL_FAILURE_RETRIES + failure_exception: FINAL_FAILURE_EXCEPTION + + - id: + name: invalid policy - id is null + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: SUCCESS + name: invalid policy - id is a PolicyResult + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: FINAL_SUCCESS + name: invalid policy - id is a FinalResult + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-null-actor + name: invalid policy - actor is null + description: + actor: + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-unknown-actor + name: invalid policy - actor is unknown + description: + actor: UnknownActor + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-null-receipe + name: invalid policy - receipe is null + description: + actor: APPC + recipe: + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-unknown-receipe + name: invalid policy - unknown receipe + description: + actor: APPC + recipe: UnknownReceipe + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-null-target + name: invalid policy - target is null + description: + actor: APPC + recipe: ModifyConfig + target: + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-null-target-type + name: invalid policy - target type is null + description: + actor: APPC + recipe: ModifyConfig + target: + type: + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_SUCCESS + + - id: invalid-policy-invalid-success-policy + name: invalid policy - success policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + success: FINAL_FAILURE + + - id: invalid-policy-invalid-failure-policy + name: invalid policy - failure policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure: FINAL_FAILURE_TIMEOUT + + - id: invalid-policy-invalid-failure-timeout-policy + name: invalid policy - failure timeout policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_timeout: FINAL_FAILURE_RETRIES + + - id: invalid-policy-invalid-failure-retries-policy + name: invalid policy - failure retries policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_retries: FINAL_FAILURE_EXCEPTION + + - id: invalid-policy-invalid-failure-exception-policy + name: invalid policy - failure exception policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_exception: FINAL_FAILURE_GUARD + + - id: invalid-policy-invalid-failure-guard-policy + name: invalid policy - failure guard policy is invalid + description: + actor: APPC + recipe: ModifyConfig + target: + type: VM + resourceID: vm1 + retry: 2 + timeout: 300 + failure_guard: FINAL_SUCCESS + + diff --git a/models-interactions/model-yaml/src/test/resources/v1.0.0/test_evil.yaml b/models-interactions/model-yaml/src/test/resources/v1.0.0/test_evil.yaml new file mode 100644 index 000000000..d6127fe96 --- /dev/null +++ b/models-interactions/model-yaml/src/test/resources/v1.0.0/test_evil.yaml @@ -0,0 +1,39 @@ +# Copyright 2018 AT&T Intellectual Property. All rights reserved +# Modifications Copyright (C) 2019 Nordix Foundation. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file 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. +controlLoop: + controlLoopName: ControlLoop-TEST-5dfa8fce-bd7a-4424-b60d-ee2ad2f254a3 + version: 1.0.0 + services: + - serviceName: Foo Service + resources: + - resourceName: Bar VNF + resourceType: VF + trigger_policy: unique-policy-id-1-restart + timeout: 1200 + +policies: + - id: unique-policy-id-1-restart + name: Restart Policy for Trigger Event + description: + actor: MSO + recipe: Instantiate + target: VM + retry: 2 + timeout: 300 + success: final_failure_exception + failure: final_success + failure_timeout: final_success + failure_retries: final_success + failure_exception: final_failure_exception |