Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-mobilenetwork-2024-02-21-79731(can only be merged by SDK owner) #34390

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions sdk/mobilenetwork/azure-mgmt-mobilenetwork/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Release History

## 3.2.0 (2024-03-18)

### Features Added

- Added operation group ExtendedUeInformationOperations
- Added operation group UeInformationOperations
- Model MobileNetwork has a new parameter identity
- Model MobileNetwork has a new parameter public_land_mobile_networks
- Model PacketCoreControlPlane has a new parameter home_network_private_keys_provisioning

## 3.1.0 (2023-11-20)

### Features Added
Expand Down
4 changes: 2 additions & 2 deletions sdk/mobilenetwork/azure-mgmt-mobilenetwork/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Microsoft Azure SDK for Python

This is the Microsoft Azure Mobilenetwork Management Client Library.
This package has been tested with Python 3.7+.
This package has been tested with Python 3.8+.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

## _Disclaimer_
Expand All @@ -12,7 +12,7 @@ _Azure SDK Python packages support for Python 2.7 has ended 01 January 2022. For

### Prerequisites

- Python 3.7+ is required to use this package.
- Python 3.8+ is required to use this package.
- [Azure subscription](https://azure.microsoft.com/free/)

### Install the package
Expand Down
2 changes: 1 addition & 1 deletion sdk/mobilenetwork/azure-mgmt-mobilenetwork/_meta.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"commit": "fe3f311a4d963b0e9b1c39d6f3859175189f0e90",
"commit": "c7b8df506c79231f08e1d878b1c4917a5abb1113",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.7",
"use": [
Expand Down
6 changes: 6 additions & 0 deletions sdk/mobilenetwork/azure-mgmt-mobilenetwork/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "python",
"TagPrefix": "python/mobilenetwork/azure-mgmt-mobilenetwork",
"Tag": "python/mobilenetwork/azure-mgmt-mobilenetwork_f697b1e70b"
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class MobileNetworkManagementClientConfiguration(Configuration): # pylint: disa
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(MobileNetworkManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-09-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
AttachedDataNetworksOperations,
DataNetworksOperations,
DiagnosticsPackagesOperations,
ExtendedUeInformationOperations,
MobileNetworksOperations,
Operations,
PacketCapturesOperations,
Expand All @@ -31,6 +32,7 @@
SimsOperations,
SitesOperations,
SlicesOperations,
UeInformationOperations,
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -77,13 +79,18 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
:vartype sites: azure.mgmt.mobilenetwork.operations.SitesOperations
:ivar slices: SlicesOperations operations
:vartype slices: azure.mgmt.mobilenetwork.operations.SlicesOperations
:ivar extended_ue_information: ExtendedUeInformationOperations operations
:vartype extended_ue_information:
azure.mgmt.mobilenetwork.operations.ExtendedUeInformationOperations
:ivar ue_information: UeInformationOperations operations
:vartype ue_information: azure.mgmt.mobilenetwork.operations.UeInformationOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -131,6 +138,10 @@ def __init__(
self.sim_policies = SimPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sites = SitesOperations(self._client, self._config, self._serialize, self._deserialize)
self.slices = SlicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.extended_ue_information = ExtendedUeInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.ue_information = UeInformationOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "3.1.0"
VERSION = "3.2.0"
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class MobileNetworkManagementClientConfiguration(Configuration): # pylint: disa
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
"""

def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **kwargs: Any) -> None:
super(MobileNetworkManagementClientConfiguration, self).__init__(**kwargs)
api_version: str = kwargs.pop("api_version", "2023-09-01")
api_version: str = kwargs.pop("api_version", "2024-02-01")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
AttachedDataNetworksOperations,
DataNetworksOperations,
DiagnosticsPackagesOperations,
ExtendedUeInformationOperations,
MobileNetworksOperations,
Operations,
PacketCapturesOperations,
Expand All @@ -31,6 +32,7 @@
SimsOperations,
SitesOperations,
SlicesOperations,
UeInformationOperations,
)

if TYPE_CHECKING:
Expand Down Expand Up @@ -77,13 +79,18 @@ class MobileNetworkManagementClient: # pylint: disable=client-accepts-api-versi
:vartype sites: azure.mgmt.mobilenetwork.aio.operations.SitesOperations
:ivar slices: SlicesOperations operations
:vartype slices: azure.mgmt.mobilenetwork.aio.operations.SlicesOperations
:ivar extended_ue_information: ExtendedUeInformationOperations operations
:vartype extended_ue_information:
azure.mgmt.mobilenetwork.aio.operations.ExtendedUeInformationOperations
:ivar ue_information: UeInformationOperations operations
:vartype ue_information: azure.mgmt.mobilenetwork.aio.operations.UeInformationOperations
:param credential: Credential needed for the client to connect to Azure. Required.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
:type subscription_id: str
:param base_url: Service URL. Default value is "https://management.azure.com".
:type base_url: str
:keyword api_version: Api Version. Default value is "2023-09-01". Note that overriding this
:keyword api_version: Api Version. Default value is "2024-02-01". Note that overriding this
default value may result in unsupported behavior.
:paramtype api_version: str
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
Expand Down Expand Up @@ -131,6 +138,10 @@ def __init__(
self.sim_policies = SimPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
self.sites = SitesOperations(self._client, self._config, self._serialize, self._deserialize)
self.slices = SlicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.extended_ue_information = ExtendedUeInformationOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.ue_information = UeInformationOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> Awaitable[AsyncHttpResponse]:
"""Runs the network request through the client's chained policies.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
from ._sim_policies_operations import SimPoliciesOperations
from ._sites_operations import SitesOperations
from ._slices_operations import SlicesOperations
from ._extended_ue_information_operations import ExtendedUeInformationOperations
from ._ue_information_operations import UeInformationOperations

from ._patch import __all__ as _patch_all
from ._patch import * # pylint: disable=unused-wildcard-import
Expand All @@ -42,6 +44,8 @@
"SimPoliciesOperations",
"SitesOperations",
"SlicesOperations",
"ExtendedUeInformationOperations",
"UeInformationOperations",
]
__all__.extend([p for p in _patch_all if p not in __all__])
_patch_sdk()
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import Any, Callable, Dict, Optional, TypeVar

from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
ResourceExistsError,
ResourceNotFoundError,
ResourceNotModifiedError,
map_error,
)
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import AsyncHttpResponse
from azure.core.rest import HttpRequest
from azure.core.tracing.decorator_async import distributed_trace_async
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat

from ... import models as _models
from ..._vendor import _convert_request
from ...operations._extended_ue_information_operations import build_get_request

T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]


class ExtendedUeInformationOperations:
"""
.. warning::
**DO NOT** instantiate this class directly.

Instead, you should access the following operations through
:class:`~azure.mgmt.mobilenetwork.aio.MobileNetworkManagementClient`'s
:attr:`extended_ue_information` attribute.
"""

models = _models

def __init__(self, *args, **kwargs) -> None:
input_args = list(args)
self._client = input_args.pop(0) if input_args else kwargs.pop("client")
self._config = input_args.pop(0) if input_args else kwargs.pop("config")
self._serialize = input_args.pop(0) if input_args else kwargs.pop("serializer")
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")

@distributed_trace_async
async def get(
self, resource_group_name: str, packet_core_control_plane_name: str, ue_id: str, **kwargs: Any
) -> _models.ExtendedUeInfo:
"""Gets extended information about the specified UE from the packet core.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param packet_core_control_plane_name: The name of the packet core control plane. Required.
:type packet_core_control_plane_name: str
:param ue_id: IMSI of a UE. Required.
:type ue_id: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: ExtendedUeInfo or the result of cls(response)
:rtype: ~azure.mgmt.mobilenetwork.models.ExtendedUeInfo
:raises ~azure.core.exceptions.HttpResponseError:
"""
error_map = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
304: ResourceNotModifiedError,
}
error_map.update(kwargs.pop("error_map", {}) or {})

