Loading src/test/resources/hypo/orchestrator.feature +9 Changes for src/test/resources/hypo/orchestrator.feature: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,15 @@ Scenario: Run full sequence once # 8) Get Fabric controller * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)' } # 8a) Edit Domain Identity Resource * def identityId = 'FKfuWDxTQ' * call read('classpath:hypo/fabric.feature@updateDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 8b) Get Domain Identity Resource * call read('classpath:hypo/fabric.feature@getDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 9) servive order k8s # Create request * def createRes = call read('service.feature@createServiceOrderResourceK8s') { auth_token: '#(auth_token)', clusterType:'public-prek8s' } Loading src/test/resources/hypo/orchestratorOCM.feature +24 −17 Changes for src/test/resources/hypo/orchestratorOCM.feature: 24 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -22,12 +22,19 @@ Scenario: Run full sequence once # 7) Create Fabric controller * call read('classpath:hypo/fabric.feature@createFabric') {auth_token: '#(auth_token)'} * def networkControllerId = '8f0f3c87-29d2-41a1-9a56-1a2ef8c5d2c1' * def fabricRes = call read('classpath:hypo/fabric.feature@createFabric') { auth_token: '#(auth_token)' } * def networkControllerId = fabricRes.networkControllerId # 8) Get Fabric controller * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)' } # 8a) Edit Domain Identity Resource * def identityId = 'FKfuWDxTQ' * call read('classpath:hypo/fabric.feature@updateDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 8b) Get Domain Identity Resource * call read('classpath:hypo/fabric.feature@getDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)'} # 9) servive order k8s-OCM # Create request Loading @@ -36,7 +43,7 @@ Scenario: Run full sequence once * print 'serviceOrderIdK8s:', newId * def serviceorderk8sid = newId # Poll for that specific ID * def pollCall = call read('service.feature@pollServiceOrder') { auth_token: '#(auth_token)', serviceOrderId: '#(serviceorderk8sid)', serviceName: 'K8aaS-OCM:Openslice-dev' } * def pollCall = call read('service.feature@pollServiceOrder') { auth_token: '#(auth_token)', serviceOrderId: '#(serviceorderk8sid)', serviceName: 'K8aaS-OCM-ETSI:Openslice-athens' } # Get the K8s ID returned by the poll * def serviceK8sId = pollCall.serviceId * print 'The OCM K8S service ID is:', serviceK8sId Loading Loading @@ -67,11 +74,9 @@ Scenario: Run full sequence once * def foundNamespace = invSer.serviceNamespace #* def cleanNamespace = foundNamespace.replace('[', '').replace(']', '').replace('"', '').trim() #* def cleanNamespace = foundNamespace.substring(2, foundNamespace.length - 2) # Get the terminated payload * match invSer.response.state == 'ACTIVE' # Get the terminated payload for end user * def terminatedPayloadEndUser = invSer.terminatedPayload * match invSer.response.state == 'ACTIVE' * print 'dashboardResourceId is: ', resourceId Loading @@ -94,27 +99,29 @@ Scenario: Run full sequence once #check Grafana dashboard for logs * call read('telemetry.feature@checkGrafanaDashboardLogs') { grafanaToken: '#(grafanaToken)', dashboardUrlLogs: '#(logApiDashUrl)' } * eval java.lang.Thread.sleep(160000) # 15) Update the service (helm configuration) * def updatedPayload = invRes.updatedPayload * def updatedPayload = invSer.updatedPayload * call read('service.feature@updateServiceClusterMetadata') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', updatedPayload: '#(updatedPayload)' } * def invSerUp = call read('service.feature@getServiceInventoryEndUser') { auth_token: '#(auth_token)', serviceId: '#(serviceId)' } * eval java.lang.Thread.sleep(35000) * eval java.lang.Thread.sleep(15000) * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'ACTIVE'} * eval java.lang.Thread.sleep(120000) # 16) Terminate the end user service * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceId)' } * eval java.lang.Thread.sleep(30000) * def invSerTer = call read('service.feature@getServiceInventoryState') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'TERMINATED'} * eval java.lang.Thread.sleep(15000) * def invSerTer = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'TERMINATED'} * def terminatedEndUserService = true # 17) Terminate the resource service * eval java.lang.Thread.sleep(20000) * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceK8sId)' } * eval java.lang.Thread.sleep(60000) * def invSerUp = call read('service.feature@getServiceInventoryState') { auth_token: '#(auth_token)', serviceId: '#(serviceK8sId)', requiredStatus:'TERMINATED'} * eval java.lang.Thread.sleep(25000) * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceK8sId)', requiredStatus:'TERMINATED'} * def terminatedK8sService = true Loading src/test/resources/hypo/service.feature +2 −2 Changes for src/test/resources/hypo/service.feature: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ Scenario: Create Service Order And path 'tmf-api', 'serviceOrdering', V4, 'serviceOrder' And header Content-Type = 'application/json' And header Authorization = 'Bearer ' + token And request payload And request payload_k8s When method post * print 'Status returned:', responseStatus Then assert responseStatus == 200 || responseStatus == 201 Loading Loading @@ -423,7 +423,7 @@ Scenario: Update the Service Cluster Metadatevia PATCH # 2. Define the new Helm configuration string * def newClusterMetadata = """ 'YXBpVmVyc2lvbjogc2NoZWR1bGluZy5wMmNvZGUuZXUvdjFhbHBoYTEKa2luZDogUDJDb2RlU2NoZWR1bGluZ01hbmlmZXN0Cm1ldGFkYXRhOgogIG5hbWU6IHBvYwogIG5hbWVzcGFjZTogcDJjb2RlLXNjaGVkdWxlci1zeXN0ZW0KICBsYWJlbHM6CiAgICB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5maWx0ZXIubG9jYXRpb249ZXRzaS1oeXBvLTMKICAgIC0gbmFtZTogcGhwbXlhZG1pbgogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0zCiAgICAtIG5hbWU6IHdvcmRwcmVzcwogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0z' """ * eval updatedPayload.serviceCharacteristic[characteristicIndex].value.value = newClusterMetadata Loading src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi-update.yaml +21 Changes for src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi-update.yaml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line apiVersion: scheduling.p2code.eu/v1alpha1 kind: P2CodeSchedulingManifest metadata: labels: app.kubernetes.io/name: p2code-scheduler app.kubernetes.io/managed-by: kustomize name: scheduling-scenario namespace: p2code-scheduler-system spec: globalAnnotations: - "p2code.target.managedClusterSet=hypo-cicd" workloadAnnotations: - name: mariadb annotations: - p2code.filter.location=etsi-hypo-3 - name: phpmyadmin annotations: - p2code.filter.location=etsi-hypo-3 - name: wordpress annotations: - p2code.filter.location=etsi-hypo-3 src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi.yaml +20 Changes for src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi.yaml: 20 added lines, 0 removed lines. Original line number Diff line number Diff line kind: P2CodeSchedulingManifest metadata: labels: app.kubernetes.io/name: p2code-scheduler app.kubernetes.io/managed-by: kustomize name: scheduling-scenario namespace: p2code-scheduler-system spec: globalAnnotations: - "p2code.target.managedClusterSet=hypo-cicd" workloadAnnotations: - name: mariadb annotations: - p2code.filter.location=etsi-hypo-2 - name: phpmyadmin annotations: - p2code.filter.location=etsi-hypo-3 - name: wordpress annotations: - p2code.filter.location=etsi-hypo-3 Loading
src/test/resources/hypo/orchestrator.feature +9 Changes for src/test/resources/hypo/orchestrator.feature: 9 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -27,6 +27,15 @@ Scenario: Run full sequence once # 8) Get Fabric controller * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)' } # 8a) Edit Domain Identity Resource * def identityId = 'FKfuWDxTQ' * call read('classpath:hypo/fabric.feature@updateDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 8b) Get Domain Identity Resource * call read('classpath:hypo/fabric.feature@getDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 9) servive order k8s # Create request * def createRes = call read('service.feature@createServiceOrderResourceK8s') { auth_token: '#(auth_token)', clusterType:'public-prek8s' } Loading
src/test/resources/hypo/orchestratorOCM.feature +24 −17 Changes for src/test/resources/hypo/orchestratorOCM.feature: 24 added lines, 17 removed lines. Original line number Diff line number Diff line Loading @@ -22,12 +22,19 @@ Scenario: Run full sequence once # 7) Create Fabric controller * call read('classpath:hypo/fabric.feature@createFabric') {auth_token: '#(auth_token)'} * def networkControllerId = '8f0f3c87-29d2-41a1-9a56-1a2ef8c5d2c1' * def fabricRes = call read('classpath:hypo/fabric.feature@createFabric') { auth_token: '#(auth_token)' } * def networkControllerId = fabricRes.networkControllerId # 8) Get Fabric controller * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)' } # 8a) Edit Domain Identity Resource * def identityId = 'FKfuWDxTQ' * call read('classpath:hypo/fabric.feature@updateDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} # 8b) Get Domain Identity Resource * call read('classpath:hypo/fabric.feature@getDomainIdentityResource') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)', identityId: '#(identityId)'} * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)'} # 9) servive order k8s-OCM # Create request Loading @@ -36,7 +43,7 @@ Scenario: Run full sequence once * print 'serviceOrderIdK8s:', newId * def serviceorderk8sid = newId # Poll for that specific ID * def pollCall = call read('service.feature@pollServiceOrder') { auth_token: '#(auth_token)', serviceOrderId: '#(serviceorderk8sid)', serviceName: 'K8aaS-OCM:Openslice-dev' } * def pollCall = call read('service.feature@pollServiceOrder') { auth_token: '#(auth_token)', serviceOrderId: '#(serviceorderk8sid)', serviceName: 'K8aaS-OCM-ETSI:Openslice-athens' } # Get the K8s ID returned by the poll * def serviceK8sId = pollCall.serviceId * print 'The OCM K8S service ID is:', serviceK8sId Loading Loading @@ -67,11 +74,9 @@ Scenario: Run full sequence once * def foundNamespace = invSer.serviceNamespace #* def cleanNamespace = foundNamespace.replace('[', '').replace(']', '').replace('"', '').trim() #* def cleanNamespace = foundNamespace.substring(2, foundNamespace.length - 2) # Get the terminated payload * match invSer.response.state == 'ACTIVE' # Get the terminated payload for end user * def terminatedPayloadEndUser = invSer.terminatedPayload * match invSer.response.state == 'ACTIVE' * print 'dashboardResourceId is: ', resourceId Loading @@ -94,27 +99,29 @@ Scenario: Run full sequence once #check Grafana dashboard for logs * call read('telemetry.feature@checkGrafanaDashboardLogs') { grafanaToken: '#(grafanaToken)', dashboardUrlLogs: '#(logApiDashUrl)' } * eval java.lang.Thread.sleep(160000) # 15) Update the service (helm configuration) * def updatedPayload = invRes.updatedPayload * def updatedPayload = invSer.updatedPayload * call read('service.feature@updateServiceClusterMetadata') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', updatedPayload: '#(updatedPayload)' } * def invSerUp = call read('service.feature@getServiceInventoryEndUser') { auth_token: '#(auth_token)', serviceId: '#(serviceId)' } * eval java.lang.Thread.sleep(35000) * eval java.lang.Thread.sleep(15000) * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'ACTIVE'} * eval java.lang.Thread.sleep(120000) # 16) Terminate the end user service * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceId)' } * eval java.lang.Thread.sleep(30000) * def invSerTer = call read('service.feature@getServiceInventoryState') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'TERMINATED'} * eval java.lang.Thread.sleep(15000) * def invSerTer = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'TERMINATED'} * def terminatedEndUserService = true # 17) Terminate the resource service * eval java.lang.Thread.sleep(20000) * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceK8sId)' } * eval java.lang.Thread.sleep(60000) * def invSerUp = call read('service.feature@getServiceInventoryState') { auth_token: '#(auth_token)', serviceId: '#(serviceK8sId)', requiredStatus:'TERMINATED'} * eval java.lang.Thread.sleep(25000) * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceK8sId)', requiredStatus:'TERMINATED'} * def terminatedK8sService = true Loading
src/test/resources/hypo/service.feature +2 −2 Changes for src/test/resources/hypo/service.feature: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -152,7 +152,7 @@ Scenario: Create Service Order And path 'tmf-api', 'serviceOrdering', V4, 'serviceOrder' And header Content-Type = 'application/json' And header Authorization = 'Bearer ' + token And request payload And request payload_k8s When method post * print 'Status returned:', responseStatus Then assert responseStatus == 200 || responseStatus == 201 Loading Loading @@ -423,7 +423,7 @@ Scenario: Update the Service Cluster Metadatevia PATCH # 2. Define the new Helm configuration string * def newClusterMetadata = """ 'YXBpVmVyc2lvbjogc2NoZWR1bGluZy5wMmNvZGUuZXUvdjFhbHBoYTEKa2luZDogUDJDb2RlU2NoZWR1bGluZ01hbmlmZXN0Cm1ldGFkYXRhOgogIG5hbWU6IHBvYwogIG5hbWVzcGFjZTogcDJjb2RlLXNjaGVkdWxlci1zeXN0ZW0KICBsYWJlbHM6CiAgICBhcHAua3ViZXJuZXRlcy5pby9uYW1lOiBwMmNvZGUt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IC0gbmFtZTogcGhwbXlhZG1pbgogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0zCiAgICAtIG5hbWU6IHdvcmRwcmVzcwogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0z' """ * eval updatedPayload.serviceCharacteristic[characteristicIndex].value.value = newClusterMetadata Loading
src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi-update.yaml +21 Changes for src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi-update.yaml: 21 added lines, 0 removed lines. Original line number Diff line number Diff line apiVersion: scheduling.p2code.eu/v1alpha1 kind: P2CodeSchedulingManifest metadata: labels: app.kubernetes.io/name: p2code-scheduler app.kubernetes.io/managed-by: kustomize name: scheduling-scenario namespace: p2code-scheduler-system spec: globalAnnotations: - "p2code.target.managedClusterSet=hypo-cicd" workloadAnnotations: - name: mariadb annotations: - p2code.filter.location=etsi-hypo-3 - name: phpmyadmin annotations: - p2code.filter.location=etsi-hypo-3 - name: wordpress annotations: - p2code.filter.location=etsi-hypo-3
src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi.yaml +20 Changes for src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi.yaml: 20 added lines, 0 removed lines. Original line number Diff line number Diff line kind: P2CodeSchedulingManifest metadata: labels: app.kubernetes.io/name: p2code-scheduler app.kubernetes.io/managed-by: kustomize name: scheduling-scenario namespace: p2code-scheduler-system spec: globalAnnotations: - "p2code.target.managedClusterSet=hypo-cicd" workloadAnnotations: - name: mariadb annotations: - p2code.filter.location=etsi-hypo-2 - name: phpmyadmin annotations: - p2code.filter.location=etsi-hypo-3 - name: wordpress annotations: - p2code.filter.location=etsi-hypo-3