Commit 43632fa5 authored by Adriana Fernández-Fernández's avatar Adriana Fernández-Fernández
Browse files

Merge branch 'feature-REL0' into 'main'

Adds headers to openapi.yaml and other minor fixes

See merge request !4
parents 9488f378 dd6d5190
Loading
Loading
Loading
Loading
Loading
+17 −5
Original line number Diff line number Diff line
@@ -235,17 +235,29 @@ def get_federation_context_id(bearer_token, partner_api_root): # noqa: E501


def create_federation_at_originating_op(body, bearer_token, federation_response_data):
    mcc = None
    mncs = None
    token_url = None
    client_id = None
    client_secret = None
    if body.orig_op_mobile_network_codes:
        mcc = body.orig_op_mobile_network_codes.mcc or None
        mncs = body.orig_op_mobile_network_codes.mncs or None
    if body.partner_callback_credentials:
        token_url = body.partner_callback_credentials.token_url or None
        client_id = body.partner_callback_credentials.client_id or None
        client_secret = body.partner_callback_credentials.client_secret or None
    federation_data = {
        "orig_op_federation_id": body.orig_op_federation_id,
        "orig_op_country_code": body.orig_op_country_code,
        "orig_op_mobile_network_codes_mcc": body.orig_op_mobile_network_codes.mcc,
        "orig_op_mobile_network_codes_mncs": body.orig_op_mobile_network_codes.mncs,
        "orig_op_mobile_network_codes_mcc": mcc,
        "orig_op_mobile_network_codes_mncs": mncs,
        "orig_op_fixed_network_codes": body.orig_op_fixed_network_codes,
        "initial_date": body.initial_date,
        "partner_status_link": body.partner_status_link,
        "partner_callback_credentials_token_url": body.partner_callback_credentials.token_url,
        "partner_callback_credentials_client_id": body.partner_callback_credentials.client_id,
        "partner_callback_credentials_client_secret": body.partner_callback_credentials.client_secret,
        "partner_callback_credentials_token_url": token_url,
        "partner_callback_credentials_client_id": client_id,
        "partner_callback_credentials_client_secret": client_secret,
        "partner_bearer_token": bearer_token,
        "partner_federation_id": federation_response_data.get("federationContextId")
    }
+7 −2
Original line number Diff line number Diff line
@@ -55,9 +55,14 @@ def create_federation(body, bearer_token, partner_api_root=None): # noqa: E501
            raise APIError(409, "Federation already exists")

    # Convert the original model instance to the MongoEngine document
    mcc = None
    mncs = None
    token_url = None
    client_id = None
    client_secret = None
    if body.orig_op_mobile_network_codes:
        mcc = body.orig_op_mobile_network_codes.mcc or None
        mncs = body.orig_op_mobile_network_codes.mncs or None
    if body.partner_callback_credentials:
        token_url = body.partner_callback_credentials.token_url or None
        client_id = body.partner_callback_credentials.client_id or None
