Skip to content
Open
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
46 changes: 46 additions & 0 deletions sdk/networkcloud/azure-mgmt-networkcloud/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# Release History

## 2.2.0b1 (2025-11-17)

### Features Added

- Model `NetworkCloudMgmtClient` added parameter `cloud_setting` in method `__init__`
- Model `BareMetalMachine` added property `action_states`
- Model `BareMetalMachine` added property `ca_certificate`
- Model `BareMetalMachineKeySet` added property `privilege_level_name`
- Enum `BareMetalMachineKeySetPrivilegeLevel` added member `OTHER`
- Model `BareMetalMachineReplaceParameters` added property `safeguard_mode`
- Model `BareMetalMachineReplaceParameters` added property `storage_policy`
- Model `CloudServicesNetwork` added property `storage_options`
- Model `CloudServicesNetwork` added property `storage_status`
- Model `CloudServicesNetworkPatchParameters` added property `storage_options`
- Model `Cluster` added property `action_states`
- Model `CommandOutputSettings` added property `overrides`
- Model `SecretArchiveReference` added property `key_vault_uri`
- Model `StorageAppliance` added property `ca_certificate`
- Model `VirtualMachine` added property `identity`
- Model `VirtualMachine` added property `network_data_content`
- Model `VirtualMachine` added property `user_data_content`
- Model `VirtualMachinePatchParameters` added property `identity`
- Model `Volume` added property `allocated_size_mi_b`
- Model `Volume` added property `storage_appliance_id`
- Added model `ActionState`
- Added enum `ActionStateStatus`
- Added enum `BareMetalMachineReplaceSafeguardMode`
- Added enum `BareMetalMachineReplaceStoragePolicy`
- Added model `CertificateInfo`
- Added enum `CloudServicesNetworkStorageMode`
- Added model `CloudServicesNetworkStorageOptions`
- Added model `CloudServicesNetworkStorageOptionsPatch`
- Added model `CloudServicesNetworkStorageStatus`
- Added enum `CloudServicesNetworkStorageStatusStatus`
- Added model `CommandOutputOverride`
- Added enum `CommandOutputType`
- Added enum `RelayType`
- Added model `StepState`
- Added enum `StepStateStatus`
- Added model `StorageApplianceCommandSpecification`
- Added model `StorageApplianceRunReadCommandsParameters`
- Added model `VirtualMachineAssignRelayParameters`
- Model `BareMetalMachinesOperations` added method `begin_run_data_extracts_restricted`
- Model `StorageAppliancesOperations` added method `begin_run_read_commands`
- Model `VirtualMachinesOperations` added method `begin_assign_relay`

## 2.1.0 (2025-06-16)

### Features Added
Expand Down
9 changes: 4 additions & 5 deletions sdk/networkcloud/azure-mgmt-networkcloud/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
include _meta.json
recursive-include tests *.py *.json
recursive-include samples *.py *.md
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include LICENSE
include azure/mgmt/networkcloud/py.typed
recursive-include tests *.py
recursive-include samples *.py *.md
include azure/__init__.py
include azure/mgmt/__init__.py
11 changes: 0 additions & 11 deletions sdk/networkcloud/azure-mgmt-networkcloud/_meta.json

This file was deleted.

11 changes: 11 additions & 0 deletions sdk/networkcloud/azure-mgmt-networkcloud/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commit": "a39b73b1c7d12a633805a3b2ed3177a8bfddd9e2",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"autorest_command": "autorest specification/networkcloud/resource-manager/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --package-mode=azure-mgmt --python --python-sdks-folder=/mnt/vss/_work/1/azure-sdk-for-python/sdk --tag=package-2025-07-01-preview --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.10.2 --version-tolerant=False",
"readme": "specification/networkcloud/resource-manager/readme.md"
}
535 changes: 535 additions & 0 deletions sdk/networkcloud/azure-mgmt-networkcloud/apiview-properties.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__path__ = __import__("pkgutil").extend_path(__path__, __name__)
__path__ = __import__("pkgutil").extend_path(__path__, __name__) # type: ignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials import TokenCredential


