Align Docker tests with validations 88/141388/1
authorFrancescoFioraEst <francesco.fiora@est.tech>
Thu, 26 Jun 2025 08:45:59 +0000 (09:45 +0100)
committerFrancesco Fiora <francesco.fiora@est.tech>
Thu, 26 Jun 2025 08:48:22 +0000 (08:48 +0000)
Align Docker CSIT tests with validations in creation of an instance.

Issue-ID: POLICY-5402
Change-Id: Ibeeda7bc5dd685b3c0f6022222e42015521c2e75
Signed-off-by: FrancescoFioraEst <francesco.fiora@est.tech>
csit/resources/tests/data/acelement-usecaseDocker.yaml [new file with mode: 0644]
csit/resources/tests/policy-clamp-test.robot

diff --git a/csit/resources/tests/data/acelement-usecaseDocker.yaml b/csit/resources/tests/data/acelement-usecaseDocker.yaml
new file mode 100644 (file)
index 0000000..828d0ea
--- /dev/null
@@ -0,0 +1,158 @@
+# ============LICENSE_START=======================================================
+# Copyright (C) 2025  OpenInfra Foundation Europe. All rights reserved.
+# ================================================================================
+# 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+tosca_definitions_version: tosca_simple_yaml_1_3
+data_types:
+  onap.datatypes.ToscaConceptIdentifier:
+    derived_from: tosca.datatypes.Root
+    properties:
+      name:
+        type: string
+        required: true
+      version:
+        type: string
+        required: true
+
+node_types:
+  org.onap.policy.clamp.acm.Participant:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+  org.onap.policy.clamp.acm.AutomationCompositionElement:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      startPhase:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        metadata:
+          common: true
+        description: A value indicating the start phase in which this automation composition element will be started, the
+          first start phase is zero. Automation Composition Elements are started in their start_phase order and stopped
+          in reverse start phase order. Automation Composition Elements with the same start phase are started and
+          stopped simultaneously
+      uninitializedToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from uninitialized to passive
+      passiveToRunningTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to running
+      runningToPassiveTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from running to passive
+      passiveToUninitializedTimeout:
+        type: integer
+        required: false
+        constraints:
+          - greater_or_equal: 0
+        default: 60
+        metadata:
+          common: true
+        description: The maximum time in seconds to wait for a state chage from passive to uninitialized
+  org.onap.policy.clamp.acm.AutomationComposition:
+    version: 1.0.1
+    derived_from: tosca.nodetypes.Root
+    properties:
+      provider:
+        type: string
+        required: false
+        metadata:
+          common: true
+        description: Specifies the organization that provides the automation composition element
+      elements:
+        type: list
+        required: true
+        metadata:
+          common: true
+        entry_schema:
+          type: onap.datatypes.ToscaConceptIdentifier
+        description: Specifies a list of automation composition element definitions that make up this automation composition definition
+  org.onap.policy.clamp.acm.PolicyAutomationCompositionElement:
+    version: 1.0.0
+    derived_from: org.onap.policy.clamp.acm.AutomationCompositionElement
+    properties:
+      policy_type_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: true
+      policy_id:
+        type: onap.datatypes.ToscaConceptIdentifier
+        required: false
+
+topology_template:
+  inputs:
+    acm_element_policy:
+      type: onap.datatypes.ToscaConceptIdentifier
+      description: The ID of the operational policy to use
+      default:
+        name: onap.policies.native.apex.ac.element
+        version: 1.0.0
+  node_templates:
+    org.onap.policy.clamp.acm.PolicyParticipant:
+      version: 2.3.1
+      type: org.onap.policy.clamp.acm.Participant
+      type_version: 1.0.1
+      description: Participant for Policy microservices
+      properties:
+        provider: ONAP
+    onap.policy.clamp.ac.element.Policy_AutomationCompositionElement:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.PolicyAutomationCompositionElement
+      type_version: 1.0.0
+      description: Automation composition element for the operational policy for Performance Management Subscription Handling
+      properties:
+        provider: Ericsson
+        startPhase: 0
+
+    onap.policy.clamp.ac.element.AutomationCompositionDefinition:
+      version: 1.2.3
+      type: org.onap.policy.clamp.acm.AutomationComposition
+      type_version: 1.0.1
+      description: Automation composition for Demo
+      properties:
+        provider: ONAP
+        elements:
+          - name: onap.policy.clamp.ac.element.Policy_AutomationCompositionElement
+            version: 1.2.3
index c61a096..0238f9b 100644 (file)
@@ -111,7 +111,10 @@ DeleteACDefinitionSimple
 
 CommissionAutomationComposition
     [Documentation]  Commission automation composition definition.
-    ${postyaml}=  Get file  ${CURDIR}/data/acelement-usecase.yaml
+    Run Keyword If    '${TEST_ENV}'=='k8s'    set Suite variable  ${compositionFile}  acelement-usecase.yaml
+
+    ...    ELSE    set Suite variable  ${compositionFile}  acelement-usecaseDocker.yaml
+    ${postyaml}=  Get file  ${CURDIR}/data/${compositionFile}
     ${tmpCompositionId}=  MakeCommissionAcDefinition  ${postyaml}
     set Suite variable  ${compositionId}  ${tmpCompositionId}