Commit 6146a69b authored by Nikos Psaromanolakis's avatar Nikos Psaromanolakis
Browse files

fix OCM workflow

parent 85f24664
Loading
Loading
Loading
Loading
Loading
+9
Changes for src/test/resources/hypo/orchestrator.feature: 9 added lines, 0 removed lines.
Original line number Original line Diff line number Diff line
@@ -27,6 +27,15 @@ Scenario: Run full sequence once
  # 8) Get Fabric controller
  # 8) Get Fabric controller
  * call read('classpath:hypo/fabric.feature@pollFabric') {auth_token: '#(auth_token)', networkControllerId: '#(networkControllerId)' }
  * 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
  # 9) servive order k8s
  # Create request
  # Create request
  * def createRes = call read('service.feature@createServiceOrderResourceK8s') { auth_token: '#(auth_token)', clusterType:'public-prek8s' }
  * def createRes = call read('service.feature@createServiceOrderResourceK8s') { auth_token: '#(auth_token)', clusterType:'public-prek8s' }
+14 −5
Changes for src/test/resources/hypo/orchestratorOCM.feature: 14 added lines, 5 removed lines.
Original line number Original line Diff line number Diff line
@@ -22,12 +22,19 @@ Scenario: Run full sequence once


   # 7) Create Fabric controller
   # 7) Create Fabric controller


  * call read('classpath:hypo/fabric.feature@createFabric') {auth_token: '#(auth_token)'}
  * def fabricRes = call read('classpath:hypo/fabric.feature@createFabric') { auth_token: '#(auth_token)' }
  * def networkControllerId = '8f0f3c87-29d2-41a1-9a56-1a2ef8c5d2c1'
  * def networkControllerId = fabricRes.networkControllerId


  # 8) Get Fabric controller
  # 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
  # 9) servive order k8s-OCM
  # Create request
  # Create request
@@ -92,13 +99,15 @@ Scenario: Run full sequence once
  #check Grafana dashboard for logs
  #check Grafana dashboard for logs
  * call read('telemetry.feature@checkGrafanaDashboardLogs') { grafanaToken: '#(grafanaToken)', dashboardUrlLogs: '#(logApiDashUrl)' }
  * call read('telemetry.feature@checkGrafanaDashboardLogs') { grafanaToken: '#(grafanaToken)', dashboardUrlLogs: '#(logApiDashUrl)' }


  * eval java.lang.Thread.sleep(160000)

  # 15) Update the service (helm configuration)
  # 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)' }
  * call read('service.feature@updateServiceClusterMetadata') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', updatedPayload: '#(updatedPayload)' }
  * eval java.lang.Thread.sleep(15000)
  * eval java.lang.Thread.sleep(15000)
  * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'ACTIVE'}
  * def invSerUp = call read('service.feature@getServiceInventoryStatePoll') { auth_token: '#(auth_token)', serviceId: '#(serviceId)', requiredStatus:'ACTIVE'}
  * eval java.lang.Thread.sleep(40000)
  * eval java.lang.Thread.sleep(120000)
  
  
  # 16) Terminate the end user service
  # 16) Terminate the end user service
  * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceId)' }
  * call read('service.feature@terminateService') { auth_token: '#(token)', serviceId: '#(serviceId)' }
+2 −2
Changes for src/test/resources/hypo/service.feature: 2 added lines, 2 removed lines.
Original line number Original line Diff line number Diff line
@@ -152,7 +152,7 @@ Scenario: Create Service Order
  And path 'tmf-api', 'serviceOrdering', V4, 'serviceOrder'
  And path 'tmf-api', 'serviceOrdering', V4, 'serviceOrder'
  And header Content-Type = 'application/json'
  And header Content-Type = 'application/json'
  And header Authorization = 'Bearer ' + token
  And header Authorization = 'Bearer ' + token
  And request payload
  And request payload_k8s
  When method post
  When method post
  * print 'Status returned:', responseStatus
  * print 'Status returned:', responseStatus
  Then assert responseStatus == 200 || responseStatus == 201
  Then assert responseStatus == 200 || responseStatus == 201