Expand All @@ -27,13 +28,22 @@ class NetworkCloudMgmtClientConfiguration: # pylint: disable=too-many-instance-
: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 "2025-02-01". Note that overriding this
default value may result in unsupported behavior.
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2025-07-01-preview". 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:
api_version: str = kwargs.pop("api_version", "2025-02-01")
def __init__(
self,
credential: "TokenCredential",
subscription_id: str,
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2025-07-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -42,6 +52,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs

self.credential = credential
self.subscription_id = subscription_id
self.cloud_setting = cloud_setting
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-networkcloud/{}".format(VERSION))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
)

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials import TokenCredential


Expand Down Expand Up @@ -101,23 +102,36 @@ class NetworkCloudMgmtClient: # pylint: disable=too-many-instance-attributes
:type subscription_id: str
:param base_url: Service URL. Default value is None.
:type base_url: str
:keyword api_version: Api Version. Default value is "2025-02-01". Note that overriding this
default value may result in unsupported behavior.
:keyword cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:paramtype cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2025-07-01-preview". 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
Retry-After header is present.
"""

def __init__(
self, credential: "TokenCredential", subscription_id: str, base_url: Optional[str] = None, **kwargs: Any
self,
credential: "TokenCredential",
subscription_id: str,
base_url: Optional[str] = None,
*,
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
_cloud = kwargs.pop("cloud_setting", None) or settings.current.azure_cloud # type: ignore
_cloud = cloud_setting or settings.current.azure_cloud # type: ignore
_endpoints = get_arm_endpoints(_cloud)
if not base_url:
base_url = _endpoints["resource_manager"]
credential_scopes = kwargs.pop("credential_scopes", _endpoints["credential_scopes"])
self._config = NetworkCloudMgmtClientConfiguration(
credential=credential, subscription_id=subscription_id, credential_scopes=credential_scopes, **kwargs
credential=credential,
subscription_id=subscription_id,
cloud_setting=cloud_setting,
credential_scopes=credential_scopes,
**kwargs
)

_policies = kwargs.pop("policies", None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import sys
import codecs
from typing import (
Dict,
Any,
cast,
Optional,
Expand All @@ -31,7 +30,6 @@
Mapping,
Callable,
MutableMapping,
List,
)

try:
Expand Down Expand Up @@ -229,12 +227,12 @@ class Model:
serialization and deserialization.
"""

_subtype_map: Dict[str, Dict[str, Any]] = {}
_attribute_map: Dict[str, Dict[str, Any]] = {}
_validation: Dict[str, Dict[str, Any]] = {}
_subtype_map: dict[str, dict[str, Any]] = {}
_attribute_map: dict[str, dict[str, Any]] = {}
_validation: dict[str, dict[str, Any]] = {}

def __init__(self, **kwargs: Any) -> None:
self.additional_properties: Optional[Dict[str, Any]] = {}
self.additional_properties: Optional[dict[str, Any]] = {}
for k in kwargs: # pylint: disable=consider-using-dict-items
if k not in self._attribute_map:
_LOGGER.warning("%s is not a known attribute of class %s and will be ignored", k, self.__class__)
Expand Down Expand Up @@ -311,7 +309,7 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
def as_dict(
self,
keep_readonly: bool = True,
key_transformer: Callable[[str, Dict[str, Any], Any], Any] = attribute_transformer,
key_transformer: Callable[[str, dict[str, Any], Any], Any] = attribute_transformer,
**kwargs: Any
) -> JSON:
"""Return a dict that can be serialized using json.dump.
Expand Down Expand Up @@ -380,7 +378,7 @@ def deserialize(cls, data: Any, content_type: Optional[str] = None) -> Self:
def from_dict(
cls,
data: Any,
key_extractors: Optional[Callable[[str, Dict[str, Any], Any], Any]] = None,
key_extractors: Optional[Callable[[str, dict[str, Any], Any], Any]] = None,
content_type: Optional[str] = None,
) -> Self:
"""Parse a dict using given key extractor return a model.
Expand Down Expand Up @@ -414,7 +412,7 @@ def _flatten_subtype(cls, key, objects):
return {}
result = dict(cls._subtype_map[key])
for valuetype in cls._subtype_map[key].values():
result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
result |= objects[valuetype]._flatten_subtype(key, objects) # pylint: disable=protected-access
return result