@@ -65,8 +70,8 @@ def create_federation(body, bearer_token, partner_api_root=None): # noqa: E501
    federation_data = {
        "orig_op_federation_id": body.orig_op_federation_id,
        "orig_op_country_code": body.orig_op_country_code,
        "orig_op_mobile_network_codes_mcc": body.orig_op_mobile_network_codes.mcc,
        "orig_op_mobile_network_codes_mncs": body.orig_op_mobile_network_codes.mncs,
        "orig_op_mobile_network_codes_mcc": mcc,
        "orig_op_mobile_network_codes_mncs": mncs,
        "orig_op_fixed_network_codes": body.orig_op_fixed_network_codes,
        "initial_date": body.initial_date,
        "partner_status_link": body.partner_status_link,
+11 −11
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ class EdgeCloudClient:
            raise

    # Zone Management Functions
    def get_list_zones(self):  # --> OK
    def get_list_zones(self):
        """Get list of all available zones using GSMA-compliant API"""
        try:
            response = self.edgecloud_client.get_edge_cloud_zones_list_gsma()
@@ -76,7 +76,7 @@ class EdgeCloudClient:
            logger.error(f"Error getting zones: {e}")
            raise

    def get_zones(self):  # --> OK
    def get_zones(self):
        """Get detailed info of all available zones using GSMA-compliant API"""
        try:
            response = self.edgecloud_client.get_edge_cloud_zones_gsma()
@@ -85,7 +85,7 @@ class EdgeCloudClient:
            logger.error(f"Error getting zones: {e}")
            raise

    def get_zone_by_zone_id(self, zone_id):  # --> OK
    def get_zone_by_zone_id(self, zone_id):
        """Get zone details by zone ID using GSMA-compliant API"""
        try:
            response = self.edgecloud_client.get_edge_cloud_zone_details_gsma(zone_id)
@@ -95,7 +95,7 @@ class EdgeCloudClient:
            raise

    # Artefact Management Functions
    def onboarding_artefact_gsma(self, artefact_data):  # --> NOK
    def onboarding_artefact_gsma(self, artefact_data):
        """Upload artefact using GSMA-compliant API"""
        try:
            return self.edgecloud_client.create_artefact_gsma(artefact_data)
@@ -103,7 +103,7 @@ class EdgeCloudClient:
            logger.error(f"Error uploading artefact: {e}")
            raise

    def delete_artefact_gsma(self, artefact_id):  # --> OK
    def delete_artefact_gsma(self, artefact_id):
        """Delete artefact using GSMA-compliant API"""
        try:
            return self.edgecloud_client.delete_artefact_gsma(artefact_id)
@@ -112,7 +112,7 @@ class EdgeCloudClient:
            raise

    # Application Onboarding Functions
    def get_onboarding(self, app_id):  # --> OK
    def get_onboarding(self, app_id):
        """Get application onboarding details using GSMA-compliant API"""
        try:
            return self.edgecloud_client.get_onboarded_app_gsma(app_id)
@@ -120,7 +120,7 @@ class EdgeCloudClient:
            logger.error(f"Error getting onboarding for app {app_id}: {e}")
            raise

    def post_onboarding(self, onboarding_data):  # --> OK
    def post_onboarding(self, onboarding_data):
        """Create application onboarding using GSMA-compliant API"""
        try:
            return self.edgecloud_client.onboard_app_gsma(onboarding_data)
@@ -128,7 +128,7 @@ class EdgeCloudClient:
            logger.error(f"Error creating onboarding: {e}")
            raise

    def update_onboarding(self, app_id, onboarding_data):  # --> NOK
    def update_onboarding(self, app_id, onboarding_data):
        """Update application onboarding using GSMA-compliant API"""
        try:
            return self.edgecloud_client.patch_onboarded_app_gsma(app_id, onboarding_data)
@@ -136,7 +136,7 @@ class EdgeCloudClient:
            logger.error(f"Error updating onboarding for app {app_id}: {e}")
            raise

    def delete_onboarding(self, app_id):  # --> OK
    def delete_onboarding(self, app_id):
        """Delete application onboarding using GSMA-compliant API"""
        try:
            return self.edgecloud_client.delete_onboarded_app_gsma(app_id)
@@ -145,7 +145,7 @@ class EdgeCloudClient:
            raise

    # Application Deployment Functions
    def post_app_command(self, deployment_data):  # --> OK
    def post_app_command(self, deployment_data):
        """Deploy application using GSMA-compliant API"""
        try:
            return self.edgecloud_client.deploy_app_gsma(deployment_data)
@@ -161,7 +161,7 @@ class EdgeCloudClient:
            logger.error(f"Error getting app instance {app_instance_id} in zone {zone_id}: {e}")
            raise

    def delete_app(self, app_id, app_instance_id, zone_id):  # --> OK
    def delete_app(self, app_id, app_instance_id, zone_id):
        """Delete application instance using GSMA-compliant API"""
        try:
            return self.edgecloud_client.undeploy_app_gsma(app_id, app_instance_id, zone_id)
+0 −2
Original line number Diff line number Diff line
@@ -51,8 +51,6 @@ spec:
          limits:
            cpu: "4"
            memory: "6Gi"
      imagePullSecrets:
      - name: federation-manager-regcred
      volumes:
        - name: config
          secret:
+1216 −1036

File changed.

Preview size limit exceeded, changes collapsed.