@@ -423,7 +423,7 @@ Scenario: Update the Service Cluster Metadatevia PATCH
  # 2. Define the new Helm configuration string
  # 2. Define the new Helm configuration string
  * def newClusterMetadata = 
  * def newClusterMetadata = 
    """
    """
    'YXBpVmVyc2lvbjogc2NoZWR1bGluZy5wMmNvZGUuZXUvdjFhbHBoYTEKa2luZDogUDJDb2RlU2NoZWR1bGluZ01hbmlmZXN0Cm1ldGFkYXRhOgogIG5hbWU6IHBvYwogIG5hbWVzcGFjZTogcDJjb2RlLXNjaGVkdWxlci1zeXN0ZW0KICBsYWJlbHM6CiAgICBhcHAua3ViZXJuZXRlcy5pby9uYW1lOiBwMmNvZGUtc2NoZWR1bGVyCiAgICBhcHAua3ViZXJuZXRlcy5pby9tYW5hZ2VkLWJ5OiBrdXN0b21pemUKc3BlYzoKICBnbG9iYWxBbm5vdGF0aW9uczoKICAgIC0gInAyY29kZS50YXJnZXQubWFuYWdlZENsdXN0ZXJTZXQ9ZGVmYXVsdCIKICB3b3JrbG9hZEFubm90YXRpb25zOgogICAgLSBuYW1lOiBtYXJpYWRiCiAgICAgIGFubm90YXRpb25zOgogICAgICAgIC0gcDJjb2RlLmZpbHRlci5sb2NhdGlvbj1hdGhlbnMKICAgIC0gbmFtZTogcGhwbXlhZG1pbgogICAgICBhbm5vdGF0aW9uczoKICAgICAgICAtIHAyY29kZS5maWx0ZXIubG9jYXRpb249YXRoZW5zCiAgICAtIG5hbWU6IHdvcmRwcmVzcwogICAgICBhbm5vdGF0aW9uczoKICAgICAgICAtIHAyY29kZS5maWx0ZXIubG9jYXRpb249YXRoZW5z'
    'YXBpVmVyc2lvbjogc2NoZWR1bGluZy5wMmNvZGUuZXUvdjFhbHBoYTEKa2luZDogUDJDb2RlU2NoZWR1bGluZ01hbmlmZXN0Cm1ldGFkYXRhOgogIGxhYmVsczoKICAgIGFwcC5rdWJlcm5ldGVzLmlvL25hbWU6IHAyY29kZS1zY2hlZHVsZXIKICAgIGFwcC5rdWJlcm5ldGVzLmlvL21hbmFnZWQtYnk6IGt1c3RvbWl6ZQogIG5hbWU6IHNjaGVkdWxpbmctc2NlbmFyaW8KICBuYW1lc3BhY2U6IHAyY29kZS1zY2hlZHVsZXItc3lzdGVtCnNwZWM6CiAgZ2xvYmFsQW5ub3RhdGlvbnM6CiAgICAtICJwMmNvZGUudGFyZ2V0Lm1hbmFnZWRDbHVzdGVyU2V0PWh5cG8tY2ljZCIKICB3b3JrbG9hZEFubm90YXRpb25zOgogICAgLSBuYW1lOiBtYXJpYWRiCiAgICAgIGFubm90YXRpb25zOgogICAgICAtIHAyY29kZS5maWx0ZXIubG9jYXRpb249ZXRzaS1oeXBvLTMKICAgIC0gbmFtZTogcGhwbXlhZG1pbgogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0zCiAgICAtIG5hbWU6IHdvcmRwcmVzcwogICAgICBhbm5vdGF0aW9uczoKICAgICAgLSBwMmNvZGUuZmlsdGVyLmxvY2F0aW9uPWV0c2ktaHlwby0z'
    """
    """


    * eval updatedPayload.serviceCharacteristic[characteristicIndex].value.value = newClusterMetadata
    * eval updatedPayload.serviceCharacteristic[characteristicIndex].value.value = newClusterMetadata
+21
Changes for src/test/resources/payloads/ocm-manifests/scheduler-manifest-etsi-update.yaml: 21 added lines, 0 removed lines.
Original line number Original line 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
+1 −1
Changes for src/test/resources/payloads/peering/peering-organization-pub.json: 1 added line, 1 removed line.
Original line number Original line Diff line number Diff line
{
{
    "organization":   "#(peered_organization)",
    "organization":   "#(peered_organization)",
    "serviceSpecs": {"30ef4343-5b8f-413b-a3e7-801d003cfb93": "K8aaS-Private"},
    "serviceSpecs": {"30ef4343-5b8f-413b-a3e7-801d003cfb93": "K8aaS-Private", "0117c9e7-f9b1-48ae-a64e-bc904692b6dc": "K8aaS-OCM-ETSI"},
    "peeredSpecs": {},
    "peeredSpecs": {},
    "serviceCatalogs": []
    "serviceCatalogs": []
}
}
 No newline at end of file
Loading