@classmethod
Expand Down Expand Up @@ -528,7 +526,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
"[]": self.serialize_iter,
"{}": self.serialize_dict,
}
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
self.dependencies: dict[str, type] = dict(classes) if classes else {}
self.key_transformer = full_restapi_key_transformer
self.client_side_validation = True

Expand Down Expand Up @@ -579,7 +577,7 @@ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, to

if attr_name == "additional_properties" and attr_desc["key"] == "":
if target_obj.additional_properties is not None:
serialized.update(target_obj.additional_properties)
serialized |= target_obj.additional_properties
continue
try:

Expand Down Expand Up @@ -789,7 +787,7 @@ def serialize_data(self, data, data_type, **kwargs):

# If dependencies is empty, try with current data class
# It has to be a subclass of Enum anyway
enum_type = self.dependencies.get(data_type, data.__class__)
enum_type = self.dependencies.get(data_type, cast(type, data.__class__))
if issubclass(enum_type, Enum):
return Serializer.serialize_enum(data, enum_obj=enum_type)

Expand Down Expand Up @@ -1184,7 +1182,7 @@ def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argumen

while "." in key:
# Need the cast, as for some reasons "split" is typed as list[str | Any]
dict_keys = cast(List[str], _FLATTEN.split(key))
dict_keys = cast(list[str], _FLATTEN.split(key))
if len(dict_keys) == 1:
key = _decode_attribute_map_key(dict_keys[0])
break
Expand Down Expand Up @@ -1386,7 +1384,7 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
"duration": (isodate.Duration, datetime.timedelta),
"iso-8601": (datetime.datetime),
}
self.dependencies: Dict[str, type] = dict(classes) if classes else {}
self.dependencies: dict[str, type] = dict(classes) if classes else {}
self.key_extractors = [rest_key_extractor, xml_key_extractor]
# Additional properties only works if the "rest_key_extractor" is used to
# extract the keys. Making it to work whatever the key extractor is too much
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 = "2.1.0"
VERSION = "2.2.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

from typing import Any, TYPE_CHECKING
from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy, AsyncARMChallengeAuthenticationPolicy

from .._version import VERSION

if TYPE_CHECKING:
from azure.core import AzureClouds
from azure.core.credentials_async import AsyncTokenCredential


Expand All @@ -27,13 +28,22 @@ class NetworkCloudMgmtClientConfiguration: # pylint: disable=too-many-instance-
: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 "2025-02-01". Note that overriding this
default value may result in unsupported behavior.
:param cloud_setting: The cloud setting for which to get the ARM endpoint. Default value is
None.
:type cloud_setting: ~azure.core.AzureClouds
:keyword api_version: Api Version. Default value is "2025-07-01-preview". 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:
api_version: str = kwargs.pop("api_version", "2025-02-01")
def __init__(
self,
credential: "AsyncTokenCredential",
subscription_id: str,
cloud_setting: Optional["AzureClouds"] = None,
**kwargs: Any
) -> None:
api_version: str = kwargs.pop("api_version", "2025-07-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand All @@ -42,6 +52,7 @@ def __init__(self, credential: "AsyncTokenCredential", subscription_id: str, **k

self.credential = credential
self.subscription_id = subscription_id
self.cloud_setting = cloud_setting
self.api_version = api_version
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
kwargs.setdefault("sdk_moniker", "mgmt-networkcloud/{}".format(VERSION))
Expand Down
Loading