Skip to content

Fix/payloads to deploy on partner

This PR adds some fixes for the integration OEG-FM. This is WIP and needs more generalization for some parameters.

The way to validate this is with this "smoke-test":

Manual Testing

  • We need to make sure the OEG has the PARTNER_API_ROOT properly set pointin to FM in OP2

    • In OP1 (points to OP2's FM)
      • kubectl set env -n oop deploy/oegcontroller PARTNER_API_ROOT=http://192.168.123.178:30989
    • In OP2 (points to OP1's FM)
      • kubectl set env -n oop deploy/oegcontroller PARTNER_API_ROOT=http://192.168.123.155:30989
  • Then create a federation bash curl -X 'POST' \ 'http://192.168.123.155:32263/oeg/1.0.0/partner' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ "origOPFederationId": "swagger", "origOPCountryCode": "CU", "origOPMobileNetworkCodes": { "mcc": "002", "mncs": [ "02" ] }, "origOPFixedNetworkCodes": [ "53" ], "initialDate": "2025-03-18T10:28:11.907Z", "partnerStatusLink": "string", "partnerCallbackCredentials": { "tokenUrl": "string", "clientId": "string", "clientSecret": "string" } }'

  • Temp - create a zone subscription

    • FED_CONTEXT_ID=6970ae05abd4d7e3b4aa77b5
      curl --request POST \
        --url http://192.168.123.155:30989/operatorplatform/federation/v1/$FED_CONTEXT_ID/zones \
        --header 'authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJiVXppbUtUR1NrRm1WU0ZBaUFyTXkwTkltWWNPWHVwajRRSVp1ODdwZUZjIn0.eyJleHAiOjE3Njg5NzkwNjIsImlhdCI6MTc2ODk3ODc2MiwianRpIjoiODg5ODM3MmYtM2M4Mi00N2FkLWI4OGMtZGVhMzc4NTQ0OTRiIiwiaXNzIjoiaHR0cDovL2tleWNsb2FrLmZlZGVyYXRpb24tbWFuYWdlci5zdmMuY2x1c3Rlci5sb2NhbDo4MDgwL3JlYWxtcy9mZWRlcmF0aW9uIiwic3ViIjoiODI4YmQ0ZDYtZGRkYy00NTM1LWE4YjYtMTUzMmUwOGJlYjQxIiwidHlwIjoiQmVhcmVyIiwiYXpwIjoib3JpZ2luYXRpbmctb3AtMSIsInNjb3BlIjoiZmVkLW1nbXQifQ.KjWyIoxtPrKA1v_q8pKuy00MaJ7JIyNMweRik4-xyYYDeS9V3Uy5XyMMSVrbH_ARyrTf2Qs5IdW4vq43w4Q9YfsMoyFWP69ja6dqjOfKzYKHtQCQpbr4nL-afKukpEAsxeZpzdeYC1zuWFM0sp6ZyjF82BoEiIdGC_2xXQzxPetpp4o9gGPhLm9t1xNeJZ7Tk0n6NgVdp9LLfnmUl9D_Jyl0t4CzpqkmAN75b58ZUE1uexLSQyJM6v4R5FhpO1Y6OkgtxuYmnigFlZ7eW2KyJvntR4w_P4K7MjK9rQj8QiZ3kDDGmpVuN7v-AB7s2ksk8TB4LKQrSk5_775aEc2pNA' \
        --header 'content-type: application/json' \
        --header 'x-internal: true' \
        --header 'x-partner-api-root: http://192.168.123.178:30989' \
        --data '{
          "acceptedAvailabilityZones": [
            "7f2c0b2f-3d57-4bb4-9c1f-8a3f1f4a2a9e"
          ],
          "availZoneNotifLink": "http://callback.local"
        }'
  • Onboard an app. This is a simple one:

    ```json
    curl -X 'POST' \
      'http://192.168.123.155:32263/oeg/1.0.0/apps' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
        "appId": "d1fbb5c0-5d11-4a2d-9f60-bc4c8c6f7d24",
        "name": "nginx_web_app24",
        "appProvider": "nginx_inc",
        "version": "1.0.0",
        "packageType": "CONTAINER",
        "appRepo": {
          "type": "PUBLICREPO",
          "imagePath": "docker.io/library/nginx:1.25.4-alpine",
          "userName": "",
          "credentials": "",
          "authType": "NONE",
          "checksum": ""
        },
        "componentSpec": [
          {
            "componentName": "nginx_server",
            "networkInterfaces": [
              { "interfaceId": "eth0", "protocol": "TCP", "port": 80, "visibilityType": "VISIBILITY_EXTERNAL" }
            ]
          }
        ]
      }'
    ```
  • Create app instance:

    ```json
    curl -X 'POST' \
      'http://192.168.123.155:32263/oeg/1.0.0/appinstances' \
      -H 'accept: application/json' \
      -H 'Content-Type: application/json' \
      -d '{
      "appId": "d1fbb5c0-5d11-4a2d-9f60-bc4c8c6f7d24",
      "appZones": [
        {
          "EdgeCloudZone": {
            "edgeCloudZoneId": "7f2c0b2f-3d57-4bb4-9c1f-8a3f1f4a2a9e",
            "edgeCloudZoneName": "zone-7f2c0b2f-3d57-4bb4-9c1f-8a3f1f4a2a9e",
            "edgeCloudZoneStatus": "active",
            "edgeCloudProvider": "string",
            "edgeCloudRegion": "string"
          }
        }
      ]
    }'
    ```

Merge request reports

Loading