Skip to content

update_sol_function_package async

update_sol_function_package(
    vnf_pkg_id: VnfPkgId,
    operational_state: OperationalState,
    *,
    config_overrides: Optional[AsynctnbClientConfig] = None,
) -> UpdateSolFunctionPackageOutput

Updates the operational state of function package.

A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to describe how the network functions should run on your network.

Parameters:

  • vnf_pkg_id (VnfPkgId) –

    ID of the function package.

  • operational_state (OperationalState) –

    Operational state of the function package.

Raises:

Examples:

Enable a function package's Operational State

>>> await client.update_sol_function_package(vnf_pkg_id='fp-07aa863e53460a2a6', operational_state='ENABLED')
Disable a function package's Operational State
>>> await client.update_sol_function_package(vnf_pkg_id='fp-07aa863e53460a2a6', operational_state='DISABLED')
Source code in docs_src/capo_tnb/_services/async_tnb.py
async def update_sol_function_package(
    self,
    vnf_pkg_id: "capo_tnb.types.vnf_pkg_id.VnfPkgId",
    operational_state: "capo_tnb.types.operational_state.OperationalState",
    *,
    config_overrides: Optional[AsynctnbClientConfig] = None,
) -> "capo_tnb.types.update_sol_function_package_output.UpdateSolFunctionPackageOutput":
    """<p>Updates the operational state of function package.</p> <p>A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to describe how the network functions should run on your network.</p>

    Args:
        vnf_pkg_id: <p>ID of the function package.</p>
        operational_state: <p>Operational state of the function package.</p>

    Raises:
        capo_tnb.errors.access_denied_exception.AccessDeniedException: <p>Insufficient permissions to make request.</p>
        capo_tnb.errors.internal_server_exception.InternalServerException: <p>Unexpected error occurred. Problem on the server.</p>
        capo_tnb.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource that doesn't exist.</p>
        capo_tnb.errors.throttling_exception.ThrottlingException: <p>Exception caused by throttling.</p>
        capo_tnb.errors.validation_exception.ValidationException: <p>Unable to process the request because the client provided input failed to satisfy request constraints.</p>
        capo_tnb.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Enable a function package's Operational State

        >>> await client.update_sol_function_package(vnf_pkg_id='fp-07aa863e53460a2a6', operational_state='ENABLED')
        Disable a function package's Operational State

        >>> await client.update_sol_function_package(vnf_pkg_id='fp-07aa863e53460a2a6', operational_state='DISABLED')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_tnb.types.update_sol_function_package_input.UpdateSolFunctionPackageInput]",
    ) -> AsyncOperationResponse[
        "capo_tnb.types.update_sol_function_package_output.UpdateSolFunctionPackageOutput"
    ]:
        import capo_tnb._operations.tnb.update_sol_function_package

        (
            output,
            http_response,
        ) = await capo_tnb._operations.tnb.update_sol_function_package.async_update_sol_function_package(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateSolFunctionPackage")
    )
    input_: capo_tnb.types.update_sol_function_package_input.UpdateSolFunctionPackageInput = {
        "vnf_pkg_id": vnf_pkg_id,
        "operational_state": operational_state,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output