_headers = kwargs.pop("headers", {}) or {}
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})

api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ExtendedUeInfo] = kwargs.pop("cls", None)

request = build_get_request(
resource_group_name=resource_group_name,
packet_core_control_plane_name=packet_core_control_plane_name,
ue_id=ue_id,
subscription_id=self._config.subscription_id,
api_version=api_version,
template_url=self.get.metadata["url"],
headers=_headers,
params=_params,
)
request = _convert_request(request)
request.url = self._client.format_url(request.url)

_stream = False
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
request, stream=_stream, **kwargs
)

response = pipeline_response.http_response

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, pipeline_response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize("ExtendedUeInfo", pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})

return deserialized

get.metadata = {
"url": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MobileNetwork/packetCoreControlPlanes/{packetCoreControlPlaneName}/ues/{ueId}/extendedInformation/default"
}
Original file line number Diff line number Diff line change
Expand Up @@ -478,20 +478,20 @@ async def update_tags(
self,
resource_group_name: str,
mobile_network_name: str,
parameters: _models.TagsObject,
parameters: _models.IdentityAndTagsObject,
*,
content_type: str = "application/json",
**kwargs: Any
) -> _models.MobileNetwork:
"""Updates mobile network tags.
"""Updates mobile network tags and managed identity.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param mobile_network_name: The name of the mobile network. Required.
:type mobile_network_name: str
:param parameters: Parameters supplied to update mobile network tags. Required.
:type parameters: ~azure.mgmt.mobilenetwork.models.TagsObject
:param parameters: Parameters supplied to update mobile network tags and/or identity. Required.
:type parameters: ~azure.mgmt.mobilenetwork.models.IdentityAndTagsObject
:keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
Default value is "application/json".
:paramtype content_type: str
Expand All @@ -511,14 +511,14 @@ async def update_tags(
content_type: str = "application/json",
**kwargs: Any
) -> _models.MobileNetwork:
"""Updates mobile network tags.
"""Updates mobile network tags and managed identity.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param mobile_network_name: The name of the mobile network. Required.
:type mobile_network_name: str
:param parameters: Parameters supplied to update mobile network tags. Required.
:param parameters: Parameters supplied to update mobile network tags and/or identity. Required.
:type parameters: IO
:keyword content_type: Body Parameter content-type. Content type parameter for binary body.
Default value is "application/json".
Expand All @@ -534,19 +534,19 @@ async def update_tags(
self,
resource_group_name: str,
mobile_network_name: str,
parameters: Union[_models.TagsObject, IO],
parameters: Union[_models.IdentityAndTagsObject, IO],
**kwargs: Any
) -> _models.MobileNetwork:
"""Updates mobile network tags.
"""Updates mobile network tags and managed identity.

:param resource_group_name: The name of the resource group. The name is case insensitive.
Required.
:type resource_group_name: str
:param mobile_network_name: The name of the mobile network. Required.
:type mobile_network_name: str
:param parameters: Parameters supplied to update mobile network tags. Is either a TagsObject
type or a IO type. Required.
:type parameters: ~azure.mgmt.mobilenetwork.models.TagsObject or IO
:param parameters: Parameters supplied to update mobile network tags and/or identity. Is either
a IdentityAndTagsObject type or a IO type. Required.
:type parameters: ~azure.mgmt.mobilenetwork.models.IdentityAndTagsObject or IO
:keyword content_type: Body Parameter content-type. Known values are: 'application/json'.
Default value is None.
:paramtype content_type: str
Expand Down Expand Up @@ -576,7 +576,7 @@ async def update_tags(
if isinstance(parameters, (IOBase, bytes)):
_content = parameters
else:
_json = self._serialize.body(parameters, "TagsObject")
_json = self._serialize.body(parameters, "IdentityAndTagsObject")

request = build_update_tags_request(
resource_group_name=resource_group_name,
Expand Down
Loading