Commit 3485f431 authored by Adrian Pino's avatar Adrian Pino Committed by GitHub
Browse files

Merge branch 'main' into feature/add--camara-compliant-responses-k8s

parents 97352bc8 81a79c57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ class EdgeApplicationManager(EdgeCloudManagementInterface):
        """
        pass

    def get_all_deployed_apps_gsma(self, app_id: str, app_provider: str) -> List:
    def get_all_deployed_apps_gsma(self) -> Response:
        """
        Retrieves all instances for a given application of partner OP

+266 −212

File changed.

Preview size limit exceeded, changes collapsed.

+12 −5
Original line number Diff line number Diff line
@@ -66,16 +66,23 @@ def i2edge_post(url: str, model_payload: BaseModel, expected_status: int = 201)
        raise I2EdgeError(err_msg)


def i2edge_put(url: str, model_payload: BaseModel) -> dict:
def i2edge_patch(url: str, model_payload: BaseModel, expected_status: int = 200) -> dict:
    headers = {
        "Content-Type": "application/json",
        "accept": "application/json",
    }
    json_payload = json.dumps(model_payload.model_dump(mode="json"))
    json_payload = json.dumps(model_payload.model_dump(exclude_unset=True, mode="json"))
    try:
        response = requests.put(url, data=json_payload, headers=headers)
        response.raise_for_status()
        response = requests.patch(url, data=json_payload, headers=headers)
        if response.status_code == expected_status:
            return response
        else:
            i2edge_err_msg = get_error_message_from(response)
            err_msg = "Failed to patch: Expected status {}, got {}. Detail: {}".format(
                expected_status, response.status_code, i2edge_err_msg
            )
            log.error(err_msg)
            raise I2EdgeError(err_msg)
    except requests.exceptions.HTTPError as e:
        i2edge_err_msg = get_error_message_from(response)
        err_msg = "Failed to patch: {}. Detail: {}".format(i2edge_err_msg, e)
+160 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ class AppQoSProfile(BaseModel):
    appProvisioning: bool = Field(default=True)
    bandwidthRequired: int = Field(default=1)
    latencyConstraints: str = Field(default="NONE")
    mobilitySupport: Optional[bool] = None
    multiUserClients: str = Field(default="APP_TYPE_SINGLE_USER")
    noOfUsersPerAppInst: int = Field(default=1)

Loading