diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/CHANGELOG.md b/sdk/azurestackhci/azure-mgmt-azurestackhci/CHANGELOG.md
index ea4081977196..b93b074f4eb2 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/CHANGELOG.md
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/CHANGELOG.md
@@ -1,5 +1,78 @@
# Release History
+## 8.0.0b5 (2025-03-28)
+
+### Features Added
+
+ - Client `AzureStackHCIClient` added operation group `edge_device_jobs`
+ - Client `AzureStackHCIClient` added operation group `validated_solution_recipes`
+ - Model `Cluster` added property `secrets_locations`
+ - Model `Cluster` added property `cluster_pattern`
+ - Model `Cluster` added property `local_availability_zones`
+ - Model `ClusterReportedProperties` added property `hardware_class`
+ - Model `DeploymentCluster` added property `cluster_pattern`
+ - Model `DeploymentCluster` added property `hardware_class`
+ - Model `DeploymentData` added property `local_availability_zones`
+ - Model `DeploymentData` added property `assembly_info`
+ - Model `HciNicDetail` added property `rdma_capability`
+ - Model `HciReportedProperties` added property `storage_profile`
+ - Model `HciReportedProperties` added property `hardware_profile`
+ - Added model `AssemblyInfo`
+ - Added model `AssemblyInfoPayload`
+ - Added enum `ClusterPattern`
+ - Added model `CollectLogJobProperties`
+ - Added enum `DeviceLogCollectionStatus`
+ - Added model `EdgeDeviceJob`
+ - Added model `EdgeDeviceJobListResult`
+ - Added model `EdgeDeviceJobProperties`
+ - Added enum `EdgeDeviceJobType`
+ - Added enum `EdgeDeviceKind`
+ - Added enum `EdgeSolutionType`
+ - Added enum `HardwareClass`
+ - Added model `HciCollectLogJobProperties`
+ - Added model `HciEdgeDeviceJob`
+ - Added model `HciEdgeDeviceJobProperties`
+ - Added enum `HciEdgeDeviceJobType`
+ - Added model `HciHardwareProfile`
+ - Added model `HciRemoteSupportJobProperties`
+ - Added model `HciStorageProfile`
+ - Added model `JobReportedProperties`
+ - Added enum `JobStatus`
+ - Added model `LocalAvailabilityZones`
+ - Added model `LogCollectionJobSession`
+ - Added model `LogCollectionReportedProperties`
+ - Added enum `RdmaCapability`
+ - Added enum `RemoteSupportAccessLevel`
+ - Added model `RemoteSupportJobNodeSettings`
+ - Added model `RemoteSupportJobProperties`
+ - Added model `RemoteSupportJobReportedProperties`
+ - Added model `RemoteSupportSession`
+ - Added model `SecretsLocationDetails`
+ - Added model `SecretsLocationsChangeRequest`
+ - Added enum `SecretsType`
+ - Added model `ValidatedSolutionRecipe`
+ - Added model `ValidatedSolutionRecipeCapabilities`
+ - Added model `ValidatedSolutionRecipeCapability`
+ - Added model `ValidatedSolutionRecipeComponent`
+ - Added model `ValidatedSolutionRecipeComponentMetadata`
+ - Added model `ValidatedSolutionRecipeComponentPayload`
+ - Added model `ValidatedSolutionRecipeContent`
+ - Added model `ValidatedSolutionRecipeInfo`
+ - Added model `ValidatedSolutionRecipeListResult`
+ - Added model `ValidatedSolutionRecipeProperties`
+ - Model `ClustersOperations` added method `begin_update_secrets_locations`
+ - Added model `EdgeDeviceJobsOperations`
+ - Added model `ValidatedSolutionRecipesOperations`
+ - Method `ClustersOperations.begin_update_secrets_locations` has a new overload `def begin_update_secrets_locations(self: None, resource_group_name: str, cluster_name: str, body: SecretsLocationsChangeRequest, content_type: str)`
+ - Method `ClustersOperations.begin_update_secrets_locations` has a new overload `def begin_update_secrets_locations(self: None, resource_group_name: str, cluster_name: str, body: IO[bytes], content_type: str)`
+ - Method `EdgeDeviceJobsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_uri: str, edge_device_name: str, jobs_name: str, resource: EdgeDeviceJob, content_type: str)`
+ - Method `EdgeDeviceJobsOperations.begin_create_or_update` has a new overload `def begin_create_or_update(self: None, resource_uri: str, edge_device_name: str, jobs_name: str, resource: IO[bytes], content_type: str)`
+
+### Breaking Changes
+
+ - Method `Operations.list` changed from `asynchronous` to `synchronous`
+ - Method `DeploymentSetting.__init__` parameter `deployment_mode` changed default value from `str` to `none`
+
## 8.0.0b4 (2024-08-26)
### Features Added
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md b/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md
index b789bc3caed3..ea36572b598d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/README.md
@@ -24,7 +24,7 @@ pip install azure-identity
### Authentication
-By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configure of following environment variables.
+By default, [Azure Active Directory](https://aka.ms/awps/aad) token authentication depends on correct configuration of the following environment variables.
- `AZURE_CLIENT_ID` for Azure client ID.
- `AZURE_TENANT_ID` for Azure tenant ID.
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json b/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json
index 5bb25bc73234..49935c72df1e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json
@@ -1,11 +1,11 @@
{
- "commit": "30d040e41a4cea0d31a6c7e56726ea2df17fdcc5",
+ "commit": "a050fa0419263b6c6efa11793bbe41ae1e7694b0",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.10.2",
"use": [
- "@autorest/python@6.19.0",
+ "@autorest/python@6.27.4",
"@autorest/modelerfour@4.27.0"
],
- "autorest_command": "autorest specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.19.0 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
+ "autorest_command": "autorest specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/readme.md --generate-sample=True --generate-test=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/mnt/vss/_work/1/s/azure-sdk-for-python/sdk --use=@autorest/python@6.27.4 --use=@autorest/modelerfour@4.27.0 --version=3.10.2 --version-tolerant=False",
"readme": "specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/readme.md"
}
\ No newline at end of file
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/__init__.py
index f49c077d7b8a..4d5782bf0c4e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/__init__.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/__init__.py
@@ -5,15 +5,21 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._azure_stack_hci_client import AzureStackHCIClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._azure_stack_hci_client import AzureStackHCIClient # type: ignore
from ._version import VERSION
__version__ = VERSION
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -21,6 +27,6 @@
__all__ = [
"AzureStackHCIClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py
index fd250e7d509a..bb53184b75ce 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_azure_stack_hci_client.py
@@ -22,6 +22,7 @@
ArcSettingsOperations,
ClustersOperations,
DeploymentSettingsOperations,
+ EdgeDeviceJobsOperations,
EdgeDevicesOperations,
ExtensionsOperations,
OffersOperations,
@@ -32,14 +33,14 @@
UpdateRunsOperations,
UpdateSummariesOperations,
UpdatesOperations,
+ ValidatedSolutionRecipesOperations,
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AzureStackHCIClient: # pylint: disable=too-many-instance-attributes
"""Azure Stack HCI management service.
:ivar arc_settings: ArcSettingsOperations operations
@@ -48,6 +49,8 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
:vartype clusters: azure.mgmt.azurestackhci.operations.ClustersOperations
:ivar deployment_settings: DeploymentSettingsOperations operations
:vartype deployment_settings: azure.mgmt.azurestackhci.operations.DeploymentSettingsOperations
+ :ivar edge_device_jobs: EdgeDeviceJobsOperations operations
+ :vartype edge_device_jobs: azure.mgmt.azurestackhci.operations.EdgeDeviceJobsOperations
:ivar edge_devices: EdgeDevicesOperations operations
:vartype edge_devices: azure.mgmt.azurestackhci.operations.EdgeDevicesOperations
:ivar extensions: ExtensionsOperations operations
@@ -64,18 +67,21 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
:vartype skus: azure.mgmt.azurestackhci.operations.SkusOperations
:ivar update_runs: UpdateRunsOperations operations
:vartype update_runs: azure.mgmt.azurestackhci.operations.UpdateRunsOperations
- :ivar update_summaries: UpdateSummariesOperations operations
- :vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
:ivar updates: UpdatesOperations operations
:vartype updates: azure.mgmt.azurestackhci.operations.UpdatesOperations
+ :ivar update_summaries: UpdateSummariesOperations operations
+ :vartype update_summaries: azure.mgmt.azurestackhci.operations.UpdateSummariesOperations
+ :ivar validated_solution_recipes: ValidatedSolutionRecipesOperations operations
+ :vartype validated_solution_recipes:
+ azure.mgmt.azurestackhci.operations.ValidatedSolutionRecipesOperations
: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 "2024-04-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2025-02-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.
@@ -120,6 +126,7 @@ def __init__(
self.deployment_settings = DeploymentSettingsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.edge_device_jobs = EdgeDeviceJobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.edge_devices = EdgeDevicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.offers = OffersOperations(self._client, self._config, self._serialize, self._deserialize)
@@ -130,10 +137,13 @@ def __init__(
)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.updates = UpdatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_summaries = UpdateSummariesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.updates = UpdatesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.validated_solution_recipes = ValidatedSolutionRecipesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_configuration.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_configuration.py
index 697c6b2eb7fc..e94e04924e1d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_configuration.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_configuration.py
@@ -14,11 +14,10 @@
from ._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
-class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AzureStackHCIClient.
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-att
: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 "2024-04-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2025-02-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", "2024-04-01")
+ api_version: str = kwargs.pop("api_version", "2025-02-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_serialization.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_serialization.py
index 8139854b97bb..b24ab2885450 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_serialization.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_serialization.py
@@ -1,3 +1,4 @@
+# pylint: disable=too-many-lines
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -24,7 +25,6 @@
#
# --------------------------------------------------------------------------
-# pylint: skip-file
# pyright: reportUnnecessaryTypeIgnoreComment=false
from base64 import b64decode, b64encode
@@ -52,7 +52,6 @@
MutableMapping,
Type,
List,
- Mapping,
)
try:
@@ -91,6 +90,8 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
:param data: Input, could be bytes or stream (will be decoded with UTF8) or text
:type data: str or bytes or IO
:param str content_type: The content type.
+ :return: The deserialized data.
+ :rtype: object
"""
if hasattr(data, "read"):
# Assume a stream
@@ -112,7 +113,7 @@ def deserialize_from_text(cls, data: Optional[Union[AnyStr, IO]], content_type:
try:
return json.loads(data_as_str)
except ValueError as err:
- raise DeserializationError("JSON is invalid: {}".format(err), err)
+ raise DeserializationError("JSON is invalid: {}".format(err), err) from err
elif "xml" in (content_type or []):
try:
@@ -155,6 +156,11 @@ def deserialize_from_http_generics(cls, body_bytes: Optional[Union[AnyStr, IO]],
Use bytes and headers to NOT use any requests/aiohttp or whatever
specific implementation.
Headers will tested for "content-type"
+
+ :param bytes body_bytes: The body of the response.
+ :param dict headers: The headers of the response.
+ :returns: The deserialized data.
+ :rtype: object
"""
# Try to use content-type from headers if available
content_type = None
@@ -184,15 +190,30 @@ class UTC(datetime.tzinfo):
"""Time Zone info for handling UTC"""
def utcoffset(self, dt):
- """UTF offset for UTC is 0."""
+ """UTF offset for UTC is 0.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The offset
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(0)
def tzname(self, dt):
- """Timestamp representation."""
+ """Timestamp representation.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The timestamp representation
+ :rtype: str
+ """
return "Z"
def dst(self, dt):
- """No daylight saving for UTC."""
+ """No daylight saving for UTC.
+
+ :param datetime.datetime dt: The datetime
+ :returns: The daylight saving time
+ :rtype: datetime.timedelta
+ """
return datetime.timedelta(hours=1)
@@ -206,7 +227,7 @@ class _FixedOffset(datetime.tzinfo): # type: ignore
:param datetime.timedelta offset: offset in timedelta format
"""
- def __init__(self, offset):
+ def __init__(self, offset) -> None:
self.__offset = offset
def utcoffset(self, dt):
@@ -235,24 +256,26 @@ def __getinitargs__(self):
_FLATTEN = re.compile(r"(? None:
self.additional_properties: Optional[Dict[str, Any]] = {}
- for k in kwargs:
+ 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__)
elif k in self._validation and self._validation[k].get("readonly", False):
@@ -300,13 +330,23 @@ def __init__(self, **kwargs: Any) -> None:
setattr(self, k, kwargs[k])
def __eq__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are equal
+ :rtype: bool
+ """
if isinstance(other, self.__class__):
return self.__dict__ == other.__dict__
return False
def __ne__(self, other: Any) -> bool:
- """Compare objects by comparing all attributes."""
+ """Compare objects by comparing all attributes.
+
+ :param object other: The object to compare
+ :returns: True if objects are not equal
+ :rtype: bool
+ """
return not self.__eq__(other)
def __str__(self) -> str:
@@ -326,7 +366,11 @@ def is_xml_model(cls) -> bool:
@classmethod
def _create_xml_node(cls):
- """Create XML node."""
+ """Create XML node.
+
+ :returns: The XML node
+ :rtype: xml.etree.ElementTree.Element
+ """
try:
xml_map = cls._xml_map # type: ignore
except AttributeError:
@@ -346,7 +390,9 @@ def serialize(self, keep_readonly: bool = False, **kwargs: Any) -> JSON:
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, keep_readonly=keep_readonly, **kwargs
+ )
def as_dict(
self,
@@ -380,12 +426,15 @@ def my_key_transformer(key, attr_desc, value):
If you want XML serialization, you can pass the kwargs is_xml=True.
+ :param bool keep_readonly: If you want to serialize the readonly attributes
:param function key_transformer: A key transformer function.
:returns: A dict JSON compatible object
:rtype: dict
"""
serializer = Serializer(self._infer_class_models())
- return serializer._serialize(self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs) # type: ignore
+ return serializer._serialize( # type: ignore # pylint: disable=protected-access
+ self, key_transformer=key_transformer, keep_readonly=keep_readonly, **kwargs
+ )
@classmethod
def _infer_class_models(cls):
@@ -395,7 +444,7 @@ def _infer_class_models(cls):
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
if cls.__name__ not in client_models:
raise ValueError("Not Autorest generated code")
- except Exception:
+ except Exception: # pylint: disable=broad-exception-caught
# Assume it's not Autorest generated (tests?). Add ourselves as dependencies.
client_models = {cls.__name__: cls}
return client_models
@@ -408,6 +457,7 @@ def deserialize(cls: Type[ModelType], data: Any, content_type: Optional[str] = N
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
return deserializer(cls.__name__, data, content_type=content_type) # type: ignore
@@ -426,9 +476,11 @@ def from_dict(
and last_rest_key_case_insensitive_extractor)
:param dict data: A dict using RestAPI structure
+ :param function key_extractors: A key extractor function.
:param str content_type: JSON by default, set application/xml if XML.
:returns: An instance of this model
:raises: DeserializationError if something went wrong
+ :rtype: ModelType
"""
deserializer = Deserializer(cls._infer_class_models())
deserializer.key_extractors = ( # type: ignore
@@ -448,21 +500,25 @@ 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))
+ result.update(objects[valuetype]._flatten_subtype(key, objects)) # pylint: disable=protected-access
return result
@classmethod
def _classify(cls, response, objects):
"""Check the class _subtype_map for any child classes.
We want to ignore any inherited _subtype_maps.
- Remove the polymorphic key from the initial data.
+
+ :param dict response: The initial data
+ :param dict objects: The class objects
+ :returns: The class to be used
+ :rtype: class
"""
for subtype_key in cls.__dict__.get("_subtype_map", {}).keys():
subtype_value = None
if not isinstance(response, ET.Element):
rest_api_response_key = cls._get_rest_key_parts(subtype_key)[-1]
- subtype_value = response.pop(rest_api_response_key, None) or response.pop(subtype_key, None)
+ subtype_value = response.get(rest_api_response_key, None) or response.get(subtype_key, None)
else:
subtype_value = xml_key_extractor(subtype_key, cls._attribute_map[subtype_key], response)
if subtype_value:
@@ -501,11 +557,13 @@ def _decode_attribute_map_key(key):
inside the received data.
:param str key: A key string from the generated code
+ :returns: The decoded key
+ :rtype: str
"""
return key.replace("\\.", ".")
-class Serializer(object):
+class Serializer: # pylint: disable=too-many-public-methods
"""Request object model serializer."""
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
@@ -540,7 +598,7 @@ class Serializer(object):
"multiple": lambda x, y: x % y != 0,
}
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.serialize_type = {
"iso-8601": Serializer.serialize_iso,
"rfc-1123": Serializer.serialize_rfc,
@@ -560,13 +618,16 @@ def __init__(self, classes: Optional[Mapping[str, type]] = None):
self.key_transformer = full_restapi_key_transformer
self.client_side_validation = True
- def _serialize(self, target_obj, data_type=None, **kwargs):
+ def _serialize( # pylint: disable=too-many-nested-blocks, too-many-branches, too-many-statements, too-many-locals
+ self, target_obj, data_type=None, **kwargs
+ ):
"""Serialize data into a string according to type.
- :param target_obj: The data to be serialized.
+ :param object target_obj: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str, dict
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
"""
key_transformer = kwargs.get("key_transformer", self.key_transformer)
keep_readonly = kwargs.get("keep_readonly", False)
@@ -592,12 +653,14 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
serialized = {}
if is_xml_model_serialization:
- serialized = target_obj._create_xml_node()
+ serialized = target_obj._create_xml_node() # pylint: disable=protected-access
try:
- attributes = target_obj._attribute_map
+ attributes = target_obj._attribute_map # pylint: disable=protected-access
for attr, attr_desc in attributes.items():
attr_name = attr
- if not keep_readonly and target_obj._validation.get(attr_name, {}).get("readonly", False):
+ if not keep_readonly and target_obj._validation.get( # pylint: disable=protected-access
+ attr_name, {}
+ ).get("readonly", False):
continue
if attr_name == "additional_properties" and attr_desc["key"] == "":
@@ -633,7 +696,8 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
if isinstance(new_attr, list):
serialized.extend(new_attr) # type: ignore
elif isinstance(new_attr, ET.Element):
- # If the down XML has no XML/Name, we MUST replace the tag with the local tag. But keeping the namespaces.
+ # If the down XML has no XML/Name,
+ # we MUST replace the tag with the local tag. But keeping the namespaces.
if "name" not in getattr(orig_attr, "_xml_map", {}):
splitted_tag = new_attr.tag.split("}")
if len(splitted_tag) == 2: # Namespace
@@ -664,17 +728,17 @@ def _serialize(self, target_obj, data_type=None, **kwargs):
except (AttributeError, KeyError, TypeError) as err:
msg = "Attribute {} in object {} cannot be serialized.\n{}".format(attr_name, class_name, str(target_obj))
raise SerializationError(msg) from err
- else:
- return serialized
+ return serialized
def body(self, data, data_type, **kwargs):
"""Serialize data intended for a request body.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: dict
:raises: SerializationError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized request body
"""
# Just in case this is a dict
@@ -703,7 +767,7 @@ def body(self, data, data_type, **kwargs):
attribute_key_case_insensitive_extractor,
last_rest_key_case_insensitive_extractor,
]
- data = deserializer._deserialize(data_type, data)
+ data = deserializer._deserialize(data_type, data) # pylint: disable=protected-access
except DeserializationError as err:
raise SerializationError("Unable to build a model: " + str(err)) from err
@@ -712,9 +776,11 @@ def body(self, data, data_type, **kwargs):
def url(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL path.
- :param data: The data to be serialized.
+ :param str name: The name of the URL path parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
+ :returns: The serialized URL path
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
"""
@@ -728,21 +794,20 @@ def url(self, name, data, data_type, **kwargs):
output = output.replace("{", quote("{")).replace("}", quote("}"))
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return output
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return output
def query(self, name, data, data_type, **kwargs):
"""Serialize data intended for a URL query.
- :param data: The data to be serialized.
+ :param str name: The name of the query parameter.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :keyword bool skip_quote: Whether to skip quote the serialized result.
- Defaults to False.
:rtype: str, list
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized query parameter
"""
try:
# Treat the list aside, since we don't want to encode the div separator
@@ -759,19 +824,20 @@ def query(self, name, data, data_type, **kwargs):
output = str(output)
else:
output = quote(str(output), safe="")
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def header(self, name, data, data_type, **kwargs):
"""Serialize data intended for a request header.
- :param data: The data to be serialized.
+ :param str name: The name of the header.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
:rtype: str
:raises: TypeError if serialization fails.
:raises: ValueError if data is None
+ :returns: The serialized header
"""
try:
if data_type in ["[str]"]:
@@ -780,21 +846,20 @@ def header(self, name, data, data_type, **kwargs):
output = self.serialize_data(data, data_type, **kwargs)
if data_type == "bool":
output = json.dumps(output)
- except SerializationError:
- raise TypeError("{} must be type {}.".format(name, data_type))
- else:
- return str(output)
+ except SerializationError as exc:
+ raise TypeError("{} must be type {}.".format(name, data_type)) from exc
+ return str(output)
def serialize_data(self, data, data_type, **kwargs):
"""Serialize generic data according to supplied data type.
- :param data: The data to be serialized.
+ :param object data: The data to be serialized.
:param str data_type: The type to be serialized from.
- :param bool required: Whether it's essential that the data not be
- empty or None
:raises: AttributeError if required data is None.
:raises: ValueError if data is None
:raises: SerializationError if serialization fails.
+ :returns: The serialized data.
+ :rtype: str, int, float, bool, dict, list
"""
if data is None:
raise ValueError("No value for given attribute")
@@ -805,7 +870,7 @@ def serialize_data(self, data, data_type, **kwargs):
if data_type in self.basic_types.values():
return self.serialize_basic(data, data_type, **kwargs)
- elif data_type in self.serialize_type:
+ if data_type in self.serialize_type:
return self.serialize_type[data_type](data, **kwargs)
# If dependencies is empty, try with current data class
@@ -821,11 +886,10 @@ def serialize_data(self, data, data_type, **kwargs):
except (ValueError, TypeError) as err:
msg = "Unable to serialize value: {!r} as type: {!r}."
raise SerializationError(msg.format(data, data_type)) from err
- else:
- return self._serialize(data, **kwargs)
+ return self._serialize(data, **kwargs)
@classmethod
- def _get_custom_serializers(cls, data_type, **kwargs):
+ def _get_custom_serializers(cls, data_type, **kwargs): # pylint: disable=inconsistent-return-statements
custom_serializer = kwargs.get("basic_types_serializers", {}).get(data_type)
if custom_serializer:
return custom_serializer
@@ -841,23 +905,26 @@ def serialize_basic(cls, data, data_type, **kwargs):
- basic_types_serializers dict[str, callable] : If set, use the callable as serializer
- is_xml bool : If set, use xml_basic_types_serializers
- :param data: Object to be serialized.
+ :param obj data: Object to be serialized.
:param str data_type: Type of object in the iterable.
+ :rtype: str, int, float, bool
+ :return: serialized object
"""
custom_serializer = cls._get_custom_serializers(data_type, **kwargs)
if custom_serializer:
return custom_serializer(data)
if data_type == "str":
return cls.serialize_unicode(data)
- return eval(data_type)(data) # nosec
+ return eval(data_type)(data) # nosec # pylint: disable=eval-used
@classmethod
def serialize_unicode(cls, data):
"""Special handling for serializing unicode strings in Py2.
Encode to UTF-8 if unicode, otherwise handle as a str.
- :param data: Object to be serialized.
+ :param str data: Object to be serialized.
:rtype: str
+ :return: serialized object
"""
try: # If I received an enum, return its value
return data.value
@@ -871,8 +938,7 @@ def serialize_unicode(cls, data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
def serialize_iter(self, data, iter_type, div=None, **kwargs):
"""Serialize iterable.
@@ -882,15 +948,13 @@ def serialize_iter(self, data, iter_type, div=None, **kwargs):
serialization_ctxt['type'] should be same as data_type.
- is_xml bool : If set, serialize as XML
- :param list attr: Object to be serialized.
+ :param list data: Object to be serialized.
:param str iter_type: Type of object in the iterable.
- :param bool required: Whether the objects in the iterable must
- not be None or empty.
:param str div: If set, this str will be used to combine the elements
in the iterable into a combined string. Default is 'None'.
- :keyword bool do_quote: Whether to quote the serialized result of each iterable element.
Defaults to False.
:rtype: list, str
+ :return: serialized iterable
"""
if isinstance(data, str):
raise SerializationError("Refuse str type as a valid iter type.")
@@ -945,9 +1009,8 @@ def serialize_dict(self, attr, dict_type, **kwargs):
:param dict attr: Object to be serialized.
:param str dict_type: Type of object in the dictionary.
- :param bool required: Whether the objects in the dictionary must
- not be None or empty.
:rtype: dict
+ :return: serialized dictionary
"""
serialization_ctxt = kwargs.get("serialization_ctxt", {})
serialized = {}
@@ -971,7 +1034,7 @@ def serialize_dict(self, attr, dict_type, **kwargs):
return serialized
- def serialize_object(self, attr, **kwargs):
+ def serialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Serialize a generic object.
This will be handled as a dictionary. If object passed in is not
a basic type (str, int, float, dict, list) it will simply be
@@ -979,6 +1042,7 @@ def serialize_object(self, attr, **kwargs):
:param dict attr: Object to be serialized.
:rtype: dict or str
+ :return: serialized object
"""
if attr is None:
return None
@@ -1003,7 +1067,7 @@ def serialize_object(self, attr, **kwargs):
return self.serialize_decimal(attr)
# If it's a model or I know this dependency, serialize as a Model
- elif obj_type in self.dependencies.values() or isinstance(attr, Model):
+ if obj_type in self.dependencies.values() or isinstance(attr, Model):
return self._serialize(attr)
if obj_type == dict:
@@ -1034,56 +1098,61 @@ def serialize_enum(attr, enum_obj=None):
try:
enum_obj(result) # type: ignore
return result
- except ValueError:
+ except ValueError as exc:
for enum_value in enum_obj: # type: ignore
if enum_value.value.lower() == str(attr).lower():
return enum_value.value
error = "{!r} is not valid value for enum {!r}"
- raise SerializationError(error.format(attr, enum_obj))
+ raise SerializationError(error.format(attr, enum_obj)) from exc
@staticmethod
- def serialize_bytearray(attr, **kwargs):
+ def serialize_bytearray(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize bytearray into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
return b64encode(attr).decode()
@staticmethod
- def serialize_base64(attr, **kwargs):
+ def serialize_base64(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize str into base-64 string.
- :param attr: Object to be serialized.
+ :param str attr: Object to be serialized.
:rtype: str
+ :return: serialized base64
"""
encoded = b64encode(attr).decode("ascii")
return encoded.strip("=").replace("+", "-").replace("/", "_")
@staticmethod
- def serialize_decimal(attr, **kwargs):
+ def serialize_decimal(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Decimal object to float.
- :param attr: Object to be serialized.
+ :param decimal attr: Object to be serialized.
:rtype: float
+ :return: serialized decimal
"""
return float(attr)
@staticmethod
- def serialize_long(attr, **kwargs):
+ def serialize_long(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize long (Py2) or int (Py3).
- :param attr: Object to be serialized.
+ :param int attr: Object to be serialized.
:rtype: int/long
+ :return: serialized long
"""
return _long_type(attr)
@staticmethod
- def serialize_date(attr, **kwargs):
+ def serialize_date(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Date object into ISO-8601 formatted string.
:param Date attr: Object to be serialized.
:rtype: str
+ :return: serialized date
"""
if isinstance(attr, str):
attr = isodate.parse_date(attr)
@@ -1091,11 +1160,12 @@ def serialize_date(attr, **kwargs):
return t
@staticmethod
- def serialize_time(attr, **kwargs):
+ def serialize_time(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Time object into ISO-8601 formatted string.
:param datetime.time attr: Object to be serialized.
:rtype: str
+ :return: serialized time
"""
if isinstance(attr, str):
attr = isodate.parse_time(attr)
@@ -1105,30 +1175,32 @@ def serialize_time(attr, **kwargs):
return t
@staticmethod
- def serialize_duration(attr, **kwargs):
+ def serialize_duration(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize TimeDelta object into ISO-8601 formatted string.
:param TimeDelta attr: Object to be serialized.
:rtype: str
+ :return: serialized duration
"""
if isinstance(attr, str):
attr = isodate.parse_duration(attr)
return isodate.duration_isoformat(attr)
@staticmethod
- def serialize_rfc(attr, **kwargs):
+ def serialize_rfc(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into RFC-1123 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: TypeError if format invalid.
+ :return: serialized rfc
"""
try:
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
utc = attr.utctimetuple()
- except AttributeError:
- raise TypeError("RFC1123 object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("RFC1123 object must be valid Datetime object.") from exc
return "{}, {:02} {} {:04} {:02}:{:02}:{:02} GMT".format(
Serializer.days[utc.tm_wday],
@@ -1141,12 +1213,13 @@ def serialize_rfc(attr, **kwargs):
)
@staticmethod
- def serialize_iso(attr, **kwargs):
+ def serialize_iso(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into ISO-8601 formatted string.
:param Datetime attr: Object to be serialized.
:rtype: str
:raises: SerializationError if format invalid.
+ :return: serialized iso
"""
if isinstance(attr, str):
attr = isodate.parse_datetime(attr)
@@ -1172,13 +1245,14 @@ def serialize_iso(attr, **kwargs):
raise TypeError(msg) from err
@staticmethod
- def serialize_unix(attr, **kwargs):
+ def serialize_unix(attr, **kwargs): # pylint: disable=unused-argument
"""Serialize Datetime object into IntTime format.
This is represented as seconds.
:param Datetime attr: Object to be serialized.
:rtype: int
:raises: SerializationError if format invalid
+ :return: serialied unix
"""
if isinstance(attr, int):
return attr
@@ -1186,11 +1260,11 @@ def serialize_unix(attr, **kwargs):
if not attr.tzinfo:
_LOGGER.warning("Datetime with no tzinfo will be considered UTC.")
return int(calendar.timegm(attr.utctimetuple()))
- except AttributeError:
- raise TypeError("Unix time object must be valid Datetime object.")
+ except AttributeError as exc:
+ raise TypeError("Unix time object must be valid Datetime object.") from exc
-def rest_key_extractor(attr, attr_desc, data):
+def rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
key = attr_desc["key"]
working_data = data
@@ -1211,7 +1285,9 @@ def rest_key_extractor(attr, attr_desc, data):
return working_data.get(key)
-def rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def rest_key_case_insensitive_extractor( # pylint: disable=unused-argument, inconsistent-return-statements
+ attr, attr_desc, data
+):
key = attr_desc["key"]
working_data = data
@@ -1232,17 +1308,29 @@ def rest_key_case_insensitive_extractor(attr, attr_desc, data):
return attribute_key_case_insensitive_extractor(key, None, working_data)
-def last_rest_key_extractor(attr, attr_desc, data):
- """Extract the attribute in "data" based on the last part of the JSON path key."""
+def last_rest_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
+ """Extract the attribute in "data" based on the last part of the JSON path key.
+
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
+ """
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
return attribute_key_extractor(dict_keys[-1], None, data)
-def last_rest_key_case_insensitive_extractor(attr, attr_desc, data):
+def last_rest_key_case_insensitive_extractor(attr, attr_desc, data): # pylint: disable=unused-argument
"""Extract the attribute in "data" based on the last part of the JSON path key.
This is the case insensitive version of "last_rest_key_extractor"
+ :param str attr: The attribute to extract
+ :param dict attr_desc: The attribute description
+ :param dict data: The data to extract from
+ :rtype: object
+ :returns: The extracted attribute
"""
key = attr_desc["key"]
dict_keys = _FLATTEN.split(key)
@@ -1279,7 +1367,7 @@ def _extract_name_from_internal_type(internal_type):
return xml_name
-def xml_key_extractor(attr, attr_desc, data):
+def xml_key_extractor(attr, attr_desc, data): # pylint: disable=unused-argument,too-many-return-statements
if isinstance(data, dict):
return None
@@ -1331,22 +1419,21 @@ def xml_key_extractor(attr, attr_desc, data):
if is_iter_type:
if is_wrapped:
return None # is_wrapped no node, we want None
- else:
- return [] # not wrapped, assume empty list
+ return [] # not wrapped, assume empty list
return None # Assume it's not there, maybe an optional node.
# If is_iter_type and not wrapped, return all found children
if is_iter_type:
if not is_wrapped:
return children
- else: # Iter and wrapped, should have found one node only (the wrap one)
- if len(children) != 1:
- raise DeserializationError(
- "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format(
- xml_name
- )
+ # Iter and wrapped, should have found one node only (the wrap one)
+ if len(children) != 1:
+ raise DeserializationError(
+ "Tried to deserialize an array not wrapped, and found several nodes '{}'. Maybe you should declare this array as wrapped?".format( # pylint: disable=line-too-long
+ xml_name
)
- return list(children[0]) # Might be empty list and that's ok.
+ )
+ return list(children[0]) # Might be empty list and that's ok.
# Here it's not a itertype, we should have found one element only or empty
if len(children) > 1:
@@ -1354,7 +1441,7 @@ def xml_key_extractor(attr, attr_desc, data):
return children[0]
-class Deserializer(object):
+class Deserializer:
"""Response object model deserializer.
:param dict classes: Class type dictionary for deserializing complex types.
@@ -1363,9 +1450,9 @@ class Deserializer(object):
basic_types = {str: "str", int: "int", bool: "bool", float: "float"}
- valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}" r"\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
+ valid_date = re.compile(r"\d{4}[-]\d{2}[-]\d{2}T\d{2}:\d{2}:\d{2}\.?\d*Z?[-+]?[\d{2}]?:?[\d{2}]?")
- def __init__(self, classes: Optional[Mapping[str, type]] = None):
+ def __init__(self, classes: Optional[Mapping[str, type]] = None) -> None:
self.deserialize_type = {
"iso-8601": Deserializer.deserialize_iso,
"rfc-1123": Deserializer.deserialize_rfc,
@@ -1403,11 +1490,12 @@ def __call__(self, target_obj, response_data, content_type=None):
:param str content_type: Swagger "produces" if available.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
data = self._unpack_content(response_data, content_type)
return self._deserialize(target_obj, data)
- def _deserialize(self, target_obj, data):
+ def _deserialize(self, target_obj, data): # pylint: disable=inconsistent-return-statements
"""Call the deserializer on a model.
Data needs to be already deserialized as JSON or XML ElementTree
@@ -1416,12 +1504,13 @@ def _deserialize(self, target_obj, data):
:param object data: Object to deserialize.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
# This is already a model, go recursive just in case
if hasattr(data, "_attribute_map"):
constants = [name for name, config in getattr(data, "_validation", {}).items() if config.get("constant")]
try:
- for attr, mapconfig in data._attribute_map.items():
+ for attr, mapconfig in data._attribute_map.items(): # pylint: disable=protected-access
if attr in constants:
continue
value = getattr(data, attr)
@@ -1440,13 +1529,13 @@ def _deserialize(self, target_obj, data):
if isinstance(response, str):
return self.deserialize_data(data, response)
- elif isinstance(response, type) and issubclass(response, Enum):
+ if isinstance(response, type) and issubclass(response, Enum):
return self.deserialize_enum(data, response)
if data is None or data is CoreNull:
return data
try:
- attributes = response._attribute_map # type: ignore
+ attributes = response._attribute_map # type: ignore # pylint: disable=protected-access
d_attrs = {}
for attr, attr_desc in attributes.items():
# Check empty string. If it's not empty, someone has a real "additionalProperties"...
@@ -1476,9 +1565,8 @@ def _deserialize(self, target_obj, data):
except (AttributeError, TypeError, KeyError) as err:
msg = "Unable to deserialize to object: " + class_name # type: ignore
raise DeserializationError(msg) from err
- else:
- additional_properties = self._build_additional_properties(attributes, data)
- return self._instantiate_model(response, d_attrs, additional_properties)
+ additional_properties = self._build_additional_properties(attributes, data)
+ return self._instantiate_model(response, d_attrs, additional_properties)
def _build_additional_properties(self, attribute_map, data):
if not self.additional_properties_detection:
@@ -1505,6 +1593,8 @@ def _classify_target(self, target, data):
:param str target: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
+ :return: The classified target object and its class name.
+ :rtype: tuple
"""
if target is None:
return None, None
@@ -1516,7 +1606,7 @@ def _classify_target(self, target, data):
return target, target
try:
- target = target._classify(data, self.dependencies) # type: ignore
+ target = target._classify(data, self.dependencies) # type: ignore # pylint: disable=protected-access
except AttributeError:
pass # Target is not a Model, no classify
return target, target.__class__.__name__ # type: ignore
@@ -1531,10 +1621,12 @@ def failsafe_deserialize(self, target_obj, data, content_type=None):
:param str target_obj: The target object type to deserialize to.
:param str/dict data: The response data to deserialize.
:param str content_type: Swagger "produces" if available.
+ :return: Deserialized object.
+ :rtype: object
"""
try:
return self(target_obj, data, content_type=content_type)
- except:
+ except: # pylint: disable=bare-except
_LOGGER.debug(
"Ran into a deserialization error. Ignoring since this is failsafe deserialization", exc_info=True
)
@@ -1552,10 +1644,12 @@ def _unpack_content(raw_data, content_type=None):
If raw_data is something else, bypass all logic and return it directly.
- :param raw_data: Data to be processed.
- :param content_type: How to parse if raw_data is a string/bytes.
+ :param obj raw_data: Data to be processed.
+ :param str content_type: How to parse if raw_data is a string/bytes.
:raises JSONDecodeError: If JSON is requested and parsing is impossible.
:raises UnicodeDecodeError: If bytes is not UTF8
+ :rtype: object
+ :return: Unpacked content.
"""
# Assume this is enough to detect a Pipeline Response without importing it
context = getattr(raw_data, "context", {})
@@ -1579,24 +1673,35 @@ def _unpack_content(raw_data, content_type=None):
def _instantiate_model(self, response, attrs, additional_properties=None):
"""Instantiate a response model passing in deserialized args.
- :param response: The response model class.
- :param d_attrs: The deserialized response attributes.
+ :param Response response: The response model class.
+ :param dict attrs: The deserialized response attributes.
+ :param dict additional_properties: Additional properties to be set.
+ :rtype: Response
+ :return: The instantiated response model.
"""
if callable(response):
subtype = getattr(response, "_subtype_map", {})
try:
- readonly = [k for k, v in response._validation.items() if v.get("readonly")]
- const = [k for k, v in response._validation.items() if v.get("constant")]
+ readonly = [
+ k
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
+ if v.get("readonly")
+ ]
+ const = [
+ k
+ for k, v in response._validation.items() # pylint: disable=protected-access # type: ignore
+ if v.get("constant")
+ ]
kwargs = {k: v for k, v in attrs.items() if k not in subtype and k not in readonly + const}
response_obj = response(**kwargs)
for attr in readonly:
setattr(response_obj, attr, attrs.get(attr))
if additional_properties:
- response_obj.additional_properties = additional_properties
+ response_obj.additional_properties = additional_properties # type: ignore
return response_obj
except TypeError as err:
msg = "Unable to deserialize {} into model {}. ".format(kwargs, response) # type: ignore
- raise DeserializationError(msg + str(err))
+ raise DeserializationError(msg + str(err)) from err
else:
try:
for attr, value in attrs.items():
@@ -1605,15 +1710,16 @@ def _instantiate_model(self, response, attrs, additional_properties=None):
except Exception as exp:
msg = "Unable to populate response model. "
msg += "Type: {}, Error: {}".format(type(response), exp)
- raise DeserializationError(msg)
+ raise DeserializationError(msg) from exp
- def deserialize_data(self, data, data_type):
+ def deserialize_data(self, data, data_type): # pylint: disable=too-many-return-statements
"""Process data for deserialization according to data type.
:param str data: The response string to be deserialized.
:param str data_type: The type to deserialize to.
:raises: DeserializationError if deserialization fails.
:return: Deserialized object.
+ :rtype: object
"""
if data is None:
return data
@@ -1627,7 +1733,11 @@ def deserialize_data(self, data, data_type):
if isinstance(data, self.deserialize_expected_types.get(data_type, tuple())):
return data
- is_a_text_parsing_type = lambda x: x not in ["object", "[]", r"{}"]
+ is_a_text_parsing_type = lambda x: x not in [ # pylint: disable=unnecessary-lambda-assignment
+ "object",
+ "[]",
+ r"{}",
+ ]
if isinstance(data, ET.Element) and is_a_text_parsing_type(data_type) and not data.text:
return None
data_val = self.deserialize_type[data_type](data)
@@ -1647,14 +1757,14 @@ def deserialize_data(self, data, data_type):
msg = "Unable to deserialize response data."
msg += " Data: {}, {}".format(data, data_type)
raise DeserializationError(msg) from err
- else:
- return self._deserialize(obj_type, data)
+ return self._deserialize(obj_type, data)
def deserialize_iter(self, attr, iter_type):
"""Deserialize an iterable.
:param list attr: Iterable to be deserialized.
:param str iter_type: The type of object in the iterable.
+ :return: Deserialized iterable.
:rtype: list
"""
if attr is None:
@@ -1671,6 +1781,7 @@ def deserialize_dict(self, attr, dict_type):
:param dict/list attr: Dictionary to be deserialized. Also accepts
a list of key, value pairs.
:param str dict_type: The object type of the items in the dictionary.
+ :return: Deserialized dictionary.
:rtype: dict
"""
if isinstance(attr, list):
@@ -1681,11 +1792,12 @@ def deserialize_dict(self, attr, dict_type):
attr = {el.tag: el.text for el in attr}
return {k: self.deserialize_data(v, dict_type) for k, v in attr.items()}
- def deserialize_object(self, attr, **kwargs):
+ def deserialize_object(self, attr, **kwargs): # pylint: disable=too-many-return-statements
"""Deserialize a generic object.
This will be handled as a dictionary.
:param dict attr: Dictionary to be deserialized.
+ :return: Deserialized object.
:rtype: dict
:raises: TypeError if non-builtin datatype encountered.
"""
@@ -1720,11 +1832,10 @@ def deserialize_object(self, attr, **kwargs):
pass
return deserialized
- else:
- error = "Cannot deserialize generic object with type: "
- raise TypeError(error + str(obj_type))
+ error = "Cannot deserialize generic object with type: "
+ raise TypeError(error + str(obj_type))
- def deserialize_basic(self, attr, data_type):
+ def deserialize_basic(self, attr, data_type): # pylint: disable=too-many-return-statements
"""Deserialize basic builtin data type from string.
Will attempt to convert to str, int, float and bool.
This function will also accept '1', '0', 'true' and 'false' as
@@ -1732,6 +1843,7 @@ def deserialize_basic(self, attr, data_type):
:param str attr: response string to be deserialized.
:param str data_type: deserialization data type.
+ :return: Deserialized basic type.
:rtype: str, int, float or bool
:raises: TypeError if string format is not valid.
"""
@@ -1743,24 +1855,23 @@ def deserialize_basic(self, attr, data_type):
if data_type == "str":
# None or '', node is empty string.
return ""
- else:
- # None or '', node with a strong type is None.
- # Don't try to model "empty bool" or "empty int"
- return None
+ # None or '', node with a strong type is None.
+ # Don't try to model "empty bool" or "empty int"
+ return None
if data_type == "bool":
if attr in [True, False, 1, 0]:
return bool(attr)
- elif isinstance(attr, str):
+ if isinstance(attr, str):
if attr.lower() in ["true", "1"]:
return True
- elif attr.lower() in ["false", "0"]:
+ if attr.lower() in ["false", "0"]:
return False
raise TypeError("Invalid boolean value: {}".format(attr))
if data_type == "str":
return self.deserialize_unicode(attr)
- return eval(data_type)(attr) # nosec
+ return eval(data_type)(attr) # nosec # pylint: disable=eval-used
@staticmethod
def deserialize_unicode(data):
@@ -1768,6 +1879,7 @@ def deserialize_unicode(data):
as a string.
:param str data: response string to be deserialized.
+ :return: Deserialized string.
:rtype: str or unicode
"""
# We might be here because we have an enum modeled as string,
@@ -1781,8 +1893,7 @@ def deserialize_unicode(data):
return data
except NameError:
return str(data)
- else:
- return str(data)
+ return str(data)
@staticmethod
def deserialize_enum(data, enum_obj):
@@ -1794,6 +1905,7 @@ def deserialize_enum(data, enum_obj):
:param str data: Response string to be deserialized. If this value is
None or invalid it will be returned as-is.
:param Enum enum_obj: Enum object to deserialize to.
+ :return: Deserialized enum object.
:rtype: Enum
"""
if isinstance(data, enum_obj) or data is None:
@@ -1804,9 +1916,9 @@ def deserialize_enum(data, enum_obj):
# Workaround. We might consider remove it in the future.
try:
return list(enum_obj.__members__.values())[data]
- except IndexError:
+ except IndexError as exc:
error = "{!r} is not a valid index for enum {!r}"
- raise DeserializationError(error.format(data, enum_obj))
+ raise DeserializationError(error.format(data, enum_obj)) from exc
try:
return enum_obj(str(data))
except ValueError:
@@ -1822,6 +1934,7 @@ def deserialize_bytearray(attr):
"""Deserialize string into bytearray.
:param str attr: response string to be deserialized.
+ :return: Deserialized bytearray
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1834,6 +1947,7 @@ def deserialize_base64(attr):
"""Deserialize base64 encoded string into string.
:param str attr: response string to be deserialized.
+ :return: Deserialized base64 string
:rtype: bytearray
:raises: TypeError if string format invalid.
"""
@@ -1849,8 +1963,9 @@ def deserialize_decimal(attr):
"""Deserialize string into Decimal object.
:param str attr: response string to be deserialized.
- :rtype: Decimal
+ :return: Deserialized decimal
:raises: DeserializationError if string format invalid.
+ :rtype: decimal
"""
if isinstance(attr, ET.Element):
attr = attr.text
@@ -1865,6 +1980,7 @@ def deserialize_long(attr):
"""Deserialize string into long (Py2) or int (Py3).
:param str attr: response string to be deserialized.
+ :return: Deserialized int
:rtype: long or int
:raises: ValueError if string format invalid.
"""
@@ -1877,6 +1993,7 @@ def deserialize_duration(attr):
"""Deserialize ISO-8601 formatted string into TimeDelta object.
:param str attr: response string to be deserialized.
+ :return: Deserialized duration
:rtype: TimeDelta
:raises: DeserializationError if string format invalid.
"""
@@ -1887,14 +2004,14 @@ def deserialize_duration(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize duration object."
raise DeserializationError(msg) from err
- else:
- return duration
+ return duration
@staticmethod
def deserialize_date(attr):
"""Deserialize ISO-8601 formatted string into Date object.
:param str attr: response string to be deserialized.
+ :return: Deserialized date
:rtype: Date
:raises: DeserializationError if string format invalid.
"""
@@ -1910,6 +2027,7 @@ def deserialize_time(attr):
"""Deserialize ISO-8601 formatted string into time object.
:param str attr: response string to be deserialized.
+ :return: Deserialized time
:rtype: datetime.time
:raises: DeserializationError if string format invalid.
"""
@@ -1924,6 +2042,7 @@ def deserialize_rfc(attr):
"""Deserialize RFC-1123 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized RFC datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1939,14 +2058,14 @@ def deserialize_rfc(attr):
except ValueError as err:
msg = "Cannot deserialize to rfc datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_iso(attr):
"""Deserialize ISO-8601 formatted string into Datetime object.
:param str attr: response string to be deserialized.
+ :return: Deserialized ISO datetime
:rtype: Datetime
:raises: DeserializationError if string format invalid.
"""
@@ -1976,8 +2095,7 @@ def deserialize_iso(attr):
except (ValueError, OverflowError, AttributeError) as err:
msg = "Cannot deserialize datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
@staticmethod
def deserialize_unix(attr):
@@ -1985,6 +2103,7 @@ def deserialize_unix(attr):
This is represented as seconds.
:param int attr: Object to be serialized.
+ :return: Deserialized datetime
:rtype: Datetime
:raises: DeserializationError if format invalid
"""
@@ -1996,5 +2115,4 @@ def deserialize_unix(attr):
except ValueError as err:
msg = "Cannot deserialize to unix datetime object."
raise DeserializationError(msg) from err
- else:
- return date_obj
+ return date_obj
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py
index 2d6bcdb50d74..21eb43391e16 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/_version.py
@@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
-VERSION = "8.0.0b4"
+VERSION = "8.0.0b5"
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/__init__.py
index 923883679124..88b5d0616f17 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/__init__.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/__init__.py
@@ -5,12 +5,18 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._azure_stack_hci_client import AzureStackHCIClient
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._azure_stack_hci_client import AzureStackHCIClient # type: ignore
try:
from ._patch import __all__ as _patch_all
- from ._patch import * # pylint: disable=unused-wildcard-import
+ from ._patch import *
except ImportError:
_patch_all = []
from ._patch import patch_sdk as _patch_sdk
@@ -18,6 +24,6 @@
__all__ = [
"AzureStackHCIClient",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py
index 337a69cb70e8..75015d340d8f 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_azure_stack_hci_client.py
@@ -22,6 +22,7 @@
ArcSettingsOperations,
ClustersOperations,
DeploymentSettingsOperations,
+ EdgeDeviceJobsOperations,
EdgeDevicesOperations,
ExtensionsOperations,
OffersOperations,
@@ -32,14 +33,14 @@
UpdateRunsOperations,
UpdateSummariesOperations,
UpdatesOperations,
+ ValidatedSolutionRecipesOperations,
)
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword,too-many-instance-attributes
+class AzureStackHCIClient: # pylint: disable=too-many-instance-attributes
"""Azure Stack HCI management service.
:ivar arc_settings: ArcSettingsOperations operations
@@ -49,6 +50,8 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
:ivar deployment_settings: DeploymentSettingsOperations operations
:vartype deployment_settings:
azure.mgmt.azurestackhci.aio.operations.DeploymentSettingsOperations
+ :ivar edge_device_jobs: EdgeDeviceJobsOperations operations
+ :vartype edge_device_jobs: azure.mgmt.azurestackhci.aio.operations.EdgeDeviceJobsOperations
:ivar edge_devices: EdgeDevicesOperations operations
:vartype edge_devices: azure.mgmt.azurestackhci.aio.operations.EdgeDevicesOperations
:ivar extensions: ExtensionsOperations operations
@@ -65,18 +68,21 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
:vartype skus: azure.mgmt.azurestackhci.aio.operations.SkusOperations
:ivar update_runs: UpdateRunsOperations operations
:vartype update_runs: azure.mgmt.azurestackhci.aio.operations.UpdateRunsOperations
- :ivar update_summaries: UpdateSummariesOperations operations
- :vartype update_summaries: azure.mgmt.azurestackhci.aio.operations.UpdateSummariesOperations
:ivar updates: UpdatesOperations operations
:vartype updates: azure.mgmt.azurestackhci.aio.operations.UpdatesOperations
+ :ivar update_summaries: UpdateSummariesOperations operations
+ :vartype update_summaries: azure.mgmt.azurestackhci.aio.operations.UpdateSummariesOperations
+ :ivar validated_solution_recipes: ValidatedSolutionRecipesOperations operations
+ :vartype validated_solution_recipes:
+ azure.mgmt.azurestackhci.aio.operations.ValidatedSolutionRecipesOperations
: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 "2024-04-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2025-02-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.
@@ -121,6 +127,7 @@ def __init__(
self.deployment_settings = DeploymentSettingsOperations(
self._client, self._config, self._serialize, self._deserialize
)
+ self.edge_device_jobs = EdgeDeviceJobsOperations(self._client, self._config, self._serialize, self._deserialize)
self.edge_devices = EdgeDevicesOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.offers = OffersOperations(self._client, self._config, self._serialize, self._deserialize)
@@ -131,10 +138,13 @@ def __init__(
)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.updates = UpdatesOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_summaries = UpdateSummariesOperations(
self._client, self._config, self._serialize, self._deserialize
)
- self.updates = UpdatesOperations(self._client, self._config, self._serialize, self._deserialize)
+ self.validated_solution_recipes = ValidatedSolutionRecipesOperations(
+ self._client, self._config, self._serialize, self._deserialize
+ )
def _send_request(
self, request: HttpRequest, *, stream: bool = False, **kwargs: Any
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_configuration.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_configuration.py
index 5877b8b405b6..8dea7edac8d4 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_configuration.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/_configuration.py
@@ -14,11 +14,10 @@
from .._version import VERSION
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential
-class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
+class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-attributes
"""Configuration for AzureStackHCIClient.
Note that all parameters used to create this instance are saved as instance
@@ -28,13 +27,13 @@ class AzureStackHCIClientConfiguration: # pylint: disable=too-many-instance-att
: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 "2024-04-01". Note that overriding this
- default value may result in unsupported behavior.
+ :keyword api_version: Api Version. Default value is "2025-02-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", "2024-04-01")
+ api_version: str = kwargs.pop("api_version", "2025-02-01-preview")
if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/__init__.py
index 0cfd35e48b6b..a9e1954d637a 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/__init__.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/__init__.py
@@ -5,29 +5,38 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._arc_settings_operations import ArcSettingsOperations
-from ._clusters_operations import ClustersOperations
-from ._deployment_settings_operations import DeploymentSettingsOperations
-from ._edge_devices_operations import EdgeDevicesOperations
-from ._extensions_operations import ExtensionsOperations
-from ._offers_operations import OffersOperations
-from ._operations import Operations
-from ._publishers_operations import PublishersOperations
-from ._security_settings_operations import SecuritySettingsOperations
-from ._skus_operations import SkusOperations
-from ._update_runs_operations import UpdateRunsOperations
-from ._update_summaries_operations import UpdateSummariesOperations
-from ._updates_operations import UpdatesOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._arc_settings_operations import ArcSettingsOperations # type: ignore
+from ._clusters_operations import ClustersOperations # type: ignore
+from ._deployment_settings_operations import DeploymentSettingsOperations # type: ignore
+from ._edge_device_jobs_operations import EdgeDeviceJobsOperations # type: ignore
+from ._edge_devices_operations import EdgeDevicesOperations # type: ignore
+from ._extensions_operations import ExtensionsOperations # type: ignore
+from ._offers_operations import OffersOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._publishers_operations import PublishersOperations # type: ignore
+from ._security_settings_operations import SecuritySettingsOperations # type: ignore
+from ._skus_operations import SkusOperations # type: ignore
+from ._update_runs_operations import UpdateRunsOperations # type: ignore
+from ._updates_operations import UpdatesOperations # type: ignore
+from ._update_summaries_operations import UpdateSummariesOperations # type: ignore
+from ._validated_solution_recipes_operations import ValidatedSolutionRecipesOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ArcSettingsOperations",
"ClustersOperations",
"DeploymentSettingsOperations",
+ "EdgeDeviceJobsOperations",
"EdgeDevicesOperations",
"ExtensionsOperations",
"OffersOperations",
@@ -36,8 +45,9 @@
"SecuritySettingsOperations",
"SkusOperations",
"UpdateRunsOperations",
- "UpdateSummariesOperations",
"UpdatesOperations",
+ "UpdateSummariesOperations",
+ "ValidatedSolutionRecipesOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_arc_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_arc_settings_operations.py
index b866e388c4aa..eaf621e85c2b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_arc_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_arc_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -47,7 +46,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -92,7 +91,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ArcSettingList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -173,7 +172,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -307,7 +306,7 @@ async def create(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -451,7 +450,7 @@ async def update(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -510,7 +509,7 @@ async def update(
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -639,7 +638,7 @@ async def generate_password(
:rtype: ~azure.mgmt.azurestackhci.models.PasswordCredential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -686,7 +685,7 @@ async def generate_password(
async def _create_identity_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -821,7 +820,7 @@ async def consent_and_install_default_extensions(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -868,7 +867,7 @@ async def consent_and_install_default_extensions(
async def _initialize_disable_process_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py
index 15676f3d4572..88f516a6e029 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_clusters_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,13 +43,14 @@
build_list_by_subscription_request,
build_trigger_log_collection_request,
build_update_request,
+ build_update_secrets_locations_request,
build_upload_certificate_request,
)
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -87,7 +88,7 @@ def list_by_subscription(self, **kwargs: Any) -> AsyncIterable["_models.Cluster"
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ClusterList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -165,7 +166,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Asy
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ClusterList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -240,7 +241,7 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -355,7 +356,7 @@ async def create(
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -486,7 +487,7 @@ async def update(
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -542,7 +543,7 @@ async def update(
return deserialized # type: ignore
async def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -643,6 +644,206 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
)
return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ async def _update_secrets_locations_initial(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: Union[_models.SecretsLocationsChangeRequest, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _json = self._serialize.body(body, "SecretsLocationsChangeRequest")
+
+ _request = build_update_secrets_locations_request(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ 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, 202]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: _models.SecretsLocationsChangeRequest,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Required.
+ :type body: ~azure.mgmt.azurestackhci.models.SecretsLocationsChangeRequest
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either Cluster or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Required.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either Cluster or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: Union[_models.SecretsLocationsChangeRequest, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Is either a SecretsLocationsChangeRequest type
+ or a IO[bytes] type. Required.
+ :type body: ~azure.mgmt.azurestackhci.models.SecretsLocationsChangeRequest or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either Cluster or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Cluster] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._update_secrets_locations_initial(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ body=body,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("Cluster", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.Cluster].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.Cluster](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
async def _upload_certificate_initial(
self,
resource_group_name: str,
@@ -650,7 +851,7 @@ async def _upload_certificate_initial(
upload_certificate_request: Union[_models.UploadCertificateRequest, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -836,7 +1037,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
async def _create_identity_initial(
self, resource_group_name: str, cluster_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -955,7 +1156,7 @@ async def _extend_software_assurance_benefit_initial( # pylint: disable=name-to
software_assurance_change_request: Union[_models.SoftwareAssuranceChangeRequest, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1152,7 +1353,7 @@ async def _trigger_log_collection_initial(
log_collection_request: Union[_models.LogCollectionRequest, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1352,7 +1553,7 @@ async def _configure_remote_support_initial(
remote_support_request: Union[_models.RemoteSupportRequest, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_deployment_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_deployment_settings_operations.py
index e833fe03fcc5..9daac3b04607 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_deployment_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_deployment_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -88,7 +87,7 @@ def list_by_clusters(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentSettingListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +167,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.DeploymentSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -220,7 +219,7 @@ async def _create_or_update_initial(
deployment_settings_name: str = "default",
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -427,7 +426,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, deployment_settings_name: str = "default", **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_device_jobs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_device_jobs_operations.py
new file mode 100644
index 000000000000..0c5dd47f503a
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_device_jobs_operations.py
@@ -0,0 +1,539 @@
+# 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 io import IOBase
+import sys
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
+import urllib.parse
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+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 azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
+
+from ... import models as _models
+from ...operations._edge_device_jobs_operations import (
+ build_create_or_update_request,
+ build_delete_request,
+ build_get_request,
+ build_list_by_edge_device_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class EdgeDeviceJobsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.azurestackhci.aio.AzureStackHCIClient`'s
+ :attr:`edge_device_jobs` 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
+ def list_by_edge_device(
+ self, resource_uri: str, edge_device_name: str, **kwargs: Any
+ ) -> AsyncIterable["_models.EdgeDeviceJob"]:
+ """List EdgeDeviceJob resources by EdgeDevice.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :return: An iterator like instance of either EdgeDeviceJob or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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.EdgeDeviceJobListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_edge_device_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("EdgeDeviceJobListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ @distributed_trace_async
+ async def get(
+ self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any
+ ) -> _models.EdgeDeviceJob:
+ """Get a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :return: EdgeDeviceJob or the result of cls(response)
+ :rtype: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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.EdgeDeviceJob] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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("EdgeDeviceJob", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ async def _create_or_update_initial(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: Union[_models.EdgeDeviceJob, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(resource, (IOBase, bytes)):
+ _content = resource
+ else:
+ _json = self._serialize.body(resource, "EdgeDeviceJob")
+
+ _request = build_create_or_update_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ 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, 201]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: _models.EdgeDeviceJob,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Required.
+ :type resource: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ async def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Required.
+ :type resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of AsyncLROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace_async
+ async def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: Union[_models.EdgeDeviceJob, IO[bytes]],
+ **kwargs: Any
+ ) -> AsyncLROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Is either a EdgeDeviceJob type or a IO[bytes]
+ type. Required.
+ :type resource: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob or IO[bytes]
+ :return: An instance of AsyncLROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EdgeDeviceJob] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._create_or_update_initial(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ resource=resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EdgeDeviceJob", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod,
+ AsyncARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs),
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[_models.EdgeDeviceJob].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[_models.EdgeDeviceJob](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ async def _delete_initial(
+ self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any
+ ) -> AsyncIterator[bytes]:
+ error_map: MutableMapping = {
+ 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[AsyncIterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ 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 [202, 204]:
+ try:
+ await response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace_async
+ async def begin_delete(
+ self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any
+ ) -> AsyncLROPoller[None]:
+ """Delete a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :return: An instance of AsyncLROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.AsyncLROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[None] = kwargs.pop("cls", None)
+ polling: Union[bool, AsyncPollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = await self._delete_initial(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ await raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: AsyncPollingMethod = cast(
+ AsyncPollingMethod, AsyncARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(AsyncPollingMethod, AsyncNoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return AsyncLROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return AsyncLROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_devices_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_devices_operations.py
index 90afd36b683a..b256bb8c1a84 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_devices_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_edge_devices_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -84,7 +83,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> AsyncIterable["_models.EdgeD
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.EdgeDeviceListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -158,7 +157,7 @@ async def get(self, resource_uri: str, edge_device_name: str = "default", **kwar
:rtype: ~azure.mgmt.azurestackhci.models.EdgeDevice
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -207,7 +206,7 @@ async def _create_or_update_initial(
edge_device_name: str = "default",
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -402,7 +401,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_uri: str, edge_device_name: str = "default", **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -518,7 +517,7 @@ async def _validate_initial(
edge_device_name: str = "default",
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_extensions_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_extensions_operations.py
index 079c6a6938b5..c521abfe4699 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_extensions_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_extensions_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -44,7 +44,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -92,7 +92,7 @@ def list_by_arc_setting(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ExtensionList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -176,7 +176,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.Extension
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -230,7 +230,7 @@ async def _create_initial(
extension: Union[_models.Extension, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -453,7 +453,7 @@ async def _update_initial(
extension: Union[_models.ExtensionPatch, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -670,7 +670,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, extension_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -794,7 +794,7 @@ async def _upgrade_initial(
extension_upgrade_parameters: Union[_models.ExtensionUpgradeParameters, IO[bytes]],
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_offers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_offers_operations.py
index 3c1d6a1da3ed..cfe721e3e49e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_offers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_offers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -91,7 +90,7 @@ def list_by_publisher(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OfferList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -180,7 +179,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OfferList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -272,7 +271,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.Offer
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py
index 2ea57019c0d3..5e48fb9b329b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,8 +6,10 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
+from azure.core.async_paging import AsyncItemPaged, AsyncList
from azure.core.exceptions import (
ClientAuthenticationError,
HttpResponseError,
@@ -19,7 +20,7 @@
)
from azure.core.pipeline import PipelineResponse
from azure.core.rest import AsyncHttpResponse, HttpRequest
-from azure.core.tracing.decorator_async import distributed_trace_async
+from azure.core.tracing.decorator import distributed_trace
from azure.core.utils import case_insensitive_dict
from azure.mgmt.core.exceptions import ARMErrorFormat
@@ -29,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -53,50 +54,76 @@ def __init__(self, *args, **kwargs) -> None:
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 list(self, **kwargs: Any) -> _models.OperationListResult:
- """List all available Microsoft.AzureStackHCI provider operations.
+ @distributed_trace
+ def list(self, **kwargs: Any) -> AsyncIterable["_models.Operation"]:
+ """List the operations for the provider.
- :return: OperationListResult or the result of cls(response)
- :rtype: ~azure.mgmt.azurestackhci.models.OperationListResult
+ :return: An iterator like instance of either Operation or the result of cls(response)
+ :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestackhci.models.Operation]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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.OperationListResult] = kwargs.pop("cls", None)
- _request = build_list_request(
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _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("OperationListResult", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- return deserialized # type: ignore
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("OperationListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_publishers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_publishers_operations.py
index 01acb51d017f..0a1f90f4c402 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_publishers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_publishers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -32,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -77,7 +76,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PublisherList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -157,7 +156,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.Publisher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_security_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_security_settings_operations.py
index 357ed26012ab..ee86c2984757 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_security_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_security_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -88,7 +87,7 @@ def list_by_clusters(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SecuritySettingListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -168,7 +167,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.SecuritySetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -220,7 +219,7 @@ async def _create_or_update_initial(
security_settings_name: str = "default",
**kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -427,7 +426,7 @@ def get_long_running_output(pipeline_response):
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, security_settings_name: str = "default", **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_skus_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_skus_operations.py
index 1128099c6cdb..a1f1df934988 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_skus_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_skus_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, AsyncIterable, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -32,7 +31,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -90,7 +89,7 @@ def list_by_offer(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SkuList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -187,7 +186,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.Sku
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_runs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_runs_operations.py
index ba520d13901f..7fb5c841e039 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_runs_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -89,7 +88,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateRunList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -156,7 +155,7 @@ async def get_next(next_link=None):
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, update_run_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -370,7 +369,7 @@ async def put(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -446,7 +445,7 @@ async def get(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_summaries_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_summaries_operations.py
index 9d60e2f18315..d1e68c713384 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_summaries_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_update_summaries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -42,7 +41,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -88,7 +87,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateSummariesList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -152,7 +151,7 @@ async def get_next(next_link=None):
return AsyncItemPaged(get_next, extract_data)
async def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -338,7 +337,7 @@ async def put(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateSummaries
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -406,7 +405,7 @@ async def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any)
:rtype: ~azure.mgmt.azurestackhci.models.UpdateSummaries
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_updates_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_updates_operations.py
index c5274eb896d0..e914ff7c1ee5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_updates_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_updates_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, AsyncIterable, AsyncIterator, Callable, Dict, IO, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.async_paging import AsyncItemPaged, AsyncList
@@ -43,7 +42,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -70,7 +69,7 @@ def __init__(self, *args, **kwargs) -> None:
async def _post_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -205,7 +204,7 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> As
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -271,7 +270,7 @@ async def get_next(next_link=None):
async def _delete_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, **kwargs: Any
) -> AsyncIterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -472,7 +471,7 @@ async def put(
:rtype: ~azure.mgmt.azurestackhci.models.Update
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -543,7 +542,7 @@ async def get(self, resource_group_name: str, cluster_name: str, update_name: st
:rtype: ~azure.mgmt.azurestackhci.models.Update
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_validated_solution_recipes_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_validated_solution_recipes_operations.py
new file mode 100644
index 000000000000..2dc06b3cc1ce
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/aio/operations/_validated_solution_recipes_operations.py
@@ -0,0 +1,198 @@
+# 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.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar
+import urllib.parse
+
+from azure.core.async_paging import AsyncItemPaged, AsyncList
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import AsyncHttpResponse, HttpRequest
+from azure.core.tracing.decorator import distributed_trace
+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 ...operations._validated_solution_recipes_operations import (
+ build_get_request,
+ build_list_by_subscription_location_resource_request,
+)
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
+
+
+class ValidatedSolutionRecipesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.azurestackhci.aio.AzureStackHCIClient`'s
+ :attr:`validated_solution_recipes` 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
+ def list_by_subscription_location_resource(
+ self, location: str, **kwargs: Any
+ ) -> AsyncIterable["_models.ValidatedSolutionRecipe"]:
+ """List all validated solution recipes.
+
+ :param location: The name of the Azure region. Required.
+ :type location: str
+ :return: An iterator like instance of either ValidatedSolutionRecipe or the result of
+ cls(response)
+ :rtype:
+ ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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.ValidatedSolutionRecipeListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_subscription_location_resource_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ async def extract_data(pipeline_response):
+ deserialized = self._deserialize("ValidatedSolutionRecipeListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, AsyncList(list_of_elem)
+
+ async def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _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)
+
+ return pipeline_response
+
+ return AsyncItemPaged(get_next, extract_data)
+
+ @distributed_trace_async
+ async def get(
+ self, location: str, validated_solution_recipe_name: str, **kwargs: Any
+ ) -> _models.ValidatedSolutionRecipe:
+ """Get a validated solution recipe.
+
+ :param location: The name of the Azure region. Required.
+ :type location: str
+ :param validated_solution_recipe_name: The name of the ValidatedSolutionRecipe. Required.
+ :type validated_solution_recipe_name: str
+ :return: ValidatedSolutionRecipe or the result of cls(response)
+ :rtype: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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.ValidatedSolutionRecipe] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ location=location,
+ validated_solution_recipe_name=validated_solution_recipe_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _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("ValidatedSolutionRecipe", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py
index c9830331dc2e..ce1715a9097f 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/__init__.py
@@ -5,178 +5,232 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._models_py3 import ArcConnectivityProperties
-from ._models_py3 import ArcIdentityResponse
-from ._models_py3 import ArcSetting
-from ._models_py3 import ArcSettingList
-from ._models_py3 import ArcSettingsPatch
-from ._models_py3 import Cluster
-from ._models_py3 import ClusterDesiredProperties
-from ._models_py3 import ClusterIdentityResponse
-from ._models_py3 import ClusterList
-from ._models_py3 import ClusterNode
-from ._models_py3 import ClusterPatch
-from ._models_py3 import ClusterReportedProperties
-from ._models_py3 import DefaultExtensionDetails
-from ._models_py3 import DeploymentCluster
-from ._models_py3 import DeploymentConfiguration
-from ._models_py3 import DeploymentData
-from ._models_py3 import DeploymentSecuritySettings
-from ._models_py3 import DeploymentSetting
-from ._models_py3 import DeploymentSettingAdapterPropertyOverrides
-from ._models_py3 import DeploymentSettingHostNetwork
-from ._models_py3 import DeploymentSettingIntents
-from ._models_py3 import DeploymentSettingListResult
-from ._models_py3 import DeploymentSettingStorageAdapterIPInfo
-from ._models_py3 import DeploymentSettingStorageNetworks
-from ._models_py3 import DeploymentSettingVirtualSwitchConfigurationOverrides
-from ._models_py3 import DeploymentStep
-from ._models_py3 import DeviceConfiguration
-from ._models_py3 import EceActionStatus
-from ._models_py3 import EceDeploymentSecrets
-from ._models_py3 import EceReportedProperties
-from ._models_py3 import EdgeDevice
-from ._models_py3 import EdgeDeviceListResult
-from ._models_py3 import EdgeDeviceProperties
-from ._models_py3 import ErrorAdditionalInfo
-from ._models_py3 import ErrorDetail
-from ._models_py3 import ErrorResponse
-from ._models_py3 import Extension
-from ._models_py3 import ExtensionInstanceView
-from ._models_py3 import ExtensionInstanceViewStatus
-from ._models_py3 import ExtensionList
-from ._models_py3 import ExtensionPatch
-from ._models_py3 import ExtensionPatchParameters
-from ._models_py3 import ExtensionProfile
-from ._models_py3 import ExtensionUpgradeParameters
-from ._models_py3 import HciEdgeDevice
-from ._models_py3 import HciEdgeDeviceAdapterPropertyOverrides
-from ._models_py3 import HciEdgeDeviceArcExtension
-from ._models_py3 import HciEdgeDeviceHostNetwork
-from ._models_py3 import HciEdgeDeviceIntents
-from ._models_py3 import HciEdgeDeviceProperties
-from ._models_py3 import HciEdgeDeviceStorageAdapterIPInfo
-from ._models_py3 import HciEdgeDeviceStorageNetworks
-from ._models_py3 import HciEdgeDeviceVirtualSwitchConfigurationOverrides
-from ._models_py3 import HciNetworkProfile
-from ._models_py3 import HciNicDetail
-from ._models_py3 import HciOsProfile
-from ._models_py3 import HciReportedProperties
-from ._models_py3 import HciValidationFailureDetail
-from ._models_py3 import InfrastructureNetwork
-from ._models_py3 import IpPools
-from ._models_py3 import IsolatedVmAttestationConfiguration
-from ._models_py3 import LogCollectionError
-from ._models_py3 import LogCollectionProperties
-from ._models_py3 import LogCollectionRequest
-from ._models_py3 import LogCollectionRequestProperties
-from ._models_py3 import LogCollectionSession
-from ._models_py3 import NetworkController
-from ._models_py3 import NicDetail
-from ._models_py3 import Observability
-from ._models_py3 import Offer
-from ._models_py3 import OfferList
-from ._models_py3 import Operation
-from ._models_py3 import OperationDisplay
-from ._models_py3 import OperationListResult
-from ._models_py3 import OptionalServices
-from ._models_py3 import PackageVersionInfo
-from ._models_py3 import PasswordCredential
-from ._models_py3 import PerNodeExtensionState
-from ._models_py3 import PerNodeRemoteSupportSession
-from ._models_py3 import PerNodeState
-from ._models_py3 import PhysicalNodes
-from ._models_py3 import PrecheckResult
-from ._models_py3 import PrecheckResultTags
-from ._models_py3 import ProxyResource
-from ._models_py3 import Publisher
-from ._models_py3 import PublisherList
-from ._models_py3 import QosPolicyOverrides
-from ._models_py3 import RawCertificateData
-from ._models_py3 import RemoteSupportNodeSettings
-from ._models_py3 import RemoteSupportProperties
-from ._models_py3 import RemoteSupportRequest
-from ._models_py3 import RemoteSupportRequestProperties
-from ._models_py3 import ReportedProperties
-from ._models_py3 import Resource
-from ._models_py3 import SbeCredentials
-from ._models_py3 import SbeDeploymentInfo
-from ._models_py3 import SbeDeploymentPackageInfo
-from ._models_py3 import SbePartnerInfo
-from ._models_py3 import SbePartnerProperties
-from ._models_py3 import ScaleUnits
-from ._models_py3 import SdnIntegration
-from ._models_py3 import SecurityComplianceStatus
-from ._models_py3 import SecuritySetting
-from ._models_py3 import SecuritySettingListResult
-from ._models_py3 import ServiceConfiguration
-from ._models_py3 import Sku
-from ._models_py3 import SkuList
-from ._models_py3 import SkuMappings
-from ._models_py3 import SoftwareAssuranceChangeRequest
-from ._models_py3 import SoftwareAssuranceChangeRequestProperties
-from ._models_py3 import SoftwareAssuranceProperties
-from ._models_py3 import Step
-from ._models_py3 import Storage
-from ._models_py3 import SwitchDetail
-from ._models_py3 import SwitchExtension
-from ._models_py3 import SystemData
-from ._models_py3 import TrackedResource
-from ._models_py3 import Update
-from ._models_py3 import UpdateList
-from ._models_py3 import UpdatePrerequisite
-from ._models_py3 import UpdateRun
-from ._models_py3 import UpdateRunList
-from ._models_py3 import UpdateSummaries
-from ._models_py3 import UpdateSummariesList
-from ._models_py3 import UploadCertificateRequest
-from ._models_py3 import UserAssignedIdentity
-from ._models_py3 import ValidateRequest
-from ._models_py3 import ValidateResponse
+from typing import TYPE_CHECKING
-from ._azure_stack_hci_client_enums import AccessLevel
-from ._azure_stack_hci_client_enums import ActionType
-from ._azure_stack_hci_client_enums import ArcExtensionState
-from ._azure_stack_hci_client_enums import ArcSettingAggregateState
-from ._azure_stack_hci_client_enums import AvailabilityType
-from ._azure_stack_hci_client_enums import ClusterNodeType
-from ._azure_stack_hci_client_enums import ComplianceAssignmentType
-from ._azure_stack_hci_client_enums import ComplianceStatus
-from ._azure_stack_hci_client_enums import ConnectivityStatus
-from ._azure_stack_hci_client_enums import CreatedByType
-from ._azure_stack_hci_client_enums import DeploymentMode
-from ._azure_stack_hci_client_enums import DeviceKind
-from ._azure_stack_hci_client_enums import DeviceState
-from ._azure_stack_hci_client_enums import DiagnosticLevel
-from ._azure_stack_hci_client_enums import EceSecrets
-from ._azure_stack_hci_client_enums import ExtensionAggregateState
-from ._azure_stack_hci_client_enums import ExtensionManagedBy
-from ._azure_stack_hci_client_enums import HealthState
-from ._azure_stack_hci_client_enums import ImdsAttestation
-from ._azure_stack_hci_client_enums import LogCollectionJobType
-from ._azure_stack_hci_client_enums import LogCollectionStatus
-from ._azure_stack_hci_client_enums import ManagedServiceIdentityType
-from ._azure_stack_hci_client_enums import NodeArcState
-from ._azure_stack_hci_client_enums import NodeExtensionState
-from ._azure_stack_hci_client_enums import OemActivation
-from ._azure_stack_hci_client_enums import OperationType
-from ._azure_stack_hci_client_enums import Origin
-from ._azure_stack_hci_client_enums import ProvisioningState
-from ._azure_stack_hci_client_enums import RebootRequirement
-from ._azure_stack_hci_client_enums import RemoteSupportType
-from ._azure_stack_hci_client_enums import ServiceName
-from ._azure_stack_hci_client_enums import Severity
-from ._azure_stack_hci_client_enums import SoftwareAssuranceIntent
-from ._azure_stack_hci_client_enums import SoftwareAssuranceStatus
-from ._azure_stack_hci_client_enums import State
-from ._azure_stack_hci_client_enums import Status
-from ._azure_stack_hci_client_enums import StatusLevelTypes
-from ._azure_stack_hci_client_enums import UpdateRunPropertiesState
-from ._azure_stack_hci_client_enums import UpdateSummariesPropertiesState
-from ._azure_stack_hci_client_enums import WindowsServerSubscription
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+
+from ._models_py3 import ( # type: ignore
+ ArcConnectivityProperties,
+ ArcIdentityResponse,
+ ArcSetting,
+ ArcSettingList,
+ ArcSettingsPatch,
+ AssemblyInfo,
+ AssemblyInfoPayload,
+ Cluster,
+ ClusterDesiredProperties,
+ ClusterIdentityResponse,
+ ClusterList,
+ ClusterNode,
+ ClusterPatch,
+ ClusterReportedProperties,
+ CollectLogJobProperties,
+ DefaultExtensionDetails,
+ DeploymentCluster,
+ DeploymentConfiguration,
+ DeploymentData,
+ DeploymentSecuritySettings,
+ DeploymentSetting,
+ DeploymentSettingAdapterPropertyOverrides,
+ DeploymentSettingHostNetwork,
+ DeploymentSettingIntents,
+ DeploymentSettingListResult,
+ DeploymentSettingStorageAdapterIPInfo,
+ DeploymentSettingStorageNetworks,
+ DeploymentSettingVirtualSwitchConfigurationOverrides,
+ DeploymentStep,
+ DeviceConfiguration,
+ EceActionStatus,
+ EceDeploymentSecrets,
+ EceReportedProperties,
+ EdgeDevice,
+ EdgeDeviceJob,
+ EdgeDeviceJobListResult,
+ EdgeDeviceJobProperties,
+ EdgeDeviceListResult,
+ EdgeDeviceProperties,
+ ErrorAdditionalInfo,
+ ErrorDetail,
+ ErrorResponse,
+ Extension,
+ ExtensionInstanceView,
+ ExtensionInstanceViewStatus,
+ ExtensionList,
+ ExtensionPatch,
+ ExtensionPatchParameters,
+ ExtensionProfile,
+ ExtensionUpgradeParameters,
+ HciCollectLogJobProperties,
+ HciEdgeDevice,
+ HciEdgeDeviceAdapterPropertyOverrides,
+ HciEdgeDeviceArcExtension,
+ HciEdgeDeviceHostNetwork,
+ HciEdgeDeviceIntents,
+ HciEdgeDeviceJob,
+ HciEdgeDeviceJobProperties,
+ HciEdgeDeviceProperties,
+ HciEdgeDeviceStorageAdapterIPInfo,
+ HciEdgeDeviceStorageNetworks,
+ HciEdgeDeviceVirtualSwitchConfigurationOverrides,
+ HciHardwareProfile,
+ HciNetworkProfile,
+ HciNicDetail,
+ HciOsProfile,
+ HciRemoteSupportJobProperties,
+ HciReportedProperties,
+ HciStorageProfile,
+ HciValidationFailureDetail,
+ InfrastructureNetwork,
+ IpPools,
+ IsolatedVmAttestationConfiguration,
+ JobReportedProperties,
+ LocalAvailabilityZones,
+ LogCollectionError,
+ LogCollectionJobSession,
+ LogCollectionProperties,
+ LogCollectionReportedProperties,
+ LogCollectionRequest,
+ LogCollectionRequestProperties,
+ LogCollectionSession,
+ NetworkController,
+ NicDetail,
+ Observability,
+ Offer,
+ OfferList,
+ Operation,
+ OperationDisplay,
+ OperationListResult,
+ OptionalServices,
+ PackageVersionInfo,
+ PasswordCredential,
+ PerNodeExtensionState,
+ PerNodeRemoteSupportSession,
+ PerNodeState,
+ PhysicalNodes,
+ PrecheckResult,
+ PrecheckResultTags,
+ ProxyResource,
+ Publisher,
+ PublisherList,
+ QosPolicyOverrides,
+ RawCertificateData,
+ RemoteSupportJobNodeSettings,
+ RemoteSupportJobProperties,
+ RemoteSupportJobReportedProperties,
+ RemoteSupportNodeSettings,
+ RemoteSupportProperties,
+ RemoteSupportRequest,
+ RemoteSupportRequestProperties,
+ RemoteSupportSession,
+ ReportedProperties,
+ Resource,
+ SbeCredentials,
+ SbeDeploymentInfo,
+ SbeDeploymentPackageInfo,
+ SbePartnerInfo,
+ SbePartnerProperties,
+ ScaleUnits,
+ SdnIntegration,
+ SecretsLocationDetails,
+ SecretsLocationsChangeRequest,
+ SecurityComplianceStatus,
+ SecuritySetting,
+ SecuritySettingListResult,
+ ServiceConfiguration,
+ Sku,
+ SkuList,
+ SkuMappings,
+ SoftwareAssuranceChangeRequest,
+ SoftwareAssuranceChangeRequestProperties,
+ SoftwareAssuranceProperties,
+ Step,
+ Storage,
+ SwitchDetail,
+ SwitchExtension,
+ SystemData,
+ TrackedResource,
+ Update,
+ UpdateList,
+ UpdatePrerequisite,
+ UpdateRun,
+ UpdateRunList,
+ UpdateSummaries,
+ UpdateSummariesList,
+ UploadCertificateRequest,
+ UserAssignedIdentity,
+ ValidateRequest,
+ ValidateResponse,
+ ValidatedSolutionRecipe,
+ ValidatedSolutionRecipeCapabilities,
+ ValidatedSolutionRecipeCapability,
+ ValidatedSolutionRecipeComponent,
+ ValidatedSolutionRecipeComponentMetadata,
+ ValidatedSolutionRecipeComponentPayload,
+ ValidatedSolutionRecipeContent,
+ ValidatedSolutionRecipeInfo,
+ ValidatedSolutionRecipeListResult,
+ ValidatedSolutionRecipeProperties,
+)
+
+from ._azure_stack_hci_client_enums import ( # type: ignore
+ AccessLevel,
+ ActionType,
+ ArcExtensionState,
+ ArcSettingAggregateState,
+ AvailabilityType,
+ ClusterNodeType,
+ ClusterPattern,
+ ComplianceAssignmentType,
+ ComplianceStatus,
+ ConnectivityStatus,
+ CreatedByType,
+ DeploymentMode,
+ DeviceKind,
+ DeviceLogCollectionStatus,
+ DeviceState,
+ DiagnosticLevel,
+ EceSecrets,
+ EdgeDeviceJobType,
+ EdgeDeviceKind,
+ EdgeSolutionType,
+ ExtensionAggregateState,
+ ExtensionManagedBy,
+ HardwareClass,
+ HciEdgeDeviceJobType,
+ HealthState,
+ ImdsAttestation,
+ JobStatus,
+ LogCollectionJobType,
+ LogCollectionStatus,
+ ManagedServiceIdentityType,
+ NodeArcState,
+ NodeExtensionState,
+ OemActivation,
+ OperationType,
+ Origin,
+ ProvisioningState,
+ RdmaCapability,
+ RebootRequirement,
+ RemoteSupportAccessLevel,
+ RemoteSupportType,
+ SecretsType,
+ ServiceName,
+ Severity,
+ SoftwareAssuranceIntent,
+ SoftwareAssuranceStatus,
+ State,
+ Status,
+ StatusLevelTypes,
+ UpdateRunPropertiesState,
+ UpdateSummariesPropertiesState,
+ WindowsServerSubscription,
+)
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
@@ -185,6 +239,8 @@
"ArcSetting",
"ArcSettingList",
"ArcSettingsPatch",
+ "AssemblyInfo",
+ "AssemblyInfoPayload",
"Cluster",
"ClusterDesiredProperties",
"ClusterIdentityResponse",
@@ -192,6 +248,7 @@
"ClusterNode",
"ClusterPatch",
"ClusterReportedProperties",
+ "CollectLogJobProperties",
"DefaultExtensionDetails",
"DeploymentCluster",
"DeploymentConfiguration",
@@ -211,6 +268,9 @@
"EceDeploymentSecrets",
"EceReportedProperties",
"EdgeDevice",
+ "EdgeDeviceJob",
+ "EdgeDeviceJobListResult",
+ "EdgeDeviceJobProperties",
"EdgeDeviceListResult",
"EdgeDeviceProperties",
"ErrorAdditionalInfo",
@@ -224,25 +284,35 @@
"ExtensionPatchParameters",
"ExtensionProfile",
"ExtensionUpgradeParameters",
+ "HciCollectLogJobProperties",
"HciEdgeDevice",
"HciEdgeDeviceAdapterPropertyOverrides",
"HciEdgeDeviceArcExtension",
"HciEdgeDeviceHostNetwork",
"HciEdgeDeviceIntents",
+ "HciEdgeDeviceJob",
+ "HciEdgeDeviceJobProperties",
"HciEdgeDeviceProperties",
"HciEdgeDeviceStorageAdapterIPInfo",
"HciEdgeDeviceStorageNetworks",
"HciEdgeDeviceVirtualSwitchConfigurationOverrides",
+ "HciHardwareProfile",
"HciNetworkProfile",
"HciNicDetail",
"HciOsProfile",
+ "HciRemoteSupportJobProperties",
"HciReportedProperties",
+ "HciStorageProfile",
"HciValidationFailureDetail",
"InfrastructureNetwork",
"IpPools",
"IsolatedVmAttestationConfiguration",
+ "JobReportedProperties",
+ "LocalAvailabilityZones",
"LogCollectionError",
+ "LogCollectionJobSession",
"LogCollectionProperties",
+ "LogCollectionReportedProperties",
"LogCollectionRequest",
"LogCollectionRequestProperties",
"LogCollectionSession",
@@ -268,10 +338,14 @@
"PublisherList",
"QosPolicyOverrides",
"RawCertificateData",
+ "RemoteSupportJobNodeSettings",
+ "RemoteSupportJobProperties",
+ "RemoteSupportJobReportedProperties",
"RemoteSupportNodeSettings",
"RemoteSupportProperties",
"RemoteSupportRequest",
"RemoteSupportRequestProperties",
+ "RemoteSupportSession",
"ReportedProperties",
"Resource",
"SbeCredentials",
@@ -281,6 +355,8 @@
"SbePartnerProperties",
"ScaleUnits",
"SdnIntegration",
+ "SecretsLocationDetails",
+ "SecretsLocationsChangeRequest",
"SecurityComplianceStatus",
"SecuritySetting",
"SecuritySettingListResult",
@@ -308,25 +384,43 @@
"UserAssignedIdentity",
"ValidateRequest",
"ValidateResponse",
+ "ValidatedSolutionRecipe",
+ "ValidatedSolutionRecipeCapabilities",
+ "ValidatedSolutionRecipeCapability",
+ "ValidatedSolutionRecipeComponent",
+ "ValidatedSolutionRecipeComponentMetadata",
+ "ValidatedSolutionRecipeComponentPayload",
+ "ValidatedSolutionRecipeContent",
+ "ValidatedSolutionRecipeInfo",
+ "ValidatedSolutionRecipeListResult",
+ "ValidatedSolutionRecipeProperties",
"AccessLevel",
"ActionType",
"ArcExtensionState",
"ArcSettingAggregateState",
"AvailabilityType",
"ClusterNodeType",
+ "ClusterPattern",
"ComplianceAssignmentType",
"ComplianceStatus",
"ConnectivityStatus",
"CreatedByType",
"DeploymentMode",
"DeviceKind",
+ "DeviceLogCollectionStatus",
"DeviceState",
"DiagnosticLevel",
"EceSecrets",
+ "EdgeDeviceJobType",
+ "EdgeDeviceKind",
+ "EdgeSolutionType",
"ExtensionAggregateState",
"ExtensionManagedBy",
+ "HardwareClass",
+ "HciEdgeDeviceJobType",
"HealthState",
"ImdsAttestation",
+ "JobStatus",
"LogCollectionJobType",
"LogCollectionStatus",
"ManagedServiceIdentityType",
@@ -336,8 +430,11 @@
"OperationType",
"Origin",
"ProvisioningState",
+ "RdmaCapability",
"RebootRequirement",
+ "RemoteSupportAccessLevel",
"RemoteSupportType",
+ "SecretsType",
"ServiceName",
"Severity",
"SoftwareAssuranceIntent",
@@ -349,5 +446,5 @@
"UpdateSummariesPropertiesState",
"WindowsServerSubscription",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py
index bd5c50533c82..5d953f75be5b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_azure_stack_hci_client_enums.py
@@ -86,6 +86,15 @@ class ClusterNodeType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
THIRD_PARTY = "ThirdParty"
+class ClusterPattern(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Supported Storage Pattern for HCI Cluster."""
+
+ STANDARD = "Standard"
+ """Standard cluster."""
+ RACK_AWARE = "RackAware"
+ """RackAware cluster."""
+
+
class ComplianceAssignmentType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Represents the compliance assignment type of a resource."""
@@ -128,7 +137,7 @@ class CreatedByType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
class DeploymentMode(str, Enum, metaclass=CaseInsensitiveEnumMeta):
- """The deployment mode of EnterpriseCloudEngine(ECE) action for a cluster."""
+ """Deployment mode to trigger job."""
VALIDATE = "Validate"
"""Validate ECE action deployment for a cluster."""
@@ -143,6 +152,21 @@ class DeviceKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Arc-enabled edge device with HCI OS."""
+class DeviceLogCollectionStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Represents the status of a log collection operation."""
+
+ NOT_STARTED = "NotStarted"
+ """Log collection operation has not been initiated."""
+ RUNNING = "Running"
+ """Indicates that the log collection operation is currently running."""
+ FAILED = "Failed"
+ """Indicates that the log collection operation has failed."""
+ SUCCEEDED = "Succeeded"
+ """Indicates that the log collection operation has completed successfully."""
+ CANCELED = "Canceled"
+ """Indicates that the log collection operation has completed successfully."""
+
+
class DeviceState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""The edge device state."""
@@ -185,6 +209,29 @@ class EceSecrets(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""WitnessStorageKey used for setting up a cloud witness for AzureStackHCI cluster."""
+class EdgeDeviceJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Common Job Types supported."""
+
+ COLLECT_LOG = "CollectLog"
+ """Job to collect logs from the device."""
+ REMOTE_SUPPORT = "RemoteSupport"
+ """Job to provide remote support to the device."""
+
+
+class EdgeDeviceKind(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Edge device kind."""
+
+ HCI = "HCI"
+ """Arc-enabled edge device with HCI OS."""
+
+
+class EdgeSolutionType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Edge solution type."""
+
+ WINDOWS_SERVER = "WindowsServer"
+ """Edge solution for Windows based edge devices."""
+
+
class ExtensionAggregateState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Aggregate state of Arc Extensions across the nodes in this HCI cluster."""
@@ -215,6 +262,26 @@ class ExtensionManagedBy(str, Enum, metaclass=CaseInsensitiveEnumMeta):
AZURE = "Azure"
+class HardwareClass(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Hardware class of the cluster."""
+
+ SMALL = "Small"
+ """The hardware class is small."""
+ MEDIUM = "Medium"
+ """The hardware class is medium. This corresponds to the default"""
+ LARGE = "Large"
+ """The hardware class is large."""
+
+
+class HciEdgeDeviceJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Job Type supported."""
+
+ COLLECT_LOG = "CollectLog"
+ """Job to collect logs from the device."""
+ REMOTE_SUPPORT = "RemoteSupport"
+ """Job to provide remote support to the device."""
+
+
class HealthState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""HealthState."""
@@ -233,6 +300,35 @@ class ImdsAttestation(str, Enum, metaclass=CaseInsensitiveEnumMeta):
ENABLED = "Enabled"
+class JobStatus(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Represents the various statuses a job can have throughout its lifecycle."""
+
+ NOT_SPECIFIED = "NotSpecified"
+ """The job status has not been specified."""
+ VALIDATION_IN_PROGRESS = "ValidationInProgress"
+ """The job is currently undergoing validation."""
+ VALIDATION_SUCCESS = "ValidationSuccess"
+ """The job has successfully passed validation."""
+ VALIDATION_FAILED = "ValidationFailed"
+ """The job has failed validation."""
+ DEPLOYMENT_IN_PROGRESS = "DeploymentInProgress"
+ """The job's deployment is currently in progress."""
+ DEPLOYMENT_FAILED = "DeploymentFailed"
+ """The job's deployment has failed."""
+ DEPLOYMENT_SUCCESS = "DeploymentSuccess"
+ """The job has been successfully deployed."""
+ SUCCEEDED = "Succeeded"
+ """The job has succeeded."""
+ FAILED = "Failed"
+ """The job has failed."""
+ CANCELED = "Canceled"
+ """The job has been canceled."""
+ PAUSED = "Paused"
+ """The job is paused."""
+ SCHEDULED = "Scheduled"
+ """The job is scheduled to run."""
+
+
class LogCollectionJobType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""LogCollection job type."""
@@ -354,6 +450,15 @@ class ProvisioningState(str, Enum, metaclass=CaseInsensitiveEnumMeta):
DISABLE_IN_PROGRESS = "DisableInProgress"
+class RdmaCapability(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Describes the RDMA capability of the network adapter."""
+
+ ENABLED = "Enabled"
+ """Network Adapter on the device is RDMA Capable"""
+ DISABLED = "Disabled"
+ """Network Adapter on the device is RDMA Capable"""
+
+
class RebootRequirement(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""RebootRequirement."""
@@ -362,6 +467,17 @@ class RebootRequirement(str, Enum, metaclass=CaseInsensitiveEnumMeta):
FALSE = "False"
+class RemoteSupportAccessLevel(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Defines the level of remote support access granted."""
+
+ NONE = "None"
+ """No remote support access is granted."""
+ DIAGNOSTICS = "Diagnostics"
+ """Access is limited to diagnostics information only."""
+ DIAGNOSTICS_AND_REPAIR = "DiagnosticsAndRepair"
+ """Access includes diagnostics information and the ability to perform repairs."""
+
+
class RemoteSupportType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Remote Support Type for cluster."""
@@ -369,6 +485,13 @@ class RemoteSupportType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
REVOKE = "Revoke"
+class SecretsType(str, Enum, metaclass=CaseInsensitiveEnumMeta):
+ """Type of secrets to store."""
+
+ BACKUP_SECRETS = "BackupSecrets"
+ """Backup secrets type"""
+
+
class ServiceName(str, Enum, metaclass=CaseInsensitiveEnumMeta):
"""Name of the service."""
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py
index acc84c5de59c..2e9ced847ce4 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/models/_models_py3.py
@@ -1,5 +1,5 @@
-# coding=utf-8
# 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.
@@ -16,10 +16,9 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
if TYPE_CHECKING:
- # pylint: disable=unused-import,ungrouped-imports
from .. import models as _models
JSON = MutableMapping[str, Any] # pylint: disable=unsubscriptable-object
@@ -165,7 +164,7 @@ class ProxyResource(Resource):
"""
-class ArcSetting(ProxyResource): # pylint: disable=too-many-instance-attributes
+class ArcSetting(ProxyResource):
"""ArcSetting details.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -335,6 +334,74 @@ def __init__(
self.connectivity_properties = connectivity_properties
+class AssemblyInfo(_serialization.Model):
+ """Assembly Package details for Validated Solution Recipe for AzureStackHCI Cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar package_version: Assembly Package version for Validated Solution Recipe for AzureStackHCI
+ Cluster.
+ :vartype package_version: str
+ :ivar payload: Payload properties for Validated Solution Recipe for AzureStackHCI Cluster.
+ :vartype payload: list[~azure.mgmt.azurestackhci.models.AssemblyInfoPayload]
+ """
+
+ _validation = {
+ "package_version": {"readonly": True},
+ "payload": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "package_version": {"key": "packageVersion", "type": "str"},
+ "payload": {"key": "payload", "type": "[AssemblyInfoPayload]"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.package_version = None
+ self.payload = None
+
+
+class AssemblyInfoPayload(_serialization.Model):
+ """Payload properties for Validated Solution Recipe for AzureStackHCI Cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar identifier: assembly identifier for Validated Solution Recipe for AzureStackHCI Cluster.
+ :vartype identifier: str
+ :ivar hash: Hash of assembly package for Validated Solution Recipe for AzureStackHCI Cluster.
+ :vartype hash: str
+ :ivar file_name: File name of assembly package for Validated Solution Recipe for AzureStackHCI
+ Cluster.
+ :vartype file_name: str
+ :ivar url: Url of assembly package for Validated Solution Recipe for AzureStackHCI Cluster.
+ :vartype url: str
+ """
+
+ _validation = {
+ "identifier": {"readonly": True},
+ "hash": {"readonly": True},
+ "file_name": {"readonly": True},
+ "url": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "identifier": {"key": "identifier", "type": "str"},
+ "hash": {"key": "hash", "type": "str"},
+ "file_name": {"key": "fileName", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.identifier = None
+ self.hash = None
+ self.file_name = None
+ self.url = None
+
+
class TrackedResource(Resource):
"""The resource model definition for an Azure Resource Manager tracked top level resource which
has 'tags' and a 'location'.
@@ -389,7 +456,7 @@ def __init__(self, *, location: str, tags: Optional[Dict[str, str]] = None, **kw
self.location = location
-class Cluster(TrackedResource): # pylint: disable=too-many-instance-attributes
+class Cluster(TrackedResource):
"""Cluster details.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -466,6 +533,14 @@ class Cluster(TrackedResource): # pylint: disable=too-many-instance-attributes
:vartype service_endpoint: str
:ivar resource_provider_object_id: Object id of RP Service Principal.
:vartype resource_provider_object_id: str
+ :ivar secrets_locations: List of secret locations.
+ :vartype secrets_locations: list[~azure.mgmt.azurestackhci.models.SecretsLocationDetails]
+ :ivar cluster_pattern: Supported Storage Type for HCI Cluster. Known values are: "Standard" and
+ "RackAware".
+ :vartype cluster_pattern: str or ~azure.mgmt.azurestackhci.models.ClusterPattern
+ :ivar local_availability_zones: Local Availability Zone information for HCI cluster.
+ :vartype local_availability_zones:
+ list[~azure.mgmt.azurestackhci.models.LocalAvailabilityZones]
:ivar principal_id: The service principal ID of the system assigned identity. This property
will only be provided for a system assigned identity.
:vartype principal_id: str
@@ -503,6 +578,7 @@ class Cluster(TrackedResource): # pylint: disable=too-many-instance-attributes
"last_billing_timestamp": {"readonly": True},
"service_endpoint": {"readonly": True},
"resource_provider_object_id": {"readonly": True},
+ "cluster_pattern": {"readonly": True},
"principal_id": {"readonly": True},
"tenant_id": {"readonly": True},
}
@@ -542,6 +618,9 @@ class Cluster(TrackedResource): # pylint: disable=too-many-instance-attributes
"last_billing_timestamp": {"key": "properties.lastBillingTimestamp", "type": "iso-8601"},
"service_endpoint": {"key": "properties.serviceEndpoint", "type": "str"},
"resource_provider_object_id": {"key": "properties.resourceProviderObjectId", "type": "str"},
+ "secrets_locations": {"key": "properties.secretsLocations", "type": "[SecretsLocationDetails]"},
+ "cluster_pattern": {"key": "properties.clusterPattern", "type": "str"},
+ "local_availability_zones": {"key": "properties.localAvailabilityZones", "type": "[LocalAvailabilityZones]"},
"principal_id": {"key": "identity.principalId", "type": "str"},
"tenant_id": {"key": "identity.tenantId", "type": "str"},
"type_identity_type": {"key": "identity.type", "type": "str"},
@@ -562,6 +641,8 @@ def __init__( # pylint: disable=too-many-locals
log_collection_properties: Optional["_models.LogCollectionProperties"] = None,
remote_support_properties: Optional["_models.RemoteSupportProperties"] = None,
desired_properties: Optional["_models.ClusterDesiredProperties"] = None,
+ secrets_locations: Optional[List["_models.SecretsLocationDetails"]] = None,
+ local_availability_zones: Optional[List["_models.LocalAvailabilityZones"]] = None,
type_identity_type: Optional[Union[str, "_models.ManagedServiceIdentityType"]] = None,
user_assigned_identities: Optional[Dict[str, "_models.UserAssignedIdentity"]] = None,
**kwargs: Any
@@ -590,6 +671,11 @@ def __init__( # pylint: disable=too-many-locals
:paramtype remote_support_properties: ~azure.mgmt.azurestackhci.models.RemoteSupportProperties
:keyword desired_properties: Desired properties of the cluster.
:paramtype desired_properties: ~azure.mgmt.azurestackhci.models.ClusterDesiredProperties
+ :keyword secrets_locations: List of secret locations.
+ :paramtype secrets_locations: list[~azure.mgmt.azurestackhci.models.SecretsLocationDetails]
+ :keyword local_availability_zones: Local Availability Zone information for HCI cluster.
+ :paramtype local_availability_zones:
+ list[~azure.mgmt.azurestackhci.models.LocalAvailabilityZones]
:keyword type_identity_type: Type of managed service identity (where both SystemAssigned and
UserAssigned types are allowed). Known values are: "None", "SystemAssigned", "UserAssigned",
and "SystemAssigned, UserAssigned".
@@ -625,6 +711,9 @@ def __init__( # pylint: disable=too-many-locals
self.last_billing_timestamp = None
self.service_endpoint = None
self.resource_provider_object_id = None
+ self.secrets_locations = secrets_locations
+ self.cluster_pattern = None
+ self.local_availability_zones = local_availability_zones
self.principal_id = None
self.tenant_id = None
self.type_identity_type = type_identity_type
@@ -745,7 +834,7 @@ def __init__(self, *, value: Optional[List["_models.Cluster"]] = None, **kwargs:
self.next_link = None
-class ClusterNode(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class ClusterNode(_serialization.Model):
"""Cluster node details.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -938,7 +1027,7 @@ def __init__(
self.user_assigned_identities = user_assigned_identities
-class ClusterReportedProperties(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class ClusterReportedProperties(_serialization.Model):
"""Properties reported by cluster agent.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -969,6 +1058,9 @@ class ClusterReportedProperties(_serialization.Model): # pylint: disable=too-ma
:ivar oem_activation: OEM activation status of the cluster. Known values are: "Disabled" and
"Enabled".
:vartype oem_activation: str or ~azure.mgmt.azurestackhci.models.OemActivation
+ :ivar hardware_class: Hardware class of the cluster. Known values are: "Small", "Medium", and
+ "Large".
+ :vartype hardware_class: str or ~azure.mgmt.azurestackhci.models.HardwareClass
"""
_validation = {
@@ -982,6 +1074,7 @@ class ClusterReportedProperties(_serialization.Model): # pylint: disable=too-ma
"cluster_type": {"readonly": True},
"manufacturer": {"readonly": True},
"oem_activation": {"readonly": True},
+ "hardware_class": {"readonly": True},
}
_attribute_map = {
@@ -996,6 +1089,7 @@ class ClusterReportedProperties(_serialization.Model): # pylint: disable=too-ma
"cluster_type": {"key": "clusterType", "type": "str"},
"manufacturer": {"key": "manufacturer", "type": "str"},
"oem_activation": {"key": "oemActivation", "type": "str"},
+ "hardware_class": {"key": "hardwareClass", "type": "str"},
}
def __init__(
@@ -1018,6 +1112,52 @@ def __init__(
self.cluster_type = None
self.manufacturer = None
self.oem_activation = None
+ self.hardware_class = None
+
+
+class CollectLogJobProperties(_serialization.Model):
+ """Represents the properties of a log collection job.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar from_date: From date for log collection. Required.
+ :vartype from_date: ~datetime.datetime
+ :ivar to_date: To date for log collection. Required.
+ :vartype to_date: ~datetime.datetime
+ :ivar last_log_generated: To date for log collection.
+ :vartype last_log_generated: ~datetime.datetime
+ :ivar reported_properties: log collection job reported properties.
+ :vartype reported_properties: ~azure.mgmt.azurestackhci.models.LogCollectionReportedProperties
+ """
+
+ _validation = {
+ "from_date": {"required": True},
+ "to_date": {"required": True},
+ "last_log_generated": {"readonly": True},
+ "reported_properties": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "from_date": {"key": "fromDate", "type": "iso-8601"},
+ "to_date": {"key": "toDate", "type": "iso-8601"},
+ "last_log_generated": {"key": "lastLogGenerated", "type": "iso-8601"},
+ "reported_properties": {"key": "reportedProperties", "type": "LogCollectionReportedProperties"},
+ }
+
+ def __init__(self, *, from_date: datetime.datetime, to_date: datetime.datetime, **kwargs: Any) -> None:
+ """
+ :keyword from_date: From date for log collection. Required.
+ :paramtype from_date: ~datetime.datetime
+ :keyword to_date: To date for log collection. Required.
+ :paramtype to_date: ~datetime.datetime
+ """
+ super().__init__(**kwargs)
+ self.from_date = from_date
+ self.to_date = to_date
+ self.last_log_generated = None
+ self.reported_properties = None
class DefaultExtensionDetails(_serialization.Model):
@@ -1051,6 +1191,8 @@ def __init__(self, **kwargs: Any) -> None:
class DeploymentCluster(_serialization.Model):
"""AzureStackHCI Cluster deployment properties.
+ Variables are only populated by the server, and will be ignored when sending a request.
+
:ivar name: The cluster name provided when preparing Active Directory.
:vartype name: str
:ivar witness_type: Use a cloud witness if you have internet access and if you use an Azure
@@ -1068,14 +1210,25 @@ class DeploymentCluster(_serialization.Model):
Custom domain. If you selected **Custom domain, enter the domain for the blob service in this
format core.windows.net.
:vartype azure_service_endpoint: str
+ :ivar cluster_pattern: Cluster Pattern supported. Known values are: "Standard" and "RackAware".
+ :vartype cluster_pattern: str or ~azure.mgmt.azurestackhci.models.ClusterPattern
+ :ivar hardware_class: Hardware class of the cluster. Known values are: "Small", "Medium", and
+ "Large".
+ :vartype hardware_class: str or ~azure.mgmt.azurestackhci.models.HardwareClass
"""
+ _validation = {
+ "hardware_class": {"readonly": True},
+ }
+
_attribute_map = {
"name": {"key": "name", "type": "str"},
"witness_type": {"key": "witnessType", "type": "str"},
"witness_path": {"key": "witnessPath", "type": "str"},
"cloud_account_name": {"key": "cloudAccountName", "type": "str"},
"azure_service_endpoint": {"key": "azureServiceEndpoint", "type": "str"},
+ "cluster_pattern": {"key": "clusterPattern", "type": "str"},
+ "hardware_class": {"key": "hardwareClass", "type": "str"},
}
def __init__(
@@ -1086,6 +1239,7 @@ def __init__(
witness_path: Optional[str] = None,
cloud_account_name: Optional[str] = None,
azure_service_endpoint: Optional[str] = None,
+ cluster_pattern: Optional[Union[str, "_models.ClusterPattern"]] = None,
**kwargs: Any
) -> None:
"""
@@ -1106,6 +1260,9 @@ def __init__(
Custom domain. If you selected **Custom domain, enter the domain for the blob service in this
format core.windows.net.
:paramtype azure_service_endpoint: str
+ :keyword cluster_pattern: Cluster Pattern supported. Known values are: "Standard" and
+ "RackAware".
+ :paramtype cluster_pattern: str or ~azure.mgmt.azurestackhci.models.ClusterPattern
"""
super().__init__(**kwargs)
self.name = name
@@ -1113,6 +1270,8 @@ def __init__(
self.witness_path = witness_path
self.cloud_account_name = cloud_account_name
self.azure_service_endpoint = azure_service_endpoint
+ self.cluster_pattern = cluster_pattern
+ self.hardware_class = None
class DeploymentConfiguration(_serialization.Model):
@@ -1149,7 +1308,7 @@ def __init__(
self.scale_units = scale_units
-class DeploymentData(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class DeploymentData(_serialization.Model):
"""The Deployment data of AzureStackHCI Cluster.
:ivar security_settings: SecuritySettings to deploy AzureStackHCI Cluster.
@@ -1182,6 +1341,12 @@ class DeploymentData(_serialization.Model): # pylint: disable=too-many-instance
:vartype secrets: list[~azure.mgmt.azurestackhci.models.EceDeploymentSecrets]
:ivar optional_services: OptionalServices config to deploy AzureStackHCI Cluster.
:vartype optional_services: ~azure.mgmt.azurestackhci.models.OptionalServices
+ :ivar local_availability_zones: Local Availability Zone information for HCI cluster.
+ :vartype local_availability_zones:
+ list[~azure.mgmt.azurestackhci.models.LocalAvailabilityZones]
+ :ivar assembly_info: Assembly Package details for Validated Solution Recipe for AzureStackHCI
+ Cluster.
+ :vartype assembly_info: ~azure.mgmt.azurestackhci.models.AssemblyInfo
"""
_validation = {
@@ -1203,6 +1368,8 @@ class DeploymentData(_serialization.Model): # pylint: disable=too-many-instance
"secrets_location": {"key": "secretsLocation", "type": "str"},
"secrets": {"key": "secrets", "type": "[EceDeploymentSecrets]"},
"optional_services": {"key": "optionalServices", "type": "OptionalServices"},
+ "local_availability_zones": {"key": "localAvailabilityZones", "type": "[LocalAvailabilityZones]"},
+ "assembly_info": {"key": "assemblyInfo", "type": "AssemblyInfo"},
}
def __init__(
@@ -1222,6 +1389,8 @@ def __init__(
secrets_location: Optional[str] = None,
secrets: Optional[List["_models.EceDeploymentSecrets"]] = None,
optional_services: Optional["_models.OptionalServices"] = None,
+ local_availability_zones: Optional[List["_models.LocalAvailabilityZones"]] = None,
+ assembly_info: Optional["_models.AssemblyInfo"] = None,
**kwargs: Any
) -> None:
"""
@@ -1255,6 +1424,12 @@ def __init__(
:paramtype secrets: list[~azure.mgmt.azurestackhci.models.EceDeploymentSecrets]
:keyword optional_services: OptionalServices config to deploy AzureStackHCI Cluster.
:paramtype optional_services: ~azure.mgmt.azurestackhci.models.OptionalServices
+ :keyword local_availability_zones: Local Availability Zone information for HCI cluster.
+ :paramtype local_availability_zones:
+ list[~azure.mgmt.azurestackhci.models.LocalAvailabilityZones]
+ :keyword assembly_info: Assembly Package details for Validated Solution Recipe for
+ AzureStackHCI Cluster.
+ :paramtype assembly_info: ~azure.mgmt.azurestackhci.models.AssemblyInfo
"""
super().__init__(**kwargs)
self.security_settings = security_settings
@@ -1271,6 +1446,8 @@ def __init__(
self.secrets_location = secrets_location
self.secrets = secrets
self.optional_services = optional_services
+ self.local_availability_zones = local_availability_zones
+ self.assembly_info = assembly_info
class DeploymentSecuritySettings(_serialization.Model):
@@ -1439,7 +1616,7 @@ def __init__(
self,
*,
arc_node_resource_ids: Optional[List[str]] = None,
- deployment_mode: Union[str, "_models.DeploymentMode"] = "Deploy",
+ deployment_mode: Optional[Union[str, "_models.DeploymentMode"]] = None,
operation_type: Union[str, "_models.OperationType"] = "ClusterProvisioning",
deployment_configuration: Optional["_models.DeploymentConfiguration"] = None,
**kwargs: Any
@@ -2068,6 +2245,147 @@ def __init__(self, **kwargs: Any) -> None:
self.kind: Optional[str] = None
+class EdgeDeviceJob(ProxyResource):
+ """EdgeDevice Jobs resource.
+
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ HciEdgeDeviceJob
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.azurestackhci.models.SystemData
+ :ivar kind: Edge Solution type to support polymorphic resource. "HCI"
+ :vartype kind: str or ~azure.mgmt.azurestackhci.models.EdgeDeviceKind
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "kind": {"required": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "kind": {"key": "kind", "type": "str"},
+ }
+
+ _subtype_map = {"kind": {"HCI": "HciEdgeDeviceJob"}}
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.kind: Optional[str] = None
+
+
+class EdgeDeviceJobListResult(_serialization.Model):
+ """The response of a EdgeDeviceJob list operation.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: The EdgeDeviceJob items on this page. Required.
+ :vartype value: list[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :ivar next_link: The link to the next page of items.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[EdgeDeviceJob]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(self, *, value: List["_models.EdgeDeviceJob"], next_link: Optional[str] = None, **kwargs: Any) -> None:
+ """
+ :keyword value: The EdgeDeviceJob items on this page. Required.
+ :paramtype value: list[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :keyword next_link: The link to the next page of items.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class EdgeDeviceJobProperties(_serialization.Model):
+ """Edge device job properties.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :vartype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :ivar provisioning_state: Job provisioning state. Known values are: "NotSpecified", "Error",
+ "Succeeded", "Failed", "Canceled", "Connected", "Disconnected", "Deleted", "Creating",
+ "Updating", "Deleting", "Moving", "PartiallySucceeded", "PartiallyConnected", "InProgress",
+ "Accepted", "Provisioning", and "DisableInProgress".
+ :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState
+ :ivar job_id: Unique, immutable job id.
+ :vartype job_id: str
+ :ivar start_time_utc: The UTC date and time at which the job started.
+ :vartype start_time_utc: ~datetime.datetime
+ :ivar end_time_utc: The UTC date and time at which the job completed.
+ :vartype end_time_utc: ~datetime.datetime
+ :ivar status: Status of Edge device job. Known values are: "NotSpecified",
+ "ValidationInProgress", "ValidationSuccess", "ValidationFailed", "DeploymentInProgress",
+ "DeploymentFailed", "DeploymentSuccess", "Succeeded", "Failed", "Canceled", "Paused", and
+ "Scheduled".
+ :vartype status: str or ~azure.mgmt.azurestackhci.models.JobStatus
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ "job_id": {"readonly": True},
+ "start_time_utc": {"readonly": True},
+ "end_time_utc": {"readonly": True},
+ "status": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "deployment_mode": {"key": "deploymentMode", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "job_id": {"key": "jobId", "type": "str"},
+ "start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
+ "end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
+ "status": {"key": "status", "type": "str"},
+ }
+
+ def __init__(
+ self, *, deployment_mode: Optional[Union[str, "_models.DeploymentMode"]] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :paramtype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ """
+ super().__init__(**kwargs)
+ self.deployment_mode = deployment_mode
+ self.provisioning_state = None
+ self.job_id = None
+ self.start_time_utc = None
+ self.end_time_utc = None
+ self.status = None
+
+
class EdgeDeviceListResult(_serialization.Model):
"""The response of a EdgeDevice list operation.
@@ -2225,7 +2543,7 @@ def __init__(self, *, error: Optional["_models.ErrorDetail"] = None, **kwargs: A
self.error = error
-class Extension(ProxyResource): # pylint: disable=too-many-instance-attributes
+class Extension(ProxyResource):
"""Details of a particular extension in HCI Cluster.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -2608,68 +2926,234 @@ def __init__(self, *, target_version: Optional[str] = None, **kwargs: Any) -> No
self.target_version = target_version
-class HciEdgeDevice(EdgeDevice):
- """Arc-enabled edge device with HCI OS.
+class HciEdgeDeviceJobProperties(_serialization.Model):
+ """HCI Edge device job properties.
+
+ You probably want to use the sub-classes and not this class directly. Known sub-classes are:
+ HciCollectLogJobProperties, HciRemoteSupportJobProperties
Variables are only populated by the server, and will be ignored when sending a request.
All required parameters must be populated in order to send to server.
- :ivar id: Fully qualified resource ID for the resource. E.g.
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
- :vartype id: str
- :ivar name: The name of the resource.
- :vartype name: str
- :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
- "Microsoft.Storage/storageAccounts".
- :vartype type: str
- :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
- information.
- :vartype system_data: ~azure.mgmt.azurestackhci.models.SystemData
- :ivar kind: Device kind to support polymorphic resource. "HCI"
- :vartype kind: str or ~azure.mgmt.azurestackhci.models.DeviceKind
- :ivar properties: properties for Arc-enabled edge device with HCI OS.
- :vartype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceProperties
+ :ivar deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :vartype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :ivar provisioning_state: Job provisioning state. Known values are: "NotSpecified", "Error",
+ "Succeeded", "Failed", "Canceled", "Connected", "Disconnected", "Deleted", "Creating",
+ "Updating", "Deleting", "Moving", "PartiallySucceeded", "PartiallyConnected", "InProgress",
+ "Accepted", "Provisioning", and "DisableInProgress".
+ :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState
+ :ivar job_id: Unique, immutable job id.
+ :vartype job_id: str
+ :ivar start_time_utc: The UTC date and time at which the job started.
+ :vartype start_time_utc: ~datetime.datetime
+ :ivar end_time_utc: The UTC date and time at which the job completed.
+ :vartype end_time_utc: ~datetime.datetime
+ :ivar status: Status of Edge device job. Known values are: "NotSpecified",
+ "ValidationInProgress", "ValidationSuccess", "ValidationFailed", "DeploymentInProgress",
+ "DeploymentFailed", "DeploymentSuccess", "Succeeded", "Failed", "Canceled", "Paused", and
+ "Scheduled".
+ :vartype status: str or ~azure.mgmt.azurestackhci.models.JobStatus
+ :ivar job_type: Job Type to support polymorphic resource. Required. Known values are:
+ "CollectLog" and "RemoteSupport".
+ :vartype job_type: str or ~azure.mgmt.azurestackhci.models.HciEdgeDeviceJobType
"""
_validation = {
- "id": {"readonly": True},
- "name": {"readonly": True},
- "type": {"readonly": True},
- "system_data": {"readonly": True},
- "kind": {"required": True},
+ "provisioning_state": {"readonly": True},
+ "job_id": {"readonly": True},
+ "start_time_utc": {"readonly": True},
+ "end_time_utc": {"readonly": True},
+ "status": {"readonly": True},
+ "job_type": {"required": True},
}
_attribute_map = {
- "id": {"key": "id", "type": "str"},
- "name": {"key": "name", "type": "str"},
- "type": {"key": "type", "type": "str"},
- "system_data": {"key": "systemData", "type": "SystemData"},
- "kind": {"key": "kind", "type": "str"},
- "properties": {"key": "properties", "type": "HciEdgeDeviceProperties"},
+ "deployment_mode": {"key": "deploymentMode", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "job_id": {"key": "jobId", "type": "str"},
+ "start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
+ "end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
+ "status": {"key": "status", "type": "str"},
+ "job_type": {"key": "jobType", "type": "str"},
}
- def __init__(self, *, properties: Optional["_models.HciEdgeDeviceProperties"] = None, **kwargs: Any) -> None:
+ _subtype_map = {
+ "job_type": {"CollectLog": "HciCollectLogJobProperties", "RemoteSupport": "HciRemoteSupportJobProperties"}
+ }
+
+ def __init__(
+ self, *, deployment_mode: Optional[Union[str, "_models.DeploymentMode"]] = None, **kwargs: Any
+ ) -> None:
"""
- :keyword properties: properties for Arc-enabled edge device with HCI OS.
- :paramtype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceProperties
+ :keyword deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :paramtype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
"""
super().__init__(**kwargs)
- self.kind: str = "HCI"
- self.properties = properties
+ self.deployment_mode = deployment_mode
+ self.provisioning_state = None
+ self.job_id = None
+ self.start_time_utc = None
+ self.end_time_utc = None
+ self.status = None
+ self.job_type: Optional[str] = None
-class HciEdgeDeviceAdapterPropertyOverrides(_serialization.Model):
- """The AdapterPropertyOverrides of a cluster.
+class HciCollectLogJobProperties(HciEdgeDeviceJobProperties):
+ """Represents the properties of an HCI Collect Log job.
Variables are only populated by the server, and will be ignored when sending a request.
- :ivar jumbo_packet: This parameter should only be modified based on your OEM guidance. Do not
- modify this parameter without OEM validation.
- :vartype jumbo_packet: str
- :ivar network_direct: This parameter should only be modified based on your OEM guidance. Do not
- modify this parameter without OEM validation.
- :vartype network_direct: str
+ All required parameters must be populated in order to send to server.
+
+ :ivar deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :vartype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :ivar provisioning_state: Job provisioning state. Known values are: "NotSpecified", "Error",
+ "Succeeded", "Failed", "Canceled", "Connected", "Disconnected", "Deleted", "Creating",
+ "Updating", "Deleting", "Moving", "PartiallySucceeded", "PartiallyConnected", "InProgress",
+ "Accepted", "Provisioning", and "DisableInProgress".
+ :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState
+ :ivar job_id: Unique, immutable job id.
+ :vartype job_id: str
+ :ivar start_time_utc: The UTC date and time at which the job started.
+ :vartype start_time_utc: ~datetime.datetime
+ :ivar end_time_utc: The UTC date and time at which the job completed.
+ :vartype end_time_utc: ~datetime.datetime
+ :ivar status: Status of Edge device job. Known values are: "NotSpecified",
+ "ValidationInProgress", "ValidationSuccess", "ValidationFailed", "DeploymentInProgress",
+ "DeploymentFailed", "DeploymentSuccess", "Succeeded", "Failed", "Canceled", "Paused", and
+ "Scheduled".
+ :vartype status: str or ~azure.mgmt.azurestackhci.models.JobStatus
+ :ivar job_type: Job Type to support polymorphic resource. Required. Known values are:
+ "CollectLog" and "RemoteSupport".
+ :vartype job_type: str or ~azure.mgmt.azurestackhci.models.HciEdgeDeviceJobType
+ :ivar from_date: From date for log collection. Required.
+ :vartype from_date: ~datetime.datetime
+ :ivar to_date: To date for log collection. Required.
+ :vartype to_date: ~datetime.datetime
+ :ivar last_log_generated: To date for log collection.
+ :vartype last_log_generated: ~datetime.datetime
+ :ivar reported_properties: log collection job reported properties.
+ :vartype reported_properties: ~azure.mgmt.azurestackhci.models.LogCollectionReportedProperties
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ "job_id": {"readonly": True},
+ "start_time_utc": {"readonly": True},
+ "end_time_utc": {"readonly": True},
+ "status": {"readonly": True},
+ "job_type": {"required": True},
+ "from_date": {"required": True},
+ "to_date": {"required": True},
+ "last_log_generated": {"readonly": True},
+ "reported_properties": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "deployment_mode": {"key": "deploymentMode", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "job_id": {"key": "jobId", "type": "str"},
+ "start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
+ "end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
+ "status": {"key": "status", "type": "str"},
+ "job_type": {"key": "jobType", "type": "str"},
+ "from_date": {"key": "fromDate", "type": "iso-8601"},
+ "to_date": {"key": "toDate", "type": "iso-8601"},
+ "last_log_generated": {"key": "lastLogGenerated", "type": "iso-8601"},
+ "reported_properties": {"key": "reportedProperties", "type": "LogCollectionReportedProperties"},
+ }
+
+ def __init__(
+ self,
+ *,
+ from_date: datetime.datetime,
+ to_date: datetime.datetime,
+ deployment_mode: Optional[Union[str, "_models.DeploymentMode"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :paramtype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :keyword from_date: From date for log collection. Required.
+ :paramtype from_date: ~datetime.datetime
+ :keyword to_date: To date for log collection. Required.
+ :paramtype to_date: ~datetime.datetime
+ """
+ super().__init__(deployment_mode=deployment_mode, **kwargs)
+ self.job_type: str = "CollectLog"
+ self.from_date = from_date
+ self.to_date = to_date
+ self.last_log_generated = None
+ self.reported_properties = None
+
+
+class HciEdgeDevice(EdgeDevice):
+ """Arc-enabled edge device with HCI OS.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.azurestackhci.models.SystemData
+ :ivar kind: Device kind to support polymorphic resource. "HCI"
+ :vartype kind: str or ~azure.mgmt.azurestackhci.models.DeviceKind
+ :ivar properties: properties for Arc-enabled edge device with HCI OS.
+ :vartype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "kind": {"required": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "kind": {"key": "kind", "type": "str"},
+ "properties": {"key": "properties", "type": "HciEdgeDeviceProperties"},
+ }
+
+ def __init__(self, *, properties: Optional["_models.HciEdgeDeviceProperties"] = None, **kwargs: Any) -> None:
+ """
+ :keyword properties: properties for Arc-enabled edge device with HCI OS.
+ :paramtype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceProperties
+ """
+ super().__init__(**kwargs)
+ self.kind: str = "HCI"
+ self.properties = properties
+
+
+class HciEdgeDeviceAdapterPropertyOverrides(_serialization.Model):
+ """The AdapterPropertyOverrides of a cluster.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar jumbo_packet: This parameter should only be modified based on your OEM guidance. Do not
+ modify this parameter without OEM validation.
+ :vartype jumbo_packet: str
+ :ivar network_direct: This parameter should only be modified based on your OEM guidance. Do not
+ modify this parameter without OEM validation.
+ :vartype network_direct: str
:ivar network_direct_technology: This parameter should only be modified based on your OEM
guidance. Do not modify this parameter without OEM validation. Expected values are 'iWARP',
'RoCEv2', 'RoCE'.
@@ -2789,7 +3273,7 @@ def __init__(self, **kwargs: Any) -> None:
self.enable_storage_auto_ip = None
-class HciEdgeDeviceIntents(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class HciEdgeDeviceIntents(_serialization.Model):
"""The Intents of a cluster.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -2904,6 +3388,58 @@ def __init__(self, **kwargs: Any) -> None:
self.adapter_property_overrides = None
+class HciEdgeDeviceJob(EdgeDeviceJob):
+ """Edge device job for Azure Stack HCI solution.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.azurestackhci.models.SystemData
+ :ivar kind: Edge Solution type to support polymorphic resource. "HCI"
+ :vartype kind: str or ~azure.mgmt.azurestackhci.models.EdgeDeviceKind
+ :ivar properties: HCI Edge device job properties. Required.
+ :vartype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceJobProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ "kind": {"required": True},
+ "properties": {"required": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "kind": {"key": "kind", "type": "str"},
+ "properties": {"key": "properties", "type": "HciEdgeDeviceJobProperties"},
+ }
+
+ def __init__(self, *, properties: "_models.HciEdgeDeviceJobProperties", **kwargs: Any) -> None:
+ """
+ :keyword properties: HCI Edge device job properties. Required.
+ :paramtype properties: ~azure.mgmt.azurestackhci.models.HciEdgeDeviceJobProperties
+ """
+ super().__init__(**kwargs)
+ self.kind: str = "HCI"
+ self.properties = properties
+
+
class HciEdgeDeviceProperties(EdgeDeviceProperties):
"""properties for Arc-enabled edge device with HCI OS.
@@ -3044,6 +3580,29 @@ def __init__(self, **kwargs: Any) -> None:
self.load_balancing_algorithm = None
+class HciHardwareProfile(_serialization.Model):
+ """Hardware configurations for HCI device.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar processor_type: Process type of the device.
+ :vartype processor_type: str
+ """
+
+ _validation = {
+ "processor_type": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "processor_type": {"key": "processorType", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.processor_type = None
+
+
class HciNetworkProfile(_serialization.Model):
"""The network profile of a device.
@@ -3077,7 +3636,7 @@ def __init__(self, **kwargs: Any) -> None:
self.host_network = None
-class HciNicDetail(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class HciNicDetail(_serialization.Model):
"""The NIC Detail of a device.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -3112,6 +3671,9 @@ class HciNicDetail(_serialization.Model): # pylint: disable=too-many-instance-a
:vartype vlan_id: str
:ivar nic_status: The status of NIC, up, disconnected.
:vartype nic_status: str
+ :ivar rdma_capability: Describes the RDMA capability of the network adapter. Known values are:
+ "Enabled" and "Disabled".
+ :vartype rdma_capability: str or ~azure.mgmt.azurestackhci.models.RdmaCapability
"""
_validation = {
@@ -3130,6 +3692,7 @@ class HciNicDetail(_serialization.Model): # pylint: disable=too-many-instance-a
"nic_type": {"readonly": True},
"vlan_id": {"readonly": True},
"nic_status": {"readonly": True},
+ "rdma_capability": {"readonly": True},
}
_attribute_map = {
@@ -3148,6 +3711,7 @@ class HciNicDetail(_serialization.Model): # pylint: disable=too-many-instance-a
"nic_type": {"key": "nicType", "type": "str"},
"vlan_id": {"key": "vlanId", "type": "str"},
"nic_status": {"key": "nicStatus", "type": "str"},
+ "rdma_capability": {"key": "rdmaCapability", "type": "str"},
}
def __init__(self, **kwargs: Any) -> None:
@@ -3168,6 +3732,7 @@ def __init__(self, **kwargs: Any) -> None:
self.nic_type = None
self.vlan_id = None
self.nic_status = None
+ self.rdma_capability = None
class HciOsProfile(_serialization.Model):
@@ -3198,6 +3763,103 @@ def __init__(self, **kwargs: Any) -> None:
self.assembly_version = None
+class HciRemoteSupportJobProperties(HciEdgeDeviceJobProperties):
+ """Represents the properties of a remote support job for HCI.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :vartype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :ivar provisioning_state: Job provisioning state. Known values are: "NotSpecified", "Error",
+ "Succeeded", "Failed", "Canceled", "Connected", "Disconnected", "Deleted", "Creating",
+ "Updating", "Deleting", "Moving", "PartiallySucceeded", "PartiallyConnected", "InProgress",
+ "Accepted", "Provisioning", and "DisableInProgress".
+ :vartype provisioning_state: str or ~azure.mgmt.azurestackhci.models.ProvisioningState
+ :ivar job_id: Unique, immutable job id.
+ :vartype job_id: str
+ :ivar start_time_utc: The UTC date and time at which the job started.
+ :vartype start_time_utc: ~datetime.datetime
+ :ivar end_time_utc: The UTC date and time at which the job completed.
+ :vartype end_time_utc: ~datetime.datetime
+ :ivar status: Status of Edge device job. Known values are: "NotSpecified",
+ "ValidationInProgress", "ValidationSuccess", "ValidationFailed", "DeploymentInProgress",
+ "DeploymentFailed", "DeploymentSuccess", "Succeeded", "Failed", "Canceled", "Paused", and
+ "Scheduled".
+ :vartype status: str or ~azure.mgmt.azurestackhci.models.JobStatus
+ :ivar job_type: Job Type to support polymorphic resource. Required. Known values are:
+ "CollectLog" and "RemoteSupport".
+ :vartype job_type: str or ~azure.mgmt.azurestackhci.models.HciEdgeDeviceJobType
+ :ivar access_level: Remote support access level. Required. Known values are: "None",
+ "Diagnostics", and "DiagnosticsAndRepair".
+ :vartype access_level: str or ~azure.mgmt.azurestackhci.models.RemoteSupportAccessLevel
+ :ivar expiration_timestamp: Remote support expiration timestamp. Required.
+ :vartype expiration_timestamp: ~datetime.datetime
+ :ivar type: Remote support type. Required. Known values are: "Enable" and "Revoke".
+ :vartype type: str or ~azure.mgmt.azurestackhci.models.RemoteSupportType
+ :ivar reported_properties: log collection job reported properties.
+ :vartype reported_properties:
+ ~azure.mgmt.azurestackhci.models.RemoteSupportJobReportedProperties
+ """
+
+ _validation = {
+ "provisioning_state": {"readonly": True},
+ "job_id": {"readonly": True},
+ "start_time_utc": {"readonly": True},
+ "end_time_utc": {"readonly": True},
+ "status": {"readonly": True},
+ "job_type": {"required": True},
+ "access_level": {"required": True},
+ "expiration_timestamp": {"required": True},
+ "type": {"required": True},
+ "reported_properties": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "deployment_mode": {"key": "deploymentMode", "type": "str"},
+ "provisioning_state": {"key": "provisioningState", "type": "str"},
+ "job_id": {"key": "jobId", "type": "str"},
+ "start_time_utc": {"key": "startTimeUtc", "type": "iso-8601"},
+ "end_time_utc": {"key": "endTimeUtc", "type": "iso-8601"},
+ "status": {"key": "status", "type": "str"},
+ "job_type": {"key": "jobType", "type": "str"},
+ "access_level": {"key": "accessLevel", "type": "str"},
+ "expiration_timestamp": {"key": "expirationTimestamp", "type": "iso-8601"},
+ "type": {"key": "type", "type": "str"},
+ "reported_properties": {"key": "reportedProperties", "type": "RemoteSupportJobReportedProperties"},
+ }
+
+ def __init__(
+ self,
+ *,
+ access_level: Union[str, "_models.RemoteSupportAccessLevel"],
+ expiration_timestamp: datetime.datetime,
+ type: Union[str, "_models.RemoteSupportType"],
+ deployment_mode: Optional[Union[str, "_models.DeploymentMode"]] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword deployment_mode: Deployment mode to trigger job. Known values are: "Validate" and
+ "Deploy".
+ :paramtype deployment_mode: str or ~azure.mgmt.azurestackhci.models.DeploymentMode
+ :keyword access_level: Remote support access level. Required. Known values are: "None",
+ "Diagnostics", and "DiagnosticsAndRepair".
+ :paramtype access_level: str or ~azure.mgmt.azurestackhci.models.RemoteSupportAccessLevel
+ :keyword expiration_timestamp: Remote support expiration timestamp. Required.
+ :paramtype expiration_timestamp: ~datetime.datetime
+ :keyword type: Remote support type. Required. Known values are: "Enable" and "Revoke".
+ :paramtype type: str or ~azure.mgmt.azurestackhci.models.RemoteSupportType
+ """
+ super().__init__(deployment_mode=deployment_mode, **kwargs)
+ self.job_type: str = "RemoteSupport"
+ self.access_level = access_level
+ self.expiration_timestamp = expiration_timestamp
+ self.type = type
+ self.reported_properties = None
+
+
class ReportedProperties(_serialization.Model):
"""Reported properties pushed from edge device.
@@ -3244,6 +3906,10 @@ class HciReportedProperties(ReportedProperties):
:ivar sbe_deployment_package_info: Solution builder extension (SBE) deployment package
information.
:vartype sbe_deployment_package_info: ~azure.mgmt.azurestackhci.models.SbeDeploymentPackageInfo
+ :ivar storage_profile: Hci device storage specific information.
+ :vartype storage_profile: ~azure.mgmt.azurestackhci.models.HciStorageProfile
+ :ivar hardware_profile: Hci device hardware specific information.
+ :vartype hardware_profile: ~azure.mgmt.azurestackhci.models.HciHardwareProfile
"""
_validation = {
@@ -3252,6 +3918,8 @@ class HciReportedProperties(ReportedProperties):
"network_profile": {"readonly": True},
"os_profile": {"readonly": True},
"sbe_deployment_package_info": {"readonly": True},
+ "storage_profile": {"readonly": True},
+ "hardware_profile": {"readonly": True},
}
_attribute_map = {
@@ -3260,6 +3928,8 @@ class HciReportedProperties(ReportedProperties):
"network_profile": {"key": "networkProfile", "type": "HciNetworkProfile"},
"os_profile": {"key": "osProfile", "type": "HciOsProfile"},
"sbe_deployment_package_info": {"key": "sbeDeploymentPackageInfo", "type": "SbeDeploymentPackageInfo"},
+ "storage_profile": {"key": "storageProfile", "type": "HciStorageProfile"},
+ "hardware_profile": {"key": "hardwareProfile", "type": "HciHardwareProfile"},
}
def __init__(self, **kwargs: Any) -> None:
@@ -3268,6 +3938,31 @@ def __init__(self, **kwargs: Any) -> None:
self.network_profile = None
self.os_profile = None
self.sbe_deployment_package_info = None
+ self.storage_profile = None
+ self.hardware_profile = None
+
+
+class HciStorageProfile(_serialization.Model):
+ """Storage configurations for HCI device.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar poolable_disks_count: Number of storage disks in the device with $CanPool as true.
+ :vartype poolable_disks_count: int
+ """
+
+ _validation = {
+ "poolable_disks_count": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "poolable_disks_count": {"key": "poolableDisksCount", "type": "int"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.poolable_disks_count = None
class HciValidationFailureDetail(_serialization.Model):
@@ -3421,6 +4116,67 @@ def __init__(self, **kwargs: Any) -> None:
self.attestation_service_endpoint = None
+class JobReportedProperties(_serialization.Model):
+ """Reported Properties for job triggered from cloud.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar percent_complete: The percentage of the job that is complete.
+ :vartype percent_complete: int
+ :ivar validation_status: Validation status of job.
+ :vartype validation_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ :ivar deployment_status: Deployment status of job.
+ :vartype deployment_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ """
+
+ _validation = {
+ "percent_complete": {"readonly": True},
+ "validation_status": {"readonly": True},
+ "deployment_status": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "percent_complete": {"key": "percentComplete", "type": "int"},
+ "validation_status": {"key": "validationStatus", "type": "EceActionStatus"},
+ "deployment_status": {"key": "deploymentStatus", "type": "EceActionStatus"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.percent_complete = None
+ self.validation_status = None
+ self.deployment_status = None
+
+
+class LocalAvailabilityZones(_serialization.Model):
+ """Local Availability Zone information for HCI cluster.
+
+ :ivar local_availability_zone_name: Local Availability Zone name for HCI cluster.
+ :vartype local_availability_zone_name: str
+ :ivar nodes: Nodes belonging to a particular zone.
+ :vartype nodes: list[str]
+ """
+
+ _attribute_map = {
+ "local_availability_zone_name": {"key": "localAvailabilityZoneName", "type": "str"},
+ "nodes": {"key": "nodes", "type": "[str]"},
+ }
+
+ def __init__(
+ self, *, local_availability_zone_name: Optional[str] = None, nodes: Optional[List[str]] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword local_availability_zone_name: Local Availability Zone name for HCI cluster.
+ :paramtype local_availability_zone_name: str
+ :keyword nodes: Nodes belonging to a particular zone.
+ :paramtype nodes: list[str]
+ """
+ super().__init__(**kwargs)
+ self.local_availability_zone_name = local_availability_zone_name
+ self.nodes = nodes
+
+
class LogCollectionError(_serialization.Model):
"""Log Collection Error details of the cluster.
@@ -3449,6 +4205,56 @@ def __init__(self, **kwargs: Any) -> None:
self.error_message = None
+class LogCollectionJobSession(_serialization.Model):
+ """Represents a session for collecting logs from an edge device.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar start_time: The timestamp when log collection started, in ISO 8601 format.
+ :vartype start_time: str
+ :ivar end_time: The timestamp when log collection ended, in ISO 8601 format.
+ :vartype end_time: str
+ :ivar time_collected: The total time logs were collected for, in ISO 8601 duration format.
+ :vartype time_collected: str
+ :ivar log_size: The size of the collected logs in bytes.
+ :vartype log_size: int
+ :ivar status: The status of the log collection session. Known values are: "NotStarted",
+ "Running", "Failed", "Succeeded", and "Canceled".
+ :vartype status: str or ~azure.mgmt.azurestackhci.models.DeviceLogCollectionStatus
+ :ivar correlation_id: A unique identifier for correlating this log collection session with
+ other operations or sessions.
+ :vartype correlation_id: str
+ """
+
+ _validation = {
+ "start_time": {"readonly": True},
+ "end_time": {"readonly": True},
+ "time_collected": {"readonly": True},
+ "log_size": {"readonly": True},
+ "status": {"readonly": True},
+ "correlation_id": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "start_time": {"key": "startTime", "type": "str"},
+ "end_time": {"key": "endTime", "type": "str"},
+ "time_collected": {"key": "timeCollected", "type": "str"},
+ "log_size": {"key": "logSize", "type": "int"},
+ "status": {"key": "status", "type": "str"},
+ "correlation_id": {"key": "correlationId", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.start_time = None
+ self.end_time = None
+ self.time_collected = None
+ self.log_size = None
+ self.status = None
+ self.correlation_id = None
+
+
class LogCollectionProperties(_serialization.Model):
"""Log Collection properties of the cluster.
@@ -3488,6 +4294,45 @@ def __init__(self, **kwargs: Any) -> None:
self.log_collection_session_details = None
+class LogCollectionReportedProperties(_serialization.Model):
+ """Represents the reported properties of a log collection job.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar percent_complete: The percentage of the job that is complete.
+ :vartype percent_complete: int
+ :ivar validation_status: Validation status of job.
+ :vartype validation_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ :ivar deployment_status: Deployment status of job.
+ :vartype deployment_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ :ivar log_collection_session_details: Details of the log collection session.
+ :vartype log_collection_session_details:
+ list[~azure.mgmt.azurestackhci.models.LogCollectionJobSession]
+ """
+
+ _validation = {
+ "percent_complete": {"readonly": True},
+ "validation_status": {"readonly": True},
+ "deployment_status": {"readonly": True},
+ "log_collection_session_details": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "percent_complete": {"key": "percentComplete", "type": "int"},
+ "validation_status": {"key": "validationStatus", "type": "EceActionStatus"},
+ "deployment_status": {"key": "deploymentStatus", "type": "EceActionStatus"},
+ "log_collection_session_details": {"key": "logCollectionSessionDetails", "type": "[LogCollectionJobSession]"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.percent_complete = None
+ self.validation_status = None
+ self.deployment_status = None
+ self.log_collection_session_details = None
+
+
class LogCollectionRequest(_serialization.Model):
"""Log Collection Request.
@@ -3557,11 +4402,11 @@ class LogCollectionSession(_serialization.Model):
:ivar log_collection_status: LogCollection status. Known values are: "None", "InProgress",
"Failed", and "Succeeded".
:vartype log_collection_status: str or ~azure.mgmt.azurestackhci.models.LogCollectionStatus
+ :ivar correlation_id: CorrelationId of the log collection.
+ :vartype correlation_id: str
:ivar log_collection_job_type: LogCollection job type. Known values are: "OnDemand" and
"Scheduled".
:vartype log_collection_job_type: str or ~azure.mgmt.azurestackhci.models.LogCollectionJobType
- :ivar correlation_id: CorrelationId of the log collection.
- :vartype correlation_id: str
:ivar end_time_collected: End Time of the logs when it was collected.
:vartype end_time_collected: ~datetime.datetime
:ivar log_collection_error: Log Collection Error details of the cluster.
@@ -3574,8 +4419,8 @@ class LogCollectionSession(_serialization.Model):
"time_collected": {"readonly": True},
"log_size": {"readonly": True},
"log_collection_status": {"readonly": True},
- "log_collection_job_type": {"readonly": True},
"correlation_id": {"readonly": True},
+ "log_collection_job_type": {"readonly": True},
"end_time_collected": {"readonly": True},
"log_collection_error": {"readonly": True},
}
@@ -3586,8 +4431,8 @@ class LogCollectionSession(_serialization.Model):
"time_collected": {"key": "timeCollected", "type": "iso-8601"},
"log_size": {"key": "logSize", "type": "int"},
"log_collection_status": {"key": "logCollectionStatus", "type": "str"},
- "log_collection_job_type": {"key": "logCollectionJobType", "type": "str"},
"correlation_id": {"key": "correlationId", "type": "str"},
+ "log_collection_job_type": {"key": "logCollectionJobType", "type": "str"},
"end_time_collected": {"key": "endTimeCollected", "type": "iso-8601"},
"log_collection_error": {"key": "logCollectionError", "type": "LogCollectionError"},
}
@@ -3600,8 +4445,8 @@ def __init__(self, **kwargs: Any) -> None:
self.time_collected = None
self.log_size = None
self.log_collection_status = None
- self.log_collection_job_type = None
self.correlation_id = None
+ self.log_collection_job_type = None
self.end_time_collected = None
self.log_collection_error = None
@@ -4267,7 +5112,7 @@ def __init__(self, *, name: Optional[str] = None, ipv4_address: Optional[str] =
self.ipv4_address = ipv4_address
-class PrecheckResult(_serialization.Model): # pylint: disable=too-many-instance-attributes
+class PrecheckResult(_serialization.Model):
"""PrecheckResult.
:ivar name: Name of the individual test/rule/alert that was executed. Unique, not exposed to
@@ -4572,6 +5417,149 @@ def __init__(self, *, certificates: Optional[List[str]] = None, **kwargs: Any) -
self.certificates = certificates
+class RemoteSupportJobNodeSettings(_serialization.Model):
+ """Represents the settings of a remote support node.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar state: The state of the remote support node.
+ :vartype state: str
+ :ivar created_at: The timestamp when the node settings were created, in UTC.
+ :vartype created_at: ~datetime.datetime
+ :ivar updated_at: The timestamp when the node settings were last updated, in UTC.
+ :vartype updated_at: ~datetime.datetime
+ :ivar connection_status: The current connection status of the remote support session.
+ :vartype connection_status: str
+ :ivar connection_error_message: The error message, if any, from the last connection attempt.
+ :vartype connection_error_message: str
+ """
+
+ _validation = {
+ "state": {"readonly": True},
+ "created_at": {"readonly": True},
+ "updated_at": {"readonly": True},
+ "connection_status": {"readonly": True},
+ "connection_error_message": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "state": {"key": "state", "type": "str"},
+ "created_at": {"key": "createdAt", "type": "iso-8601"},
+ "updated_at": {"key": "updatedAt", "type": "iso-8601"},
+ "connection_status": {"key": "connectionStatus", "type": "str"},
+ "connection_error_message": {"key": "connectionErrorMessage", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.state = None
+ self.created_at = None
+ self.updated_at = None
+ self.connection_status = None
+ self.connection_error_message = None
+
+
+class RemoteSupportJobProperties(_serialization.Model):
+ """Represents the properties of a remote support job.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar access_level: Remote support access level. Required. Known values are: "None",
+ "Diagnostics", and "DiagnosticsAndRepair".
+ :vartype access_level: str or ~azure.mgmt.azurestackhci.models.RemoteSupportAccessLevel
+ :ivar expiration_timestamp: Remote support expiration timestamp. Required.
+ :vartype expiration_timestamp: ~datetime.datetime
+ :ivar type: Remote support type. Required. Known values are: "Enable" and "Revoke".
+ :vartype type: str or ~azure.mgmt.azurestackhci.models.RemoteSupportType
+ :ivar reported_properties: log collection job reported properties.
+ :vartype reported_properties:
+ ~azure.mgmt.azurestackhci.models.RemoteSupportJobReportedProperties
+ """
+
+ _validation = {
+ "access_level": {"required": True},
+ "expiration_timestamp": {"required": True},
+ "type": {"required": True},
+ "reported_properties": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "access_level": {"key": "accessLevel", "type": "str"},
+ "expiration_timestamp": {"key": "expirationTimestamp", "type": "iso-8601"},
+ "type": {"key": "type", "type": "str"},
+ "reported_properties": {"key": "reportedProperties", "type": "RemoteSupportJobReportedProperties"},
+ }
+
+ def __init__(
+ self,
+ *,
+ access_level: Union[str, "_models.RemoteSupportAccessLevel"],
+ expiration_timestamp: datetime.datetime,
+ type: Union[str, "_models.RemoteSupportType"],
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword access_level: Remote support access level. Required. Known values are: "None",
+ "Diagnostics", and "DiagnosticsAndRepair".
+ :paramtype access_level: str or ~azure.mgmt.azurestackhci.models.RemoteSupportAccessLevel
+ :keyword expiration_timestamp: Remote support expiration timestamp. Required.
+ :paramtype expiration_timestamp: ~datetime.datetime
+ :keyword type: Remote support type. Required. Known values are: "Enable" and "Revoke".
+ :paramtype type: str or ~azure.mgmt.azurestackhci.models.RemoteSupportType
+ """
+ super().__init__(**kwargs)
+ self.access_level = access_level
+ self.expiration_timestamp = expiration_timestamp
+ self.type = type
+ self.reported_properties = None
+
+
+class RemoteSupportJobReportedProperties(_serialization.Model):
+ """Represents the reported properties of a remote support job.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar percent_complete: The percentage of the job that is complete.
+ :vartype percent_complete: int
+ :ivar validation_status: Validation status of job.
+ :vartype validation_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ :ivar deployment_status: Deployment status of job.
+ :vartype deployment_status: ~azure.mgmt.azurestackhci.models.EceActionStatus
+ :ivar node_settings: Optional settings for configuring the node for remote support.
+ :vartype node_settings: ~azure.mgmt.azurestackhci.models.RemoteSupportJobNodeSettings
+ :ivar session_details: Details of the remote support session.
+ :vartype session_details: list[~azure.mgmt.azurestackhci.models.RemoteSupportSession]
+ """
+
+ _validation = {
+ "percent_complete": {"readonly": True},
+ "validation_status": {"readonly": True},
+ "deployment_status": {"readonly": True},
+ "node_settings": {"readonly": True},
+ "session_details": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "percent_complete": {"key": "percentComplete", "type": "int"},
+ "validation_status": {"key": "validationStatus", "type": "EceActionStatus"},
+ "deployment_status": {"key": "deploymentStatus", "type": "EceActionStatus"},
+ "node_settings": {"key": "nodeSettings", "type": "RemoteSupportJobNodeSettings"},
+ "session_details": {"key": "sessionDetails", "type": "[RemoteSupportSession]"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.percent_complete = None
+ self.validation_status = None
+ self.deployment_status = None
+ self.node_settings = None
+ self.session_details = None
+
+
class RemoteSupportNodeSettings(_serialization.Model):
"""Remote Support Node Settings of the cluster.
@@ -4743,6 +5731,50 @@ def __init__(
self.remote_support_type = remote_support_type
+class RemoteSupportSession(_serialization.Model):
+ """Represents a remote support session.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar session_id: Unique session Id.
+ :vartype session_id: str
+ :ivar session_start_time: The start time of the remote support session, in UTC.
+ :vartype session_start_time: ~datetime.datetime
+ :ivar session_end_time: The end time of the remote support session, in UTC.
+ :vartype session_end_time: ~datetime.datetime
+ :ivar access_level: The level of access granted during the remote support session. Known values
+ are: "None", "Diagnostics", and "DiagnosticsAndRepair".
+ :vartype access_level: str or ~azure.mgmt.azurestackhci.models.RemoteSupportAccessLevel
+ :ivar transcript_location: The location where the session transcript is stored.
+ :vartype transcript_location: str
+ """
+
+ _validation = {
+ "session_id": {"readonly": True},
+ "session_start_time": {"readonly": True},
+ "session_end_time": {"readonly": True},
+ "access_level": {"readonly": True},
+ "transcript_location": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "session_id": {"key": "sessionId", "type": "str"},
+ "session_start_time": {"key": "sessionStartTime", "type": "iso-8601"},
+ "session_end_time": {"key": "sessionEndTime", "type": "iso-8601"},
+ "access_level": {"key": "accessLevel", "type": "str"},
+ "transcript_location": {"key": "transcriptLocation", "type": "str"},
+ }
+
+ def __init__(self, **kwargs: Any) -> None:
+ """ """
+ super().__init__(**kwargs)
+ self.session_id = None
+ self.session_start_time = None
+ self.session_end_time = None
+ self.access_level = None
+ self.transcript_location = None
+
+
class SbeCredentials(_serialization.Model):
"""secrets used for solution builder extension (SBE) partner extensibility.
@@ -4976,26 +6008,81 @@ def __init__(
self.sbe_partner_info = sbe_partner_info
-class SdnIntegration(_serialization.Model):
- """SDN Integration config to deploy AzureStackHCI Cluster.
+class SdnIntegration(_serialization.Model):
+ """SDN Integration config to deploy AzureStackHCI Cluster.
+
+ :ivar network_controller: network controller config for SDN Integration to deploy AzureStackHCI
+ Cluster.
+ :vartype network_controller: ~azure.mgmt.azurestackhci.models.NetworkController
+ """
+
+ _attribute_map = {
+ "network_controller": {"key": "networkController", "type": "NetworkController"},
+ }
+
+ def __init__(self, *, network_controller: Optional["_models.NetworkController"] = None, **kwargs: Any) -> None:
+ """
+ :keyword network_controller: network controller config for SDN Integration to deploy
+ AzureStackHCI Cluster.
+ :paramtype network_controller: ~azure.mgmt.azurestackhci.models.NetworkController
+ """
+ super().__init__(**kwargs)
+ self.network_controller = network_controller
+
+
+class SecretsLocationDetails(_serialization.Model):
+ """Secrets location details.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar secrets_type: Type of secrets to store. Required. "BackupSecrets"
+ :vartype secrets_type: str or ~azure.mgmt.azurestackhci.models.SecretsType
+ :ivar secrets_location: secrets location. Required.
+ :vartype secrets_location: str
+ """
+
+ _validation = {
+ "secrets_type": {"required": True},
+ "secrets_location": {"required": True},
+ }
+
+ _attribute_map = {
+ "secrets_type": {"key": "secretsType", "type": "str"},
+ "secrets_location": {"key": "secretsLocation", "type": "str"},
+ }
+
+ def __init__(
+ self, *, secrets_type: Union[str, "_models.SecretsType"], secrets_location: str, **kwargs: Any
+ ) -> None:
+ """
+ :keyword secrets_type: Type of secrets to store. Required. "BackupSecrets"
+ :paramtype secrets_type: str or ~azure.mgmt.azurestackhci.models.SecretsType
+ :keyword secrets_location: secrets location. Required.
+ :paramtype secrets_location: str
+ """
+ super().__init__(**kwargs)
+ self.secrets_type = secrets_type
+ self.secrets_location = secrets_location
+
+
+class SecretsLocationsChangeRequest(_serialization.Model):
+ """Update secrets locations change Request.
- :ivar network_controller: network controller config for SDN Integration to deploy AzureStackHCI
- Cluster.
- :vartype network_controller: ~azure.mgmt.azurestackhci.models.NetworkController
+ :ivar properties: List of secret locations.
+ :vartype properties: list[~azure.mgmt.azurestackhci.models.SecretsLocationDetails]
"""
_attribute_map = {
- "network_controller": {"key": "networkController", "type": "NetworkController"},
+ "properties": {"key": "properties", "type": "[SecretsLocationDetails]"},
}
- def __init__(self, *, network_controller: Optional["_models.NetworkController"] = None, **kwargs: Any) -> None:
+ def __init__(self, *, properties: Optional[List["_models.SecretsLocationDetails"]] = None, **kwargs: Any) -> None:
"""
- :keyword network_controller: network controller config for SDN Integration to deploy
- AzureStackHCI Cluster.
- :paramtype network_controller: ~azure.mgmt.azurestackhci.models.NetworkController
+ :keyword properties: List of secret locations.
+ :paramtype properties: list[~azure.mgmt.azurestackhci.models.SecretsLocationDetails]
"""
super().__init__(**kwargs)
- self.network_controller = network_controller
+ self.properties = properties
class SecurityComplianceStatus(_serialization.Model):
@@ -5705,7 +6792,7 @@ def __init__(
self.last_modified_at = last_modified_at
-class Update(ProxyResource): # pylint: disable=too-many-instance-attributes
+class Update(ProxyResource):
"""Update details.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -6008,7 +7095,7 @@ def __init__(
self.package_name = package_name
-class UpdateRun(ProxyResource): # pylint: disable=too-many-instance-attributes
+class UpdateRun(ProxyResource):
"""Details of an Update run.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -6192,7 +7279,7 @@ def __init__(self, *, value: Optional[List["_models.UpdateRun"]] = None, **kwarg
self.next_link = None
-class UpdateSummaries(ProxyResource): # pylint: disable=too-many-instance-attributes
+class UpdateSummaries(ProxyResource):
"""Get the update summaries for the cluster.
Variables are only populated by the server, and will be ignored when sending a request.
@@ -6417,6 +7504,504 @@ def __init__(self, **kwargs: Any) -> None:
self.client_id = None
+class ValidatedSolutionRecipe(ProxyResource):
+ """Represents a validated solution recipe resource.
+
+ Variables are only populated by the server, and will be ignored when sending a request.
+
+ :ivar id: Fully qualified resource ID for the resource. E.g.
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}". # pylint: disable=line-too-long
+ :vartype id: str
+ :ivar name: The name of the resource.
+ :vartype name: str
+ :ivar type: The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or
+ "Microsoft.Storage/storageAccounts".
+ :vartype type: str
+ :ivar system_data: Azure Resource Manager metadata containing createdBy and modifiedBy
+ information.
+ :vartype system_data: ~azure.mgmt.azurestackhci.models.SystemData
+ :ivar properties: The resource-specific properties for this resource.
+ :vartype properties: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeProperties
+ """
+
+ _validation = {
+ "id": {"readonly": True},
+ "name": {"readonly": True},
+ "type": {"readonly": True},
+ "system_data": {"readonly": True},
+ }
+
+ _attribute_map = {
+ "id": {"key": "id", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "system_data": {"key": "systemData", "type": "SystemData"},
+ "properties": {"key": "properties", "type": "ValidatedSolutionRecipeProperties"},
+ }
+
+ def __init__(
+ self, *, properties: Optional["_models.ValidatedSolutionRecipeProperties"] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword properties: The resource-specific properties for this resource.
+ :paramtype properties: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeProperties
+ """
+ super().__init__(**kwargs)
+ self.properties = properties
+
+
+class ValidatedSolutionRecipeCapabilities(_serialization.Model):
+ """Represents capabilities available in a validated solution recipe.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar cluster_capabilities: Represents the cluster capabilities. Required.
+ :vartype cluster_capabilities:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapability]
+ :ivar node_capabilities: Represents the node capabilities. Required.
+ :vartype node_capabilities:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapability]
+ """
+
+ _validation = {
+ "cluster_capabilities": {"required": True},
+ "node_capabilities": {"required": True},
+ }
+
+ _attribute_map = {
+ "cluster_capabilities": {"key": "clusterCapabilities", "type": "[ValidatedSolutionRecipeCapability]"},
+ "node_capabilities": {"key": "nodeCapabilities", "type": "[ValidatedSolutionRecipeCapability]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ cluster_capabilities: List["_models.ValidatedSolutionRecipeCapability"],
+ node_capabilities: List["_models.ValidatedSolutionRecipeCapability"],
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword cluster_capabilities: Represents the cluster capabilities. Required.
+ :paramtype cluster_capabilities:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapability]
+ :keyword node_capabilities: Represents the node capabilities. Required.
+ :paramtype node_capabilities:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapability]
+ """
+ super().__init__(**kwargs)
+ self.cluster_capabilities = cluster_capabilities
+ self.node_capabilities = node_capabilities
+
+
+class ValidatedSolutionRecipeCapability(_serialization.Model):
+ """Represents capability available in a validated solution recipe.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar capability_name: Represents the capability name. Required.
+ :vartype capability_name: str
+ """
+
+ _validation = {
+ "capability_name": {"required": True},
+ }
+
+ _attribute_map = {
+ "capability_name": {"key": "capabilityName", "type": "str"},
+ }
+
+ def __init__(self, *, capability_name: str, **kwargs: Any) -> None:
+ """
+ :keyword capability_name: Represents the capability name. Required.
+ :paramtype capability_name: str
+ """
+ super().__init__(**kwargs)
+ self.capability_name = capability_name
+
+
+class ValidatedSolutionRecipeComponent(_serialization.Model):
+ """Represents component available in a validated solution recipe.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar name: Represents the component's name. Required.
+ :vartype name: str
+ :ivar type: Represents the component's type. Required.
+ :vartype type: str
+ :ivar required_version: Represents the component's required version.
+ :vartype required_version: str
+ :ivar install_order: Represents the component's install order.
+ :vartype install_order: int
+ :ivar tags: Represents the component's tags. Required.
+ :vartype tags: list[str]
+ :ivar payloads: Represents the component's payloads.
+ :vartype payloads:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponentPayload]
+ :ivar metadata: Represents the component's metadata.
+ :vartype metadata: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata
+ """
+
+ _validation = {
+ "name": {"required": True},
+ "type": {"required": True},
+ "tags": {"required": True},
+ }
+
+ _attribute_map = {
+ "name": {"key": "name", "type": "str"},
+ "type": {"key": "type", "type": "str"},
+ "required_version": {"key": "requiredVersion", "type": "str"},
+ "install_order": {"key": "installOrder", "type": "int"},
+ "tags": {"key": "tags", "type": "[str]"},
+ "payloads": {"key": "payloads", "type": "[ValidatedSolutionRecipeComponentPayload]"},
+ "metadata": {"key": "metadata", "type": "ValidatedSolutionRecipeComponentMetadata"},
+ }
+
+ def __init__(
+ self,
+ *,
+ name: str,
+ type: str,
+ tags: List[str],
+ required_version: Optional[str] = None,
+ install_order: Optional[int] = None,
+ payloads: Optional[List["_models.ValidatedSolutionRecipeComponentPayload"]] = None,
+ metadata: Optional["_models.ValidatedSolutionRecipeComponentMetadata"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword name: Represents the component's name. Required.
+ :paramtype name: str
+ :keyword type: Represents the component's type. Required.
+ :paramtype type: str
+ :keyword required_version: Represents the component's required version.
+ :paramtype required_version: str
+ :keyword install_order: Represents the component's install order.
+ :paramtype install_order: int
+ :keyword tags: Represents the component's tags. Required.
+ :paramtype tags: list[str]
+ :keyword payloads: Represents the component's payloads.
+ :paramtype payloads:
+ list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponentPayload]
+ :keyword metadata: Represents the component's metadata.
+ :paramtype metadata: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponentMetadata
+ """
+ super().__init__(**kwargs)
+ self.name = name
+ self.type = type
+ self.required_version = required_version
+ self.install_order = install_order
+ self.tags = tags
+ self.payloads = payloads
+ self.metadata = metadata
+
+
+class ValidatedSolutionRecipeComponentMetadata(_serialization.Model):
+ """Represents metadata associated with a component available in a validated solution recipe.
+
+ :ivar extension_type: Represents the type of extension.
+ :vartype extension_type: str
+ :ivar publisher: Represents the publisher of the extension.
+ :vartype publisher: str
+ :ivar enable_automatic_upgrade: Indicates whether automatic upgrades of the extension are
+ enabled.
+ :vartype enable_automatic_upgrade: bool
+ :ivar lcm_update: Indicates whether the LCM (Lifecycle Management) update of the extension is
+ enabled.
+ :vartype lcm_update: bool
+ :ivar catalog: Specifies the catalog to which the extension belongs.
+ :vartype catalog: str
+ :ivar ring: Specifies the ring to which the extension belongs, internally used by component.
+ :vartype ring: str
+ :ivar release_train: Specifies the release train to which given component belongs.
+ :vartype release_train: str
+ :ivar link: Specifies the link associated with the extension.
+ :vartype link: str
+ :ivar name: Specifies the name of the extension.
+ :vartype name: str
+ :ivar expected_hash: Specifies the expected hash of the extension.
+ :vartype expected_hash: str
+ :ivar preview_source: Specifies the preview source of the extension.
+ :vartype preview_source: str
+ """
+
+ _attribute_map = {
+ "extension_type": {"key": "extensionType", "type": "str"},
+ "publisher": {"key": "publisher", "type": "str"},
+ "enable_automatic_upgrade": {"key": "enableAutomaticUpgrade", "type": "bool"},
+ "lcm_update": {"key": "lcmUpdate", "type": "bool"},
+ "catalog": {"key": "catalog", "type": "str"},
+ "ring": {"key": "ring", "type": "str"},
+ "release_train": {"key": "releaseTrain", "type": "str"},
+ "link": {"key": "link", "type": "str"},
+ "name": {"key": "name", "type": "str"},
+ "expected_hash": {"key": "expectedHash", "type": "str"},
+ "preview_source": {"key": "previewSource", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ extension_type: Optional[str] = None,
+ publisher: Optional[str] = None,
+ enable_automatic_upgrade: Optional[bool] = None,
+ lcm_update: Optional[bool] = None,
+ catalog: Optional[str] = None,
+ ring: Optional[str] = None,
+ release_train: Optional[str] = None,
+ link: Optional[str] = None,
+ name: Optional[str] = None,
+ expected_hash: Optional[str] = None,
+ preview_source: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword extension_type: Represents the type of extension.
+ :paramtype extension_type: str
+ :keyword publisher: Represents the publisher of the extension.
+ :paramtype publisher: str
+ :keyword enable_automatic_upgrade: Indicates whether automatic upgrades of the extension are
+ enabled.
+ :paramtype enable_automatic_upgrade: bool
+ :keyword lcm_update: Indicates whether the LCM (Lifecycle Management) update of the extension
+ is enabled.
+ :paramtype lcm_update: bool
+ :keyword catalog: Specifies the catalog to which the extension belongs.
+ :paramtype catalog: str
+ :keyword ring: Specifies the ring to which the extension belongs, internally used by component.
+ :paramtype ring: str
+ :keyword release_train: Specifies the release train to which given component belongs.
+ :paramtype release_train: str
+ :keyword link: Specifies the link associated with the extension.
+ :paramtype link: str
+ :keyword name: Specifies the name of the extension.
+ :paramtype name: str
+ :keyword expected_hash: Specifies the expected hash of the extension.
+ :paramtype expected_hash: str
+ :keyword preview_source: Specifies the preview source of the extension.
+ :paramtype preview_source: str
+ """
+ super().__init__(**kwargs)
+ self.extension_type = extension_type
+ self.publisher = publisher
+ self.enable_automatic_upgrade = enable_automatic_upgrade
+ self.lcm_update = lcm_update
+ self.catalog = catalog
+ self.ring = ring
+ self.release_train = release_train
+ self.link = link
+ self.name = name
+ self.expected_hash = expected_hash
+ self.preview_source = preview_source
+
+
+class ValidatedSolutionRecipeComponentPayload(_serialization.Model):
+ """Represents payloads associated with a component available in a validated solution recipe.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar identifier: Represents the unique identifier of the payload used to query the URL.
+ Required.
+ :vartype identifier: str
+ :ivar hash: Represents the cryptographic hash of the payload, ensuring data integrity.
+ Required.
+ :vartype hash: str
+ :ivar file_name: Represents the name of the file associated with the payload. Required.
+ :vartype file_name: str
+ :ivar url: Represents the URL from which the payload can be downloaded. Required.
+ :vartype url: str
+ """
+
+ _validation = {
+ "identifier": {"required": True},
+ "hash": {"required": True},
+ "file_name": {"required": True},
+ "url": {"required": True},
+ }
+
+ _attribute_map = {
+ "identifier": {"key": "identifier", "type": "str"},
+ "hash": {"key": "hash", "type": "str"},
+ "file_name": {"key": "fileName", "type": "str"},
+ "url": {"key": "url", "type": "str"},
+ }
+
+ def __init__(self, *, identifier: str, hash: str, file_name: str, url: str, **kwargs: Any) -> None:
+ """
+ :keyword identifier: Represents the unique identifier of the payload used to query the URL.
+ Required.
+ :paramtype identifier: str
+ :keyword hash: Represents the cryptographic hash of the payload, ensuring data integrity.
+ Required.
+ :paramtype hash: str
+ :keyword file_name: Represents the name of the file associated with the payload. Required.
+ :paramtype file_name: str
+ :keyword url: Represents the URL from which the payload can be downloaded. Required.
+ :paramtype url: str
+ """
+ super().__init__(**kwargs)
+ self.identifier = identifier
+ self.hash = hash
+ self.file_name = file_name
+ self.url = url
+
+
+class ValidatedSolutionRecipeContent(_serialization.Model):
+ """Represents contents of a validated solution recipe resource.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar info: Represents information about a validated solution recipe. Required.
+ :vartype info: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeInfo
+ :ivar capabilities: Represents capabilities available in a validated solution recipe.
+ :vartype capabilities: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapabilities
+ :ivar components: Represents components available in a validated solution recipe. Required.
+ :vartype components: list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponent]
+ """
+
+ _validation = {
+ "info": {"required": True},
+ "components": {"required": True},
+ }
+
+ _attribute_map = {
+ "info": {"key": "info", "type": "ValidatedSolutionRecipeInfo"},
+ "capabilities": {"key": "capabilities", "type": "ValidatedSolutionRecipeCapabilities"},
+ "components": {"key": "components", "type": "[ValidatedSolutionRecipeComponent]"},
+ }
+
+ def __init__(
+ self,
+ *,
+ info: "_models.ValidatedSolutionRecipeInfo",
+ components: List["_models.ValidatedSolutionRecipeComponent"],
+ capabilities: Optional["_models.ValidatedSolutionRecipeCapabilities"] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword info: Represents information about a validated solution recipe. Required.
+ :paramtype info: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeInfo
+ :keyword capabilities: Represents capabilities available in a validated solution recipe.
+ :paramtype capabilities: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeCapabilities
+ :keyword components: Represents components available in a validated solution recipe. Required.
+ :paramtype components: list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeComponent]
+ """
+ super().__init__(**kwargs)
+ self.info = info
+ self.capabilities = capabilities
+ self.components = components
+
+
+class ValidatedSolutionRecipeInfo(_serialization.Model):
+ """Represents information about a validated solution recipe.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar solution_type: Represents the solution type for which this validated solution recipe is
+ applicable. Required.
+ :vartype solution_type: str
+ :ivar version: Represents the version for which this validated solution recipe is applicable.
+ Required.
+ :vartype version: str
+ """
+
+ _validation = {
+ "solution_type": {"required": True},
+ "version": {"required": True},
+ }
+
+ _attribute_map = {
+ "solution_type": {"key": "solutionType", "type": "str"},
+ "version": {"key": "version", "type": "str"},
+ }
+
+ def __init__(self, *, solution_type: str, version: str, **kwargs: Any) -> None:
+ """
+ :keyword solution_type: Represents the solution type for which this validated solution recipe
+ is applicable. Required.
+ :paramtype solution_type: str
+ :keyword version: Represents the version for which this validated solution recipe is
+ applicable. Required.
+ :paramtype version: str
+ """
+ super().__init__(**kwargs)
+ self.solution_type = solution_type
+ self.version = version
+
+
+class ValidatedSolutionRecipeListResult(_serialization.Model):
+ """The response of a ValidatedSolutionRecipe list operation.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar value: The ValidatedSolutionRecipe items on this page. Required.
+ :vartype value: list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe]
+ :ivar next_link: The link to the next page of items.
+ :vartype next_link: str
+ """
+
+ _validation = {
+ "value": {"required": True},
+ }
+
+ _attribute_map = {
+ "value": {"key": "value", "type": "[ValidatedSolutionRecipe]"},
+ "next_link": {"key": "nextLink", "type": "str"},
+ }
+
+ def __init__(
+ self, *, value: List["_models.ValidatedSolutionRecipe"], next_link: Optional[str] = None, **kwargs: Any
+ ) -> None:
+ """
+ :keyword value: The ValidatedSolutionRecipe items on this page. Required.
+ :paramtype value: list[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe]
+ :keyword next_link: The link to the next page of items.
+ :paramtype next_link: str
+ """
+ super().__init__(**kwargs)
+ self.value = value
+ self.next_link = next_link
+
+
+class ValidatedSolutionRecipeProperties(_serialization.Model):
+ """Represents properties of a validated solution recipe resource.
+
+ All required parameters must be populated in order to send to server.
+
+ :ivar recipe_content: Represents contents of a validated solution recipe. Required.
+ :vartype recipe_content: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeContent
+ :ivar signature: Represents the signature of the recipe, to be used for ensuring its integrity.
+ :vartype signature: str
+ """
+
+ _validation = {
+ "recipe_content": {"required": True},
+ }
+
+ _attribute_map = {
+ "recipe_content": {"key": "recipeContent", "type": "ValidatedSolutionRecipeContent"},
+ "signature": {"key": "signature", "type": "str"},
+ }
+
+ def __init__(
+ self,
+ *,
+ recipe_content: "_models.ValidatedSolutionRecipeContent",
+ signature: Optional[str] = None,
+ **kwargs: Any
+ ) -> None:
+ """
+ :keyword recipe_content: Represents contents of a validated solution recipe. Required.
+ :paramtype recipe_content: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipeContent
+ :keyword signature: Represents the signature of the recipe, to be used for ensuring its
+ integrity.
+ :paramtype signature: str
+ """
+ super().__init__(**kwargs)
+ self.recipe_content = recipe_content
+ self.signature = signature
+
+
class ValidateRequest(_serialization.Model):
"""The validate request for Edge Device.
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/__init__.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/__init__.py
index 0cfd35e48b6b..a9e1954d637a 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/__init__.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/__init__.py
@@ -5,29 +5,38 @@
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
+# pylint: disable=wrong-import-position
-from ._arc_settings_operations import ArcSettingsOperations
-from ._clusters_operations import ClustersOperations
-from ._deployment_settings_operations import DeploymentSettingsOperations
-from ._edge_devices_operations import EdgeDevicesOperations
-from ._extensions_operations import ExtensionsOperations
-from ._offers_operations import OffersOperations
-from ._operations import Operations
-from ._publishers_operations import PublishersOperations
-from ._security_settings_operations import SecuritySettingsOperations
-from ._skus_operations import SkusOperations
-from ._update_runs_operations import UpdateRunsOperations
-from ._update_summaries_operations import UpdateSummariesOperations
-from ._updates_operations import UpdatesOperations
+from typing import TYPE_CHECKING
+
+if TYPE_CHECKING:
+ from ._patch import * # pylint: disable=unused-wildcard-import
+
+from ._arc_settings_operations import ArcSettingsOperations # type: ignore
+from ._clusters_operations import ClustersOperations # type: ignore
+from ._deployment_settings_operations import DeploymentSettingsOperations # type: ignore
+from ._edge_device_jobs_operations import EdgeDeviceJobsOperations # type: ignore
+from ._edge_devices_operations import EdgeDevicesOperations # type: ignore
+from ._extensions_operations import ExtensionsOperations # type: ignore
+from ._offers_operations import OffersOperations # type: ignore
+from ._operations import Operations # type: ignore
+from ._publishers_operations import PublishersOperations # type: ignore
+from ._security_settings_operations import SecuritySettingsOperations # type: ignore
+from ._skus_operations import SkusOperations # type: ignore
+from ._update_runs_operations import UpdateRunsOperations # type: ignore
+from ._updates_operations import UpdatesOperations # type: ignore
+from ._update_summaries_operations import UpdateSummariesOperations # type: ignore
+from ._validated_solution_recipes_operations import ValidatedSolutionRecipesOperations # type: ignore
from ._patch import __all__ as _patch_all
-from ._patch import * # pylint: disable=unused-wildcard-import
+from ._patch import *
from ._patch import patch_sdk as _patch_sdk
__all__ = [
"ArcSettingsOperations",
"ClustersOperations",
"DeploymentSettingsOperations",
+ "EdgeDeviceJobsOperations",
"EdgeDevicesOperations",
"ExtensionsOperations",
"OffersOperations",
@@ -36,8 +45,9 @@
"SecuritySettingsOperations",
"SkusOperations",
"UpdateRunsOperations",
- "UpdateSummariesOperations",
"UpdatesOperations",
+ "UpdateSummariesOperations",
+ "ValidatedSolutionRecipesOperations",
]
-__all__.extend([p for p in _patch_all if p not in __all__])
+__all__.extend([p for p in _patch_all if p not in __all__]) # pyright: ignore
_patch_sdk()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_arc_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_arc_settings_operations.py
index 3bb5c547ac00..5918a1d3cb6d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_arc_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_arc_settings_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_list_by_cluster_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -83,7 +83,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -117,7 +117,7 @@ def build_create_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -154,7 +154,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -191,7 +191,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -225,7 +225,7 @@ def build_generate_password_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -259,7 +259,7 @@ def build_create_identity_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -293,7 +293,7 @@ def build_consent_and_install_default_extensions_request( # pylint: disable=nam
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -327,7 +327,7 @@ def build_initialize_disable_process_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -395,7 +395,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ArcSettingList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -476,7 +476,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -610,7 +610,7 @@ def create(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -754,7 +754,7 @@ def update(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -813,7 +813,7 @@ def update(
def _delete_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -941,7 +941,7 @@ def generate_password(
:rtype: ~azure.mgmt.azurestackhci.models.PasswordCredential
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -988,7 +988,7 @@ def generate_password(
def _create_identity_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1121,7 +1121,7 @@ def consent_and_install_default_extensions(
:rtype: ~azure.mgmt.azurestackhci.models.ArcSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1168,7 +1168,7 @@ def consent_and_install_default_extensions(
def _initialize_disable_process_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py
index 11118ad65e70..e00419e6dbd4 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_clusters_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +48,7 @@ def build_list_by_subscription_request(subscription_id: str, **kwargs: Any) -> H
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -72,7 +72,7 @@ def build_list_by_resource_group_request(resource_group_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -102,7 +102,7 @@ def build_get_request(resource_group_name: str, cluster_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -135,7 +135,7 @@ def build_create_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -171,7 +171,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -207,7 +207,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -234,13 +234,49 @@ def build_delete_request(
return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+def build_update_secrets_locations_request(
+ resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}/updateSecretsLocations",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "resourceGroupName": _SERIALIZER.url(
+ "resource_group_name", resource_group_name, "str", max_length=90, min_length=1
+ ),
+ "clusterName": _SERIALIZER.url("cluster_name", cluster_name, "str"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="POST", url=_url, params=_params, headers=_headers, **kwargs)
+
+
def build_upload_certificate_request(
resource_group_name: str, cluster_name: str, subscription_id: str, **kwargs: Any
) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -276,7 +312,7 @@ def build_create_identity_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -309,7 +345,7 @@ def build_extend_software_assurance_benefit_request( # pylint: disable=name-too
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -345,7 +381,7 @@ def build_trigger_log_collection_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -381,7 +417,7 @@ def build_configure_remote_support_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -444,7 +480,7 @@ def list_by_subscription(self, **kwargs: Any) -> Iterable["_models.Cluster"]:
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ClusterList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -522,7 +558,7 @@ def list_by_resource_group(self, resource_group_name: str, **kwargs: Any) -> Ite
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ClusterList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -597,7 +633,7 @@ def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -712,7 +748,7 @@ def create(
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -843,7 +879,7 @@ def update(
:rtype: ~azure.mgmt.azurestackhci.models.Cluster
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -899,7 +935,7 @@ def update(
return deserialized # type: ignore
def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1000,6 +1036,203 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
)
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
+ def _update_secrets_locations_initial(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: Union[_models.SecretsLocationsChangeRequest, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(body, (IOBase, bytes)):
+ _content = body
+ else:
+ _json = self._serialize.body(body, "SecretsLocationsChangeRequest")
+
+ _request = build_update_secrets_locations_request(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 202]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: _models.SecretsLocationsChangeRequest,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Required.
+ :type body: ~azure.mgmt.azurestackhci.models.SecretsLocationsChangeRequest
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either Cluster or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Required.
+ :type body: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either Cluster or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_update_secrets_locations(
+ self,
+ resource_group_name: str,
+ cluster_name: str,
+ body: Union[_models.SecretsLocationsChangeRequest, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.Cluster]:
+ """Update cluster secrets locations.
+
+ :param resource_group_name: The name of the resource group. The name is case insensitive.
+ Required.
+ :type resource_group_name: str
+ :param cluster_name: The name of the cluster. Required.
+ :type cluster_name: str
+ :param body: The content of the action request. Is either a SecretsLocationsChangeRequest type
+ or a IO[bytes] type. Required.
+ :type body: ~azure.mgmt.azurestackhci.models.SecretsLocationsChangeRequest or IO[bytes]
+ :return: An instance of LROPoller that returns either Cluster or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.Cluster]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.Cluster] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._update_secrets_locations_initial(
+ resource_group_name=resource_group_name,
+ cluster_name=cluster_name,
+ body=body,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("Cluster", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.Cluster].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.Cluster](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
def _upload_certificate_initial(
self,
resource_group_name: str,
@@ -1007,7 +1240,7 @@ def _upload_certificate_initial(
upload_certificate_request: Union[_models.UploadCertificateRequest, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1190,7 +1423,7 @@ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-
return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
def _create_identity_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1307,7 +1540,7 @@ def _extend_software_assurance_benefit_initial( # pylint: disable=name-too-long
software_assurance_change_request: Union[_models.SoftwareAssuranceChangeRequest, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1501,7 +1734,7 @@ def _trigger_log_collection_initial(
log_collection_request: Union[_models.LogCollectionRequest, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1698,7 +1931,7 @@ def _configure_remote_support_initial(
remote_support_request: Union[_models.RemoteSupportRequest, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_deployment_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_deployment_settings_operations.py
index c2e131079977..25a6f687454f 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_deployment_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_deployment_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_by_clusters_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +86,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -127,7 +126,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -170,7 +169,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -240,7 +239,7 @@ def list_by_clusters(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.DeploymentSettingListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -320,7 +319,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.DeploymentSetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -372,7 +371,7 @@ def _create_or_update_initial(
deployment_settings_name: str = "default",
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -578,7 +577,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, cluster_name: str, deployment_settings_name: str = "default", **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_device_jobs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_device_jobs_operations.py
new file mode 100644
index 000000000000..8bce6cf32dfd
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_device_jobs_operations.py
@@ -0,0 +1,647 @@
+# 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 io import IOBase
+import sys
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
+import urllib.parse
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ StreamClosedError,
+ StreamConsumedError,
+ map_error,
+)
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.polling import LROPoller, NoPolling, PollingMethod
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+from azure.mgmt.core.polling.arm_polling import ARMPolling
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_by_edge_device_request(resource_uri: str, edge_device_name: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs"
+ )
+ path_format_arguments = {
+ "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True),
+ "edgeDeviceName": _SERIALIZER.url("edge_device_name", edge_device_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_get_request(resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}"
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True),
+ "edgeDeviceName": _SERIALIZER.url("edge_device_name", edge_device_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ "jobsName": _SERIALIZER.url("jobs_name", jobs_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_create_or_update_request(
+ resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}"
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True),
+ "edgeDeviceName": _SERIALIZER.url("edge_device_name", edge_device_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ "jobsName": _SERIALIZER.url("jobs_name", jobs_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ if content_type is not None:
+ _headers["Content-Type"] = _SERIALIZER.header("content_type", content_type, "str")
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="PUT", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_delete_request(resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url", "/{resourceUri}/providers/Microsoft.AzureStackHCI/edgeDevices/{edgeDeviceName}/jobs/{jobsName}"
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, "str", skip_quote=True),
+ "edgeDeviceName": _SERIALIZER.url("edge_device_name", edge_device_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ "jobsName": _SERIALIZER.url("jobs_name", jobs_name, "str", pattern=r"^[a-zA-Z0-9-]{3,24}$"),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="DELETE", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class EdgeDeviceJobsOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.azurestackhci.AzureStackHCIClient`'s
+ :attr:`edge_device_jobs` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ 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
+ def list_by_edge_device(
+ self, resource_uri: str, edge_device_name: str, **kwargs: Any
+ ) -> Iterable["_models.EdgeDeviceJob"]:
+ """List EdgeDeviceJob resources by EdgeDevice.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :return: An iterator like instance of either EdgeDeviceJob or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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.EdgeDeviceJobListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_edge_device_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("EdgeDeviceJobListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = 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)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def get(self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any) -> _models.EdgeDeviceJob:
+ """Get a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :return: EdgeDeviceJob or the result of cls(response)
+ :rtype: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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.EdgeDeviceJob] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = 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("EdgeDeviceJob", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
+
+ def _create_or_update_initial(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: Union[_models.EdgeDeviceJob, IO[bytes]],
+ **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ content_type = content_type or "application/json"
+ _json = None
+ _content = None
+ if isinstance(resource, (IOBase, bytes)):
+ _content = resource
+ else:
+ _json = self._serialize.body(resource, "EdgeDeviceJob")
+
+ _request = build_create_or_update_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ content_type=content_type,
+ json=_json,
+ content=_content,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [200, 201]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 201:
+ response_headers["Azure-AsyncOperation"] = self._deserialize(
+ "str", response.headers.get("Azure-AsyncOperation")
+ )
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: _models.EdgeDeviceJob,
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Required.
+ :type resource: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob
+ :keyword content_type: Body Parameter content-type. Content type parameter for JSON body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @overload
+ def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: IO[bytes],
+ *,
+ content_type: str = "application/json",
+ **kwargs: Any
+ ) -> LROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Required.
+ :type resource: IO[bytes]
+ :keyword content_type: Body Parameter content-type. Content type parameter for binary body.
+ Default value is "application/json".
+ :paramtype content_type: str
+ :return: An instance of LROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+
+ @distributed_trace
+ def begin_create_or_update(
+ self,
+ resource_uri: str,
+ edge_device_name: str,
+ jobs_name: str,
+ resource: Union[_models.EdgeDeviceJob, IO[bytes]],
+ **kwargs: Any
+ ) -> LROPoller[_models.EdgeDeviceJob]:
+ """Create a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :param resource: Resource create parameters. Is either a EdgeDeviceJob type or a IO[bytes]
+ type. Required.
+ :type resource: ~azure.mgmt.azurestackhci.models.EdgeDeviceJob or IO[bytes]
+ :return: An instance of LROPoller that returns either EdgeDeviceJob or the result of
+ cls(response)
+ :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.azurestackhci.models.EdgeDeviceJob]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _headers = case_insensitive_dict(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))
+ content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
+ cls: ClsType[_models.EdgeDeviceJob] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._create_or_update_initial(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ resource=resource,
+ api_version=api_version,
+ content_type=content_type,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response):
+ deserialized = self._deserialize("EdgeDeviceJob", pipeline_response.http_response)
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+ return deserialized
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "azure-async-operation"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[_models.EdgeDeviceJob].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[_models.EdgeDeviceJob](
+ self._client, raw_result, get_long_running_output, polling_method # type: ignore
+ )
+
+ def _delete_initial(
+ self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any
+ ) -> Iterator[bytes]:
+ error_map: MutableMapping = {
+ 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[Iterator[bytes]] = kwargs.pop("cls", None)
+
+ _request = build_delete_request(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _decompress = kwargs.pop("decompress", True)
+ _stream = True
+ pipeline_response: PipelineResponse = self._client._pipeline.run( # pylint: disable=protected-access
+ _request, stream=_stream, **kwargs
+ )
+
+ response = pipeline_response.http_response
+
+ if response.status_code not in [202, 204]:
+ try:
+ response.read() # Load the body in memory and close the socket
+ except (StreamConsumedError, StreamClosedError):
+ pass
+ 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)
+
+ response_headers = {}
+ if response.status_code == 202:
+ response_headers["Location"] = self._deserialize("str", response.headers.get("Location"))
+ response_headers["Retry-After"] = self._deserialize("int", response.headers.get("Retry-After"))
+
+ deserialized = response.stream_download(self._client._pipeline, decompress=_decompress)
+
+ if cls:
+ return cls(pipeline_response, deserialized, response_headers) # type: ignore
+
+ return deserialized # type: ignore
+
+ @distributed_trace
+ def begin_delete(self, resource_uri: str, edge_device_name: str, jobs_name: str, **kwargs: Any) -> LROPoller[None]:
+ """Delete a EdgeDeviceJob.
+
+ :param resource_uri: The fully qualified Azure Resource manager identifier of the resource.
+ Required.
+ :type resource_uri: str
+ :param edge_device_name: The name of the EdgeDevice. Required.
+ :type edge_device_name: str
+ :param jobs_name: Name of EdgeDevice Job. Required.
+ :type jobs_name: str
+ :return: An instance of LROPoller that returns either None or the result of cls(response)
+ :rtype: ~azure.core.polling.LROPoller[None]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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[None] = kwargs.pop("cls", None)
+ polling: Union[bool, PollingMethod] = kwargs.pop("polling", True)
+ lro_delay = kwargs.pop("polling_interval", self._config.polling_interval)
+ cont_token: Optional[str] = kwargs.pop("continuation_token", None)
+ if cont_token is None:
+ raw_result = self._delete_initial(
+ resource_uri=resource_uri,
+ edge_device_name=edge_device_name,
+ jobs_name=jobs_name,
+ api_version=api_version,
+ cls=lambda x, y, z: x,
+ headers=_headers,
+ params=_params,
+ **kwargs
+ )
+ raw_result.http_response.read() # type: ignore
+ kwargs.pop("error_map", None)
+
+ def get_long_running_output(pipeline_response): # pylint: disable=inconsistent-return-statements
+ if cls:
+ return cls(pipeline_response, None, {}) # type: ignore
+
+ if polling is True:
+ polling_method: PollingMethod = cast(
+ PollingMethod, ARMPolling(lro_delay, lro_options={"final-state-via": "location"}, **kwargs)
+ )
+ elif polling is False:
+ polling_method = cast(PollingMethod, NoPolling())
+ else:
+ polling_method = polling
+ if cont_token:
+ return LROPoller[None].from_continuation_token(
+ polling_method=polling_method,
+ continuation_token=cont_token,
+ client=self._client,
+ deserialization_callback=get_long_running_output,
+ )
+ return LROPoller[None](self._client, raw_result, get_long_running_output, polling_method) # type: ignore
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_devices_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_devices_operations.py
index 0024b796a4e7..ee591374bf0d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_devices_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_edge_devices_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_uri: str, **kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -72,7 +71,7 @@ def build_get_request(resource_uri: str, edge_device_name: str = "default", **kw
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -97,7 +96,7 @@ def build_create_or_update_request(resource_uri: str, edge_device_name: str = "d
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -125,7 +124,7 @@ def build_delete_request(resource_uri: str, edge_device_name: str = "default", *
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -150,7 +149,7 @@ def build_validate_request(resource_uri: str, edge_device_name: str = "default",
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -212,7 +211,7 @@ def list(self, resource_uri: str, **kwargs: Any) -> Iterable["_models.EdgeDevice
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.EdgeDeviceListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -286,7 +285,7 @@ def get(self, resource_uri: str, edge_device_name: str = "default", **kwargs: An
:rtype: ~azure.mgmt.azurestackhci.models.EdgeDevice
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -335,7 +334,7 @@ def _create_or_update_initial(
edge_device_name: str = "default",
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -524,7 +523,7 @@ def get_long_running_output(pipeline_response):
)
def _delete_initial(self, resource_uri: str, edge_device_name: str = "default", **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -638,7 +637,7 @@ def _validate_initial(
edge_device_name: str = "default",
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_extensions_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_extensions_operations.py
index 347c045fd2b9..f46a1d09eb84 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_extensions_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_extensions_operations.py
@@ -1,4 +1,4 @@
-# pylint: disable=too-many-lines,too-many-statements
+# pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +8,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +36,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +50,7 @@ def build_list_by_arc_setting_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -89,7 +89,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +129,7 @@ def build_create_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -172,7 +172,7 @@ def build_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -215,7 +215,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -255,7 +255,7 @@ def build_upgrade_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -330,7 +330,7 @@ def list_by_arc_setting(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.ExtensionList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -414,7 +414,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.Extension
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -468,7 +468,7 @@ def _create_initial(
extension: Union[_models.Extension, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -687,7 +687,7 @@ def _update_initial(
extension: Union[_models.ExtensionPatch, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -900,7 +900,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, cluster_name: str, arc_setting_name: str, extension_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -1023,7 +1023,7 @@ def _upgrade_initial(
extension_upgrade_parameters: Union[_models.ExtensionUpgradeParameters, IO[bytes]],
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_offers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_offers_operations.py
index 245a00461fa3..5d4cb42aa7a6 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_offers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_offers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -51,7 +50,7 @@ def build_list_by_publisher_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +86,7 @@ def build_list_by_cluster_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +128,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -210,7 +209,7 @@ def list_by_publisher(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OfferList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -299,7 +298,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.OfferList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -391,7 +390,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.Offer
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py
index f52d1b8c662e..39387fb6f2ce 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,8 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
from azure.core.exceptions import (
ClientAuthenticationError,
@@ -17,6 +17,7 @@
ResourceNotModifiedError,
map_error,
)
+from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.rest import HttpRequest, HttpResponse
from azure.core.tracing.decorator import distributed_trace
@@ -29,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -41,7 +42,7 @@ def build_list_request(**kwargs: Any) -> HttpRequest:
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -76,49 +77,75 @@ def __init__(self, *args, **kwargs):
self._deserialize = input_args.pop(0) if input_args else kwargs.pop("deserializer")
@distributed_trace
- def list(self, **kwargs: Any) -> _models.OperationListResult:
- """List all available Microsoft.AzureStackHCI provider operations.
+ def list(self, **kwargs: Any) -> Iterable["_models.Operation"]:
+ """List the operations for the provider.
- :return: OperationListResult or the result of cls(response)
- :rtype: ~azure.mgmt.azurestackhci.models.OperationListResult
+ :return: An iterator like instance of either Operation or the result of cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestackhci.models.Operation]
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
- 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.OperationListResult] = kwargs.pop("cls", None)
- _request = build_list_request(
- api_version=api_version,
- headers=_headers,
- params=_params,
- )
- _request.url = self._client.format_url(_request.url)
-
- _stream = False
- pipeline_response: PipelineResponse = 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("OperationListResult", pipeline_response.http_response)
-
- if cls:
- return cls(pipeline_response, deserialized, {}) # type: ignore
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
- return deserialized # type: ignore
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_request(
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("OperationListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = 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)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_publishers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_publishers_operations.py
index 80c1cb9f78be..94b1ccf6fd61 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_publishers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_publishers_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -45,7 +44,7 @@ def build_list_by_cluster_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -78,7 +77,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -146,7 +145,7 @@ def list_by_cluster(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.PublisherList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -224,7 +223,7 @@ def get(self, resource_group_name: str, cluster_name: str, publisher_name: str,
:rtype: ~azure.mgmt.azurestackhci.models.Publisher
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_security_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_security_settings_operations.py
index 50cdaf9b7be6..5cc8a5dc6fe0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_security_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_security_settings_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_by_clusters_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -87,7 +86,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -127,7 +126,7 @@ def build_create_or_update_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -170,7 +169,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -240,7 +239,7 @@ def list_by_clusters(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SecuritySettingListResult] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -320,7 +319,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.SecuritySetting
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -372,7 +371,7 @@ def _create_or_update_initial(
security_settings_name: str = "default",
**kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -578,7 +577,7 @@ def get_long_running_output(pipeline_response):
def _delete_initial(
self, resource_group_name: str, cluster_name: str, security_settings_name: str = "default", **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_skus_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_skus_operations.py
index 952c762fb280..055e1145e718 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_skus_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_skus_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -7,7 +6,7 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
import sys
-from typing import Any, Callable, Dict, Iterable, Optional, Type, TypeVar
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
import urllib.parse
from azure.core.exceptions import (
@@ -31,7 +30,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -52,7 +51,7 @@ def build_list_by_offer_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -97,7 +96,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -182,7 +181,7 @@ def list_by_offer(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.SkuList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -279,7 +278,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.Sku
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_runs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_runs_operations.py
index 7137c3a98f09..261935f6482c 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_runs_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_runs_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_list_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -89,7 +88,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -129,7 +128,7 @@ def build_put_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -172,7 +171,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -243,7 +242,7 @@ def list(
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateRunList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -310,7 +309,7 @@ def get_next(next_link=None):
def _delete_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, update_run_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -523,7 +522,7 @@ def put(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -599,7 +598,7 @@ def get(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateRun
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_summaries_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_summaries_operations.py
index e3d799cf5430..865ea1548aa5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_summaries_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_update_summaries_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -48,7 +47,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -81,7 +80,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -112,7 +111,7 @@ def build_put_request(resource_group_name: str, cluster_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -146,7 +145,7 @@ def build_get_request(resource_group_name: str, cluster_name: str, subscription_
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -211,7 +210,7 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateSummariesList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -275,7 +274,7 @@ def get_next(next_link=None):
return ItemPaged(get_next, extract_data)
def _delete_initial(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -460,7 +459,7 @@ def put(
:rtype: ~azure.mgmt.azurestackhci.models.UpdateSummaries
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -528,7 +527,7 @@ def get(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> _mo
:rtype: ~azure.mgmt.azurestackhci.models.UpdateSummaries
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_updates_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_updates_operations.py
index 8932dff5387c..de5f97b4c2e7 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_updates_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_updates_operations.py
@@ -1,4 +1,3 @@
-# pylint: disable=too-many-lines,too-many-statements
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
@@ -8,7 +7,7 @@
# --------------------------------------------------------------------------
from io import IOBase
import sys
-from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, Type, TypeVar, Union, cast, overload
+from typing import Any, Callable, Dict, IO, Iterable, Iterator, Optional, TypeVar, Union, cast, overload
import urllib.parse
from azure.core.exceptions import (
@@ -36,7 +35,7 @@
if sys.version_info >= (3, 9):
from collections.abc import MutableMapping
else:
- from typing import MutableMapping # type: ignore # pylint: disable=ungrouped-imports
+ from typing import MutableMapping # type: ignore
T = TypeVar("T")
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
@@ -50,7 +49,7 @@ def build_post_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -82,7 +81,7 @@ def build_list_request(resource_group_name: str, cluster_name: str, subscription
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -115,7 +114,7 @@ def build_delete_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -149,7 +148,7 @@ def build_put_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
content_type: Optional[str] = kwargs.pop("content_type", _headers.pop("Content-Type", None))
accept = _headers.pop("Accept", "application/json")
@@ -186,7 +185,7 @@ def build_get_request(
_headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
_params = case_insensitive_dict(kwargs.pop("params", {}) or {})
- api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2024-04-01"))
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
accept = _headers.pop("Accept", "application/json")
# Construct URL
@@ -236,7 +235,7 @@ def __init__(self, *args, **kwargs):
def _post_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -370,7 +369,7 @@ def list(self, resource_group_name: str, cluster_name: str, **kwargs: Any) -> It
api_version: str = kwargs.pop("api_version", _params.pop("api-version", self._config.api_version))
cls: ClsType[_models.UpdateList] = kwargs.pop("cls", None)
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -436,7 +435,7 @@ def get_next(next_link=None):
def _delete_initial(
self, resource_group_name: str, cluster_name: str, update_name: str, **kwargs: Any
) -> Iterator[bytes]:
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -636,7 +635,7 @@ def put(
:rtype: ~azure.mgmt.azurestackhci.models.Update
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
@@ -707,7 +706,7 @@ def get(self, resource_group_name: str, cluster_name: str, update_name: str, **k
:rtype: ~azure.mgmt.azurestackhci.models.Update
:raises ~azure.core.exceptions.HttpResponseError:
"""
- error_map: MutableMapping[int, Type[HttpResponseError]] = {
+ error_map: MutableMapping = {
401: ClientAuthenticationError,
404: ResourceNotFoundError,
409: ResourceExistsError,
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_validated_solution_recipes_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_validated_solution_recipes_operations.py
new file mode 100644
index 000000000000..4ae0e8797da6
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/azure/mgmt/azurestackhci/operations/_validated_solution_recipes_operations.py
@@ -0,0 +1,257 @@
+# 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.
+# --------------------------------------------------------------------------
+import sys
+from typing import Any, Callable, Dict, Iterable, Optional, TypeVar
+import urllib.parse
+
+from azure.core.exceptions import (
+ ClientAuthenticationError,
+ HttpResponseError,
+ ResourceExistsError,
+ ResourceNotFoundError,
+ ResourceNotModifiedError,
+ map_error,
+)
+from azure.core.paging import ItemPaged
+from azure.core.pipeline import PipelineResponse
+from azure.core.rest import HttpRequest, HttpResponse
+from azure.core.tracing.decorator import distributed_trace
+from azure.core.utils import case_insensitive_dict
+from azure.mgmt.core.exceptions import ARMErrorFormat
+
+from .. import models as _models
+from .._serialization import Serializer
+
+if sys.version_info >= (3, 9):
+ from collections.abc import MutableMapping
+else:
+ from typing import MutableMapping # type: ignore
+T = TypeVar("T")
+ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]
+
+_SERIALIZER = Serializer()
+_SERIALIZER.client_side_validation = False
+
+
+def build_list_by_subscription_location_resource_request( # pylint: disable=name-too-long
+ location: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "location": _SERIALIZER.url("location", location, "str", min_length=1),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+def build_get_request(
+ location: str, validated_solution_recipe_name: str, subscription_id: str, **kwargs: Any
+) -> HttpRequest:
+ _headers = case_insensitive_dict(kwargs.pop("headers", {}) or {})
+ _params = case_insensitive_dict(kwargs.pop("params", {}) or {})
+
+ api_version: str = kwargs.pop("api_version", _params.pop("api-version", "2025-02-01-preview"))
+ accept = _headers.pop("Accept", "application/json")
+
+ # Construct URL
+ _url = kwargs.pop(
+ "template_url",
+ "/subscriptions/{subscriptionId}/providers/Microsoft.AzureStackHCI/locations/{location}/validatedSolutionRecipes/{validatedSolutionRecipeName}",
+ ) # pylint: disable=line-too-long
+ path_format_arguments = {
+ "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, "str"),
+ "location": _SERIALIZER.url("location", location, "str", min_length=1),
+ "validatedSolutionRecipeName": _SERIALIZER.url(
+ "validated_solution_recipe_name", validated_solution_recipe_name, "str", pattern=r"^[a-zA-Z0-9-.]{3,50}$"
+ ),
+ }
+
+ _url: str = _url.format(**path_format_arguments) # type: ignore
+
+ # Construct parameters
+ _params["api-version"] = _SERIALIZER.query("api_version", api_version, "str")
+
+ # Construct headers
+ _headers["Accept"] = _SERIALIZER.header("accept", accept, "str")
+
+ return HttpRequest(method="GET", url=_url, params=_params, headers=_headers, **kwargs)
+
+
+class ValidatedSolutionRecipesOperations:
+ """
+ .. warning::
+ **DO NOT** instantiate this class directly.
+
+ Instead, you should access the following operations through
+ :class:`~azure.mgmt.azurestackhci.AzureStackHCIClient`'s
+ :attr:`validated_solution_recipes` attribute.
+ """
+
+ models = _models
+
+ def __init__(self, *args, **kwargs):
+ 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
+ def list_by_subscription_location_resource(
+ self, location: str, **kwargs: Any
+ ) -> Iterable["_models.ValidatedSolutionRecipe"]:
+ """List all validated solution recipes.
+
+ :param location: The name of the Azure region. Required.
+ :type location: str
+ :return: An iterator like instance of either ValidatedSolutionRecipe or the result of
+ cls(response)
+ :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe]
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ _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.ValidatedSolutionRecipeListResult] = kwargs.pop("cls", None)
+
+ error_map: MutableMapping = {
+ 401: ClientAuthenticationError,
+ 404: ResourceNotFoundError,
+ 409: ResourceExistsError,
+ 304: ResourceNotModifiedError,
+ }
+ error_map.update(kwargs.pop("error_map", {}) or {})
+
+ def prepare_request(next_link=None):
+ if not next_link:
+
+ _request = build_list_by_subscription_location_resource_request(
+ location=location,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ else:
+ # make call to next link with the client's api-version
+ _parsed_next_link = urllib.parse.urlparse(next_link)
+ _next_request_params = case_insensitive_dict(
+ {
+ key: [urllib.parse.quote(v) for v in value]
+ for key, value in urllib.parse.parse_qs(_parsed_next_link.query).items()
+ }
+ )
+ _next_request_params["api-version"] = self._config.api_version
+ _request = HttpRequest(
+ "GET", urllib.parse.urljoin(next_link, _parsed_next_link.path), params=_next_request_params
+ )
+ _request.url = self._client.format_url(_request.url)
+ _request.method = "GET"
+ return _request
+
+ def extract_data(pipeline_response):
+ deserialized = self._deserialize("ValidatedSolutionRecipeListResult", pipeline_response)
+ list_of_elem = deserialized.value
+ if cls:
+ list_of_elem = cls(list_of_elem) # type: ignore
+ return deserialized.next_link or None, iter(list_of_elem)
+
+ def get_next(next_link=None):
+ _request = prepare_request(next_link)
+
+ _stream = False
+ pipeline_response: PipelineResponse = 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)
+
+ return pipeline_response
+
+ return ItemPaged(get_next, extract_data)
+
+ @distributed_trace
+ def get(self, location: str, validated_solution_recipe_name: str, **kwargs: Any) -> _models.ValidatedSolutionRecipe:
+ """Get a validated solution recipe.
+
+ :param location: The name of the Azure region. Required.
+ :type location: str
+ :param validated_solution_recipe_name: The name of the ValidatedSolutionRecipe. Required.
+ :type validated_solution_recipe_name: str
+ :return: ValidatedSolutionRecipe or the result of cls(response)
+ :rtype: ~azure.mgmt.azurestackhci.models.ValidatedSolutionRecipe
+ :raises ~azure.core.exceptions.HttpResponseError:
+ """
+ error_map: MutableMapping = {
+ 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.ValidatedSolutionRecipe] = kwargs.pop("cls", None)
+
+ _request = build_get_request(
+ location=location,
+ validated_solution_recipe_name=validated_solution_recipe_name,
+ subscription_id=self._config.subscription_id,
+ api_version=api_version,
+ headers=_headers,
+ params=_params,
+ )
+ _request.url = self._client.format_url(_request.url)
+
+ _stream = False
+ pipeline_response: PipelineResponse = 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("ValidatedSolutionRecipe", pipeline_response.http_response)
+
+ if cls:
+ return cls(pipeline_response, deserialized, {}) # type: ignore
+
+ return deserialized # type: ignore
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/clusters_update_secrets_locations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/clusters_update_secrets_locations.py
new file mode 100644
index 000000000000..2f56b44094df
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/clusters_update_secrets_locations.py
@@ -0,0 +1,43 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python clusters_update_secrets_locations.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="fd3c3665-1729-4b7b-9a38-238e83b0f98b",
+ )
+
+ response = client.clusters.begin_update_secrets_locations(
+ resource_group_name="test-rg",
+ cluster_name="myCluster",
+ body={"properties": [{"secretsLocation": "https://kvname.vault.azure.net/", "secretsType": "BackupSecrets"}]},
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/Clusters_UpdateSecretsLocations.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/configure_remote_support.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/configure_remote_support.py
index 55dacc4e72f1..138b979d69e3 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/configure_remote_support.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/configure_remote_support.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ConfigureRemoteSupport.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ConfigureRemoteSupport.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/consent_and_install_default_extensions.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/consent_and_install_default_extensions.py
index f3eede4c2e11..b2a720a057e3 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/consent_and_install_default_extensions.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/consent_and_install_default_extensions.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ConsentAndInstallDefaultExtensions.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ConsentAndInstallDefaultExtensions.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_arc_identity.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_arc_identity.py
index 83b1b60a04c2..fddf927530c5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_arc_identity.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_arc_identity.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/CreateArcIdentity.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/CreateArcIdentity.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster.py
index 7a0d8cc6bc07..e8baa338fb00 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/CreateCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/CreateCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster_identity.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster_identity.py
index 8c860dc1c374..fedcccd82cee 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster_identity.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_cluster_identity.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/CreateClusterIdentity.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/CreateClusterIdentity.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_hci_edge_device.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_hci_edge_device.py
index 9fe8a6f3be8a..0a2baab7793e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_hci_edge_device.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/create_hci_edge_device.py
@@ -57,6 +57,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/CreateHciEdgeDevice.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/CreateHciEdgeDevice.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_arc_setting.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_arc_setting.py
index 443cd4288438..90b0ed3ec91b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_arc_setting.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_arc_setting.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteArcSetting.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteArcSetting.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_cluster.py
index 21247f1eaaad..85920270e3ff 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_cluster.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_deployment_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_deployment_settings.py
index cd236f46286a..80c2bb969994 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_deployment_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_deployment_settings.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteDeploymentSettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteDeploymentSettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_edge_devices.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_edge_devices.py
index f261eaf32072..396bd376dad0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_edge_devices.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_edge_devices.py
@@ -35,6 +35,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteEdgeDevices.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteEdgeDevices.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_extension.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_extension.py
index 99799fbf7001..712f0c32c3d5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_extension.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_extension.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteExtension.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteExtension.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_security_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_security_settings.py
index aecefe991245..d2ad5ec10903 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_security_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_security_settings.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteSecuritySettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteSecuritySettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_runs.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_runs.py
index 162d7cc3d707..0be7fac70552 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_runs.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_runs.py
@@ -38,6 +38,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteUpdateRuns.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteUpdateRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_summaries.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_summaries.py
index 0deeeaade7fe..dd1bdf430d84 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_summaries.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_update_summaries.py
@@ -36,6 +36,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteUpdateSummaries.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteUpdateSummaries.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_updates.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_updates.py
index abb71feef3ad..9c5d1d6e08d9 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_updates.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/delete_updates.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/DeleteUpdates.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/DeleteUpdates.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_collect_log.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_collect_log.py
new file mode 100644
index 000000000000..726b46d9cdff
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_collect_log.py
@@ -0,0 +1,51 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python edge_device_jobs_create_or_update_collect_log.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ response = client.edge_device_jobs.begin_create_or_update(
+ resource_uri="subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1",
+ edge_device_name="default",
+ jobs_name="collectLog",
+ resource={
+ "kind": "HCI",
+ "properties": {
+ "fromDate": "2024-01-29T10:43:27.9471574Z",
+ "jobType": "CollectLog",
+ "toDate": "2024-01-29T10:43:27.9471574Z",
+ },
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/EdgeDeviceJobs_CreateOrUpdate_CollectLog.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_remote_support.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_remote_support.py
new file mode 100644
index 000000000000..b7f612e7969d
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_create_or_update_remote_support.py
@@ -0,0 +1,52 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python edge_device_jobs_create_or_update_remote_support.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ response = client.edge_device_jobs.begin_create_or_update(
+ resource_uri="subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1",
+ edge_device_name="default",
+ jobs_name="collectLog",
+ resource={
+ "kind": "HCI",
+ "properties": {
+ "accessLevel": "Diagnostics",
+ "expirationTimestamp": "2024-01-29T10:43:27.9471574Z",
+ "jobType": "RemoteSupport",
+ "type": "Enable",
+ },
+ },
+ ).result()
+ print(response)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/EdgeDeviceJobs_CreateOrUpdate_RemoteSupport.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_delete.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_delete.py
new file mode 100644
index 000000000000..b7ecc715d58b
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_delete.py
@@ -0,0 +1,42 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python edge_device_jobs_delete.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ client.edge_device_jobs.begin_delete(
+ resource_uri="subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1",
+ edge_device_name="lAq",
+ jobs_name="Ihlm3R-bZ4vTC4ABA456",
+ ).result()
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/EdgeDeviceJobs_Delete.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_get_remote_support.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_get_remote_support.py
new file mode 100644
index 000000000000..6687e5a05d1b
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_get_remote_support.py
@@ -0,0 +1,43 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python edge_device_jobs_get_remote_support.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ response = client.edge_device_jobs.get(
+ resource_uri="subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1",
+ edge_device_name="-5M1G7G10OZ-o5b-HS3-c72",
+ jobs_name="-oUxs",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/EdgeDeviceJobs_Get_RemoteSupport.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_list_by_edge_device.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_list_by_edge_device.py
new file mode 100644
index 000000000000..f745fec8d948
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/edge_device_jobs_list_by_edge_device.py
@@ -0,0 +1,43 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python edge_device_jobs_list_by_edge_device.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="SUBSCRIPTION_ID",
+ )
+
+ response = client.edge_device_jobs.list_by_edge_device(
+ resource_uri="subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/ArcInstance-rg/providers/Microsoft.HybridCompute/machines/Node-1",
+ edge_device_name="YE-855IEIN585-",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/EdgeDeviceJobs_ListByEdgeDevice.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extend_software_assurance_benefit.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extend_software_assurance_benefit.py
index f78b41f451f2..61b6204965e0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extend_software_assurance_benefit.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extend_software_assurance_benefit.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ExtendSoftwareAssuranceBenefit.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ExtendSoftwareAssuranceBenefit.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extensions_upgrade.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extensions_upgrade.py
index bc0beaa7f892..0c962c3a5459 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extensions_upgrade.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/extensions_upgrade.py
@@ -39,6 +39,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/Extensions_Upgrade.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/Extensions_Upgrade.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/generate_password.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/generate_password.py
index 80a13f7e3706..d213a5ece4b7 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/generate_password.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/generate_password.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GeneratePassword.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GeneratePassword.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_arc_setting.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_arc_setting.py
index 1de26279bf60..3697ec2d2f18 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_arc_setting.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_arc_setting.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetArcSetting.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetArcSetting.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_cluster.py
index ff2e1f696352..5817cdefee30 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_cluster.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_deployment_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_deployment_settings.py
index 3b80950e5927..cad5b40f72ae 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_deployment_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_deployment_settings.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetDeploymentSettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetDeploymentSettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_edge_devices.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_edge_devices.py
index 228b23fc744c..8b4b6c8cec4d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_edge_devices.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_edge_devices.py
@@ -36,6 +36,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetEdgeDevices.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetEdgeDevices.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_extension.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_extension.py
index d9c88b1ef2d2..aa396f9d9e4f 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_extension.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_extension.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetExtension.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetExtension.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_offer.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_offer.py
index aeb7ca479b79..9b819aa80581 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_offer.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_offer.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetOffer.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetOffer.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_publisher.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_publisher.py
index 6a83931928f3..7adc97fddc2c 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_publisher.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_publisher.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetPublisher.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetPublisher.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_security_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_security_settings.py
index a29a0f1dedd3..63304dcd56af 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_security_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_security_settings.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetSecuritySettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetSecuritySettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_sku.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_sku.py
index bc48dcf9b23c..30dbbafc5467 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_sku.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_sku.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetSku.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetSku.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_runs.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_runs.py
index 85ebdd02311d..24c6b30c1f9e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_runs.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_runs.py
@@ -39,6 +39,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetUpdateRuns.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetUpdateRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_summaries.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_summaries.py
index 086099879925..f4f677350965 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_summaries.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_update_summaries.py
@@ -37,6 +37,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetUpdateSummaries.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetUpdateSummaries.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_updates.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_updates.py
index 546864198087..aa0ad6d95891 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_updates.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/get_updates.py
@@ -38,6 +38,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/GetUpdates.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/GetUpdates.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/initialize_disable_process.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/initialize_disable_process.py
index 0bd99fa93554..efb0efce2fff 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/initialize_disable_process.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/initialize_disable_process.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/InitializeDisableProcess.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/InitializeDisableProcess.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_arc_settings_by_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_arc_settings_by_cluster.py
index 55f2ae18c3ce..3301d85bf0fe 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_arc_settings_by_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_arc_settings_by_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListArcSettingsByCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListArcSettingsByCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_resource_group.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_resource_group.py
index 8b0b66000dea..e58de00ac63a 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_resource_group.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_resource_group.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListClustersByResourceGroup.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListClustersByResourceGroup.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_subscription.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_subscription.py
index 9bcd269d531f..45b22e251be8 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_subscription.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_clusters_by_subscription.py
@@ -35,6 +35,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListClustersBySubscription.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListClustersBySubscription.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_deployment_settings_by_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_deployment_settings_by_cluster.py
index fbc026bb9fd8..477b13821c51 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_deployment_settings_by_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_deployment_settings_by_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListDeploymentSettingsByCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListDeploymentSettingsByCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_edge_devices.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_edge_devices.py
index 1330a9e554bb..2503a63eedd0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_edge_devices.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_edge_devices.py
@@ -37,6 +37,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListEdgeDevices.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListEdgeDevices.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_extensions_by_arc_setting.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_extensions_by_arc_setting.py
index 1c864d52b153..423a9b6f93eb 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_extensions_by_arc_setting.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_extensions_by_arc_setting.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListExtensionsByArcSetting.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListExtensionsByArcSetting.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_cluster.py
index bd7e0723602e..fe4809ded54b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListOffersByCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListOffersByCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_publisher.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_publisher.py
index be27cc21e4b9..52eda9b42337 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_publisher.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_offers_by_publisher.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListOffersByPublisher.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListOffersByPublisher.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_publishers_by_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_publishers_by_cluster.py
index 77550dbbd3a8..b9c73eb3a91e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_publishers_by_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_publishers_by_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListPublishersByCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListPublishersByCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_security_settings_by_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_security_settings_by_cluster.py
index 2be2a2fc7e13..c891cc6826f5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_security_settings_by_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_security_settings_by_cluster.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListSecuritySettingsByCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListSecuritySettingsByCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_skus_by_offer.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_skus_by_offer.py
index d130a53b57c1..5b94efd3e290 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_skus_by_offer.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_skus_by_offer.py
@@ -40,6 +40,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListSkusByOffer.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListSkusByOffer.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_runs.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_runs.py
index 4bcc73bef2c1..20031dc0352f 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_runs.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_runs.py
@@ -39,6 +39,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListUpdateRuns.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListUpdateRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_summaries.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_summaries.py
index 50e3f08e336b..37be7dc1f177 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_summaries.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_update_summaries.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListUpdateSummaries.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListUpdateSummaries.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_updates.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_updates.py
index 25de657d5478..95aab3b7c399 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_updates.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_updates.py
@@ -38,6 +38,6 @@ def main():
print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/ListUpdates.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ListUpdates.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/operations_list.py
similarity index 88%
rename from sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_operations.py
rename to sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/operations_list.py
index 299e0fbeebb1..531d3607cb46 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/list_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/operations_list.py
@@ -15,7 +15,7 @@
pip install azure-identity
pip install azure-mgmt-azurestackhci
# USAGE
- python list_operations.py
+ python operations_list.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
@@ -31,9 +31,10 @@ def main():
)
response = client.operations.list()
- print(response)
+ for item in response:
+ print(item)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/operations/stable/2024-04-01/examples/ListOperations.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/operations/preview/2025-02-01-preview/examples/Operations_List.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_arc_setting.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_arc_setting.py
index 9a0147936c40..248bde1e7018 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_arc_setting.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_arc_setting.py
@@ -46,6 +46,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PatchArcSetting.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PatchArcSetting.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_extension.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_extension.py
index e89b82104399..032b5089e948 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_extension.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/patch_extension.py
@@ -49,6 +49,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PatchExtension.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PatchExtension.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/post_updates.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/post_updates.py
index 327d1fe498b7..9f50952b45e3 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/post_updates.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/post_updates.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PostUpdates.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PostUpdates.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_deployment_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_deployment_settings.py
index bf66a48952af..dcf0a067949b 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_deployment_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_deployment_settings.py
@@ -47,6 +47,7 @@ def main():
"cluster": {
"azureServiceEndpoint": "core.windows.net",
"cloudAccountName": "myasestoragacct",
+ "hardwareClass": "Medium",
"name": "testHCICluster",
"witnessPath": "Cloud",
"witnessType": "Cloud",
@@ -180,6 +181,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutDeploymentSettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutDeploymentSettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_extension.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_extension.py
index 3cd16523fc9e..351d4b75f3ae 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_extension.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_extension.py
@@ -51,6 +51,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutExtension.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutExtension.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_security_settings.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_security_settings.py
index 127ab2d7eef3..e9a40a0efd41 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_security_settings.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_security_settings.py
@@ -44,6 +44,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutSecuritySettings.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutSecuritySettings.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_runs.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_runs.py
index bdcf92d50900..eac0bc9a9cb0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_runs.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_runs.py
@@ -64,6 +64,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutUpdateRuns.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutUpdateRuns.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_summaries.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_summaries.py
index 22578e6fc752..9701d2527b74 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_summaries.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_update_summaries.py
@@ -47,6 +47,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutUpdateSummaries.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutUpdateSummaries.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_updates.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_updates.py
index 80b39ee72db3..54144a469398 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_updates.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/put_updates.py
@@ -65,6 +65,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/PutUpdates.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/PutUpdates.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/trigger_log_collection.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/trigger_log_collection.py
index 6b9f4c3fd3ab..0e483d5e5697 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/trigger_log_collection.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/trigger_log_collection.py
@@ -40,6 +40,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/TriggerLogCollection.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/TriggerLogCollection.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/update_cluster.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/update_cluster.py
index 7c72f4ccb205..d49161b9e724 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/update_cluster.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/update_cluster.py
@@ -45,6 +45,6 @@ def main():
print(response)
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/UpdateCluster.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/UpdateCluster.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/upload_certificate.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/upload_certificate.py
index 70949ff15cf3..a915f770ef2a 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/upload_certificate.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/upload_certificate.py
@@ -37,6 +37,6 @@ def main():
).result()
-# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/stable/2024-04-01/examples/UploadCertificate.json
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/UploadCertificate.json
if __name__ == "__main__":
main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_get.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_get.py
new file mode 100644
index 000000000000..397f4367104c
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_get.py
@@ -0,0 +1,42 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python validated_solution_recipes_get.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="b8d594e5-51f3-4c11-9c54-a7771b81c712",
+ )
+
+ response = client.validated_solution_recipes.get(
+ location="westus2",
+ validated_solution_recipe_name="10.2408.0",
+ )
+ print(response)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ValidatedSolutionRecipes_Get.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_list_by_subscription_location_resource.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_list_by_subscription_location_resource.py
new file mode 100644
index 000000000000..299a6d471224
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_samples/validated_solution_recipes_list_by_subscription_location_resource.py
@@ -0,0 +1,42 @@
+# 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 azure.identity import DefaultAzureCredential
+
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+"""
+# PREREQUISITES
+ pip install azure-identity
+ pip install azure-mgmt-azurestackhci
+# USAGE
+ python validated_solution_recipes_list_by_subscription_location_resource.py
+
+ Before run the sample, please set the values of the client ID, tenant ID and client secret
+ of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
+ AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
+ https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
+"""
+
+
+def main():
+ client = AzureStackHCIClient(
+ credential=DefaultAzureCredential(),
+ subscription_id="b8d594e5-51f3-4c11-9c54-a7771b81c712",
+ )
+
+ response = client.validated_solution_recipes.list_by_subscription_location_resource(
+ location="westus2",
+ )
+ for item in response:
+ print(item)
+
+
+# x-ms-original-file: specification/azurestackhci/resource-manager/Microsoft.AzureStackHCI/StackHCI/preview/2025-02-01-preview/examples/ValidatedSolutionRecipes_ListBySubscriptionLocationResource.json
+if __name__ == "__main__":
+ main()
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/conftest.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/conftest.py
index 06f4bcf79e6c..98cefa9d21b3 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/conftest.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/conftest.py
@@ -18,7 +18,7 @@
load_dotenv()
-# aovid record sensitive identity information in recordings
+# For security, please avoid record sensitive identity information in recordings
@pytest.fixture(scope="session", autouse=True)
def add_sanitizers(test_proxy):
azurestackhci_subscription_id = os.environ.get("AZURE_SUBSCRIPTION_ID", "00000000-0000-0000-0000-000000000000")
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations.py
index 215715697c64..f1a2c27bbe6d 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_cluster(self, resource_group):
+ def test_arc_settings_list_by_cluster(self, resource_group):
response = self.client.arc_settings.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_arc_settings_get(self, resource_group):
response = self.client.arc_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_arc_settings_create(self, resource_group):
response = self.client.arc_settings.create(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -75,7 +75,7 @@ def test_create(self, resource_group):
},
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -83,13 +83,13 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_arc_settings_update(self, resource_group):
response = self.client.arc_settings.update(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
arc_setting={"connectivityProperties": {}, "tags": {"str": "str"}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -97,12 +97,12 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_arc_settings_begin_delete(self, resource_group):
response = self.client.arc_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -110,12 +110,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_generate_password(self, resource_group):
+ def test_arc_settings_generate_password(self, resource_group):
response = self.client.arc_settings.generate_password(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -123,12 +123,12 @@ def test_generate_password(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_identity(self, resource_group):
+ def test_arc_settings_begin_create_identity(self, resource_group):
response = self.client.arc_settings.begin_create_identity(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -136,12 +136,12 @@ def test_begin_create_identity(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_consent_and_install_default_extensions(self, resource_group):
+ def test_arc_settings_consent_and_install_default_extensions(self, resource_group):
response = self.client.arc_settings.consent_and_install_default_extensions(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -149,12 +149,12 @@ def test_consent_and_install_default_extensions(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_initialize_disable_process(self, resource_group):
+ def test_arc_settings_begin_initialize_disable_process(self, resource_group):
response = self.client.arc_settings.begin_initialize_disable_process(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations_async.py
index 5dec219037fb..e3ca81237a65 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_arc_settings_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_cluster(self, resource_group):
+ async def test_arc_settings_list_by_cluster(self, resource_group):
response = self.client.arc_settings.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_arc_settings_get(self, resource_group):
response = await self.client.arc_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_arc_settings_create(self, resource_group):
response = await self.client.arc_settings.create(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -76,7 +76,7 @@ async def test_create(self, resource_group):
},
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -84,13 +84,13 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_arc_settings_update(self, resource_group):
response = await self.client.arc_settings.update(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
arc_setting={"connectivityProperties": {}, "tags": {"str": "str"}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -98,13 +98,13 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_arc_settings_begin_delete(self, resource_group):
response = await (
await self.client.arc_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -113,12 +113,12 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_generate_password(self, resource_group):
+ async def test_arc_settings_generate_password(self, resource_group):
response = await self.client.arc_settings.generate_password(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -126,13 +126,13 @@ async def test_generate_password(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_identity(self, resource_group):
+ async def test_arc_settings_begin_create_identity(self, resource_group):
response = await (
await self.client.arc_settings.begin_create_identity(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -141,12 +141,12 @@ async def test_begin_create_identity(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_consent_and_install_default_extensions(self, resource_group):
+ async def test_arc_settings_consent_and_install_default_extensions(self, resource_group):
response = await self.client.arc_settings.consent_and_install_default_extensions(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -154,13 +154,13 @@ async def test_consent_and_install_default_extensions(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_initialize_disable_process(self, resource_group):
+ async def test_arc_settings_begin_initialize_disable_process(self, resource_group):
response = await (
await self.client.arc_settings.begin_initialize_disable_process(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations.py
index 8c4c30e95932..f7b7d1d04730 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations.py
@@ -20,9 +20,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_subscription(self, resource_group):
+ def test_clusters_list_by_subscription(self, resource_group):
response = self.client.clusters.list_by_subscription(
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -30,10 +30,10 @@ def test_list_by_subscription(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_resource_group(self, resource_group):
+ def test_clusters_list_by_resource_group(self, resource_group):
response = self.client.clusters.list_by_resource_group(
resource_group_name=resource_group.name,
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -41,11 +41,11 @@ def test_list_by_resource_group(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_clusters_get(self, resource_group):
response = self.client.clusters.get(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -53,7 +53,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_create(self, resource_group):
+ def test_clusters_create(self, resource_group):
response = self.client.clusters.create(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -66,6 +66,7 @@ def test_create(self, resource_group):
"billingModel": "str",
"cloudId": "str",
"cloudManagementEndpoint": "str",
+ "clusterPattern": "str",
"connectivityStatus": "str",
"desiredProperties": {"diagnosticLevel": "str", "windowsServerSubscription": "str"},
"id": "str",
@@ -76,6 +77,7 @@ def test_create(self, resource_group):
},
"lastBillingTimestamp": "2020-02-20 00:00:00",
"lastSyncTimestamp": "2020-02-20 00:00:00",
+ "localAvailabilityZones": [{"localAvailabilityZoneName": "str", "nodes": ["str"]}],
"logCollectionProperties": {
"fromDate": "2020-02-20 00:00:00",
"lastLogGenerated": "2020-02-20 00:00:00",
@@ -129,6 +131,7 @@ def test_create(self, resource_group):
"clusterType": "str",
"clusterVersion": "str",
"diagnosticLevel": "str",
+ "hardwareClass": "Medium",
"imdsAttestation": "str",
"lastUpdated": "2020-02-20 00:00:00",
"manufacturer": "str",
@@ -155,6 +158,7 @@ def test_create(self, resource_group):
"supportedCapabilities": ["str"],
},
"resourceProviderObjectId": "str",
+ "secretsLocations": [{"secretsLocation": "str", "secretsType": "str"}],
"serviceEndpoint": "str",
"softwareAssuranceProperties": {
"lastUpdated": "2020-02-20 00:00:00",
@@ -176,7 +180,7 @@ def test_create(self, resource_group):
"type": "str",
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -184,7 +188,7 @@ def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_update(self, resource_group):
+ def test_clusters_update(self, resource_group):
response = self.client.clusters.update(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -199,7 +203,7 @@ def test_update(self, resource_group):
"type": "str",
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -207,11 +211,11 @@ def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_clusters_begin_delete(self, resource_group):
response = self.client.clusters.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -219,12 +223,25 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_upload_certificate(self, resource_group):
+ def test_clusters_begin_update_secrets_locations(self, resource_group):
+ response = self.client.clusters.begin_update_secrets_locations(
+ resource_group_name=resource_group.name,
+ cluster_name="str",
+ body={"properties": [{"secretsLocation": "str", "secretsType": "str"}]},
+ api_version="2025-02-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_clusters_begin_upload_certificate(self, resource_group):
response = self.client.clusters.begin_upload_certificate(
resource_group_name=resource_group.name,
cluster_name="str",
upload_certificate_request={"properties": {"certificates": ["str"]}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -232,11 +249,11 @@ def test_begin_upload_certificate(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_identity(self, resource_group):
+ def test_clusters_begin_create_identity(self, resource_group):
response = self.client.clusters.begin_create_identity(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -244,12 +261,12 @@ def test_begin_create_identity(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_extend_software_assurance_benefit(self, resource_group):
+ def test_clusters_begin_extend_software_assurance_benefit(self, resource_group):
response = self.client.clusters.begin_extend_software_assurance_benefit(
resource_group_name=resource_group.name,
cluster_name="str",
software_assurance_change_request={"properties": {"softwareAssuranceIntent": "str"}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -257,12 +274,12 @@ def test_begin_extend_software_assurance_benefit(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_trigger_log_collection(self, resource_group):
+ def test_clusters_begin_trigger_log_collection(self, resource_group):
response = self.client.clusters.begin_trigger_log_collection(
resource_group_name=resource_group.name,
cluster_name="str",
log_collection_request={"properties": {"fromDate": "2020-02-20 00:00:00", "toDate": "2020-02-20 00:00:00"}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -270,7 +287,7 @@ def test_begin_trigger_log_collection(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_configure_remote_support(self, resource_group):
+ def test_clusters_begin_configure_remote_support(self, resource_group):
response = self.client.clusters.begin_configure_remote_support(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -281,7 +298,7 @@ def test_begin_configure_remote_support(self, resource_group):
"remoteSupportType": "str",
}
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations_async.py
index d3fd2e9c66c9..37897ca70182 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_clusters_operations_async.py
@@ -21,9 +21,9 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_subscription(self, resource_group):
+ async def test_clusters_list_by_subscription(self, resource_group):
response = self.client.clusters.list_by_subscription(
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -31,10 +31,10 @@ async def test_list_by_subscription(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_resource_group(self, resource_group):
+ async def test_clusters_list_by_resource_group(self, resource_group):
response = self.client.clusters.list_by_resource_group(
resource_group_name=resource_group.name,
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -42,11 +42,11 @@ async def test_list_by_resource_group(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_clusters_get(self, resource_group):
response = await self.client.clusters.get(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -54,7 +54,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_create(self, resource_group):
+ async def test_clusters_create(self, resource_group):
response = await self.client.clusters.create(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -67,6 +67,7 @@ async def test_create(self, resource_group):
"billingModel": "str",
"cloudId": "str",
"cloudManagementEndpoint": "str",
+ "clusterPattern": "str",
"connectivityStatus": "str",
"desiredProperties": {"diagnosticLevel": "str", "windowsServerSubscription": "str"},
"id": "str",
@@ -77,6 +78,7 @@ async def test_create(self, resource_group):
},
"lastBillingTimestamp": "2020-02-20 00:00:00",
"lastSyncTimestamp": "2020-02-20 00:00:00",
+ "localAvailabilityZones": [{"localAvailabilityZoneName": "str", "nodes": ["str"]}],
"logCollectionProperties": {
"fromDate": "2020-02-20 00:00:00",
"lastLogGenerated": "2020-02-20 00:00:00",
@@ -130,6 +132,7 @@ async def test_create(self, resource_group):
"clusterType": "str",
"clusterVersion": "str",
"diagnosticLevel": "str",
+ "hardwareClass": "Medium",
"imdsAttestation": "str",
"lastUpdated": "2020-02-20 00:00:00",
"manufacturer": "str",
@@ -156,6 +159,7 @@ async def test_create(self, resource_group):
"supportedCapabilities": ["str"],
},
"resourceProviderObjectId": "str",
+ "secretsLocations": [{"secretsLocation": "str", "secretsType": "str"}],
"serviceEndpoint": "str",
"softwareAssuranceProperties": {
"lastUpdated": "2020-02-20 00:00:00",
@@ -177,7 +181,7 @@ async def test_create(self, resource_group):
"type": "str",
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -185,7 +189,7 @@ async def test_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_update(self, resource_group):
+ async def test_clusters_update(self, resource_group):
response = await self.client.clusters.update(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -200,7 +204,7 @@ async def test_update(self, resource_group):
"type": "str",
"userAssignedIdentities": {"str": {"clientId": "str", "principalId": "str"}},
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -208,12 +212,12 @@ async def test_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_clusters_begin_delete(self, resource_group):
response = await (
await self.client.clusters.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -222,13 +226,28 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_upload_certificate(self, resource_group):
+ async def test_clusters_begin_update_secrets_locations(self, resource_group):
+ response = await (
+ await self.client.clusters.begin_update_secrets_locations(
+ resource_group_name=resource_group.name,
+ cluster_name="str",
+ body={"properties": [{"secretsLocation": "str", "secretsType": "str"}]},
+ api_version="2025-02-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_clusters_begin_upload_certificate(self, resource_group):
response = await (
await self.client.clusters.begin_upload_certificate(
resource_group_name=resource_group.name,
cluster_name="str",
upload_certificate_request={"properties": {"certificates": ["str"]}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -237,12 +256,12 @@ async def test_begin_upload_certificate(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_identity(self, resource_group):
+ async def test_clusters_begin_create_identity(self, resource_group):
response = await (
await self.client.clusters.begin_create_identity(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -251,13 +270,13 @@ async def test_begin_create_identity(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_extend_software_assurance_benefit(self, resource_group):
+ async def test_clusters_begin_extend_software_assurance_benefit(self, resource_group):
response = await (
await self.client.clusters.begin_extend_software_assurance_benefit(
resource_group_name=resource_group.name,
cluster_name="str",
software_assurance_change_request={"properties": {"softwareAssuranceIntent": "str"}},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -266,7 +285,7 @@ async def test_begin_extend_software_assurance_benefit(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_trigger_log_collection(self, resource_group):
+ async def test_clusters_begin_trigger_log_collection(self, resource_group):
response = await (
await self.client.clusters.begin_trigger_log_collection(
resource_group_name=resource_group.name,
@@ -274,7 +293,7 @@ async def test_begin_trigger_log_collection(self, resource_group):
log_collection_request={
"properties": {"fromDate": "2020-02-20 00:00:00", "toDate": "2020-02-20 00:00:00"}
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -283,7 +302,7 @@ async def test_begin_trigger_log_collection(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_configure_remote_support(self, resource_group):
+ async def test_clusters_begin_configure_remote_support(self, resource_group):
response = await (
await self.client.clusters.begin_configure_remote_support(
resource_group_name=resource_group.name,
@@ -295,7 +314,7 @@ async def test_begin_configure_remote_support(self, resource_group):
"remoteSupportType": "str",
}
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations.py
index 8bc341e34ee8..4e87d1b4c85a 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_clusters(self, resource_group):
+ def test_deployment_settings_list_by_clusters(self, resource_group):
response = self.client.deployment_settings.list_by_clusters(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_by_clusters(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_deployment_settings_get(self, resource_group):
response = self.client.deployment_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_deployment_settings_begin_create_or_update(self, resource_group):
response = self.client.deployment_settings.begin_create_or_update(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -56,9 +56,15 @@ def test_begin_create_or_update(self, resource_group):
{
"deploymentData": {
"adouPath": "str",
+ "assemblyInfo": {
+ "packageVersion": "str",
+ "payload": [{"fileName": "str", "hash": "str", "identifier": "str", "url": "str"}],
+ },
"cluster": {
"azureServiceEndpoint": "str",
"cloudAccountName": "str",
+ "clusterPattern": "str",
+ "hardwareClass": "Medium",
"name": "str",
"witnessPath": "str",
"witnessType": "str",
@@ -111,6 +117,7 @@ def test_begin_create_or_update(self, resource_group):
"useDhcp": bool,
}
],
+ "localAvailabilityZones": [{"localAvailabilityZoneName": "str", "nodes": ["str"]}],
"namingPrefix": "str",
"observability": {
"episodicDataUpload": True,
@@ -159,7 +166,7 @@ def test_begin_create_or_update(self, resource_group):
],
"version": "str",
},
- "deploymentMode": "Deploy",
+ "deploymentMode": "str",
"id": "str",
"name": "str",
"operationType": "ClusterProvisioning",
@@ -207,7 +214,7 @@ def test_begin_create_or_update(self, resource_group):
"type": "str",
},
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -215,12 +222,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_deployment_settings_begin_delete(self, resource_group):
response = self.client.deployment_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations_async.py
index d2715c1f3951..b6cbbf79aa94 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_deployment_settings_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_clusters(self, resource_group):
+ async def test_deployment_settings_list_by_clusters(self, resource_group):
response = self.client.deployment_settings.list_by_clusters(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_by_clusters(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_deployment_settings_get(self, resource_group):
response = await self.client.deployment_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_deployment_settings_begin_create_or_update(self, resource_group):
response = await (
await self.client.deployment_settings.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -58,9 +58,17 @@ async def test_begin_create_or_update(self, resource_group):
{
"deploymentData": {
"adouPath": "str",
+ "assemblyInfo": {
+ "packageVersion": "str",
+ "payload": [
+ {"fileName": "str", "hash": "str", "identifier": "str", "url": "str"}
+ ],
+ },
"cluster": {
"azureServiceEndpoint": "str",
"cloudAccountName": "str",
+ "clusterPattern": "str",
+ "hardwareClass": "Medium",
"name": "str",
"witnessPath": "str",
"witnessType": "str",
@@ -113,6 +121,7 @@ async def test_begin_create_or_update(self, resource_group):
"useDhcp": bool,
}
],
+ "localAvailabilityZones": [{"localAvailabilityZoneName": "str", "nodes": ["str"]}],
"namingPrefix": "str",
"observability": {
"episodicDataUpload": True,
@@ -161,7 +170,7 @@ async def test_begin_create_or_update(self, resource_group):
],
"version": "str",
},
- "deploymentMode": "Deploy",
+ "deploymentMode": "str",
"id": "str",
"name": "str",
"operationType": "ClusterProvisioning",
@@ -209,7 +218,7 @@ async def test_begin_create_or_update(self, resource_group):
"type": "str",
},
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -218,13 +227,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_deployment_settings_begin_delete(self, resource_group):
response = await (
await self.client.deployment_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
deployment_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations.py
new file mode 100644
index 000000000000..4f637fab54fb
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations.py
@@ -0,0 +1,85 @@
+# 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.
+# --------------------------------------------------------------------------
+import pytest
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAzureStackHCIEdgeDeviceJobsOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AzureStackHCIClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_edge_device_jobs_list_by_edge_device(self, resource_group):
+ response = self.client.edge_device_jobs.list_by_edge_device(
+ resource_uri="str",
+ edge_device_name="str",
+ api_version="2025-02-01-preview",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_edge_device_jobs_get(self, resource_group):
+ response = self.client.edge_device_jobs.get(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ api_version="2025-02-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_edge_device_jobs_begin_create_or_update(self, resource_group):
+ response = self.client.edge_device_jobs.begin_create_or_update(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ resource={
+ "kind": "HCI",
+ "properties": "hci_edge_device_job_properties",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2025-02-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_edge_device_jobs_begin_delete(self, resource_group):
+ response = self.client.edge_device_jobs.begin_delete(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ api_version="2025-02-01-preview",
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations_async.py
new file mode 100644
index 000000000000..d2e0a222e904
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_device_jobs_operations_async.py
@@ -0,0 +1,90 @@
+# 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.
+# --------------------------------------------------------------------------
+import pytest
+from azure.mgmt.azurestackhci.aio import AzureStackHCIClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAzureStackHCIEdgeDeviceJobsOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AzureStackHCIClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_edge_device_jobs_list_by_edge_device(self, resource_group):
+ response = self.client.edge_device_jobs.list_by_edge_device(
+ resource_uri="str",
+ edge_device_name="str",
+ api_version="2025-02-01-preview",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_edge_device_jobs_get(self, resource_group):
+ response = await self.client.edge_device_jobs.get(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ api_version="2025-02-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_edge_device_jobs_begin_create_or_update(self, resource_group):
+ response = await (
+ await self.client.edge_device_jobs.begin_create_or_update(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ resource={
+ "kind": "HCI",
+ "properties": "hci_edge_device_job_properties",
+ "id": "str",
+ "name": "str",
+ "systemData": {
+ "createdAt": "2020-02-20 00:00:00",
+ "createdBy": "str",
+ "createdByType": "str",
+ "lastModifiedAt": "2020-02-20 00:00:00",
+ "lastModifiedBy": "str",
+ "lastModifiedByType": "str",
+ },
+ "type": "str",
+ },
+ api_version="2025-02-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_edge_device_jobs_begin_delete(self, resource_group):
+ response = await (
+ await self.client.edge_device_jobs.begin_delete(
+ resource_uri="str",
+ edge_device_name="str",
+ jobs_name="str",
+ api_version="2025-02-01-preview",
+ )
+ ).result() # call '.result()' to poll until service return final result
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations.py
index 0503cdcfb887..819e86c9b5bb 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations.py
@@ -20,10 +20,10 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_edge_devices_list(self, resource_group):
response = self.client.edge_devices.list(
resource_uri="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -31,11 +31,11 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_edge_devices_get(self, resource_group):
response = self.client.edge_devices.get(
resource_uri="str",
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -43,7 +43,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_edge_devices_begin_create_or_update(self, resource_group):
response = self.client.edge_devices.begin_create_or_update(
resource_uri="str",
resource={
@@ -82,6 +82,7 @@ def test_begin_create_or_update(self, resource_group):
}
]
},
+ "hardwareProfile": {"processorType": "str"},
"networkProfile": {
"hostNetwork": {
"enableStorageAutoIp": bool,
@@ -142,6 +143,7 @@ def test_begin_create_or_update(self, resource_group):
"macAddress": "str",
"nicStatus": "str",
"nicType": "str",
+ "rdmaCapability": "Disabled",
"slot": "str",
"subnetMask": "str",
"switchName": "str",
@@ -160,6 +162,7 @@ def test_begin_create_or_update(self, resource_group):
},
"osProfile": {"assemblyVersion": "str", "bootType": "str"},
"sbeDeploymentPackageInfo": {"code": "str", "message": "str", "sbeManifest": "str"},
+ "storageProfile": {"poolableDisksCount": 0},
},
},
"systemData": {
@@ -173,7 +176,7 @@ def test_begin_create_or_update(self, resource_group):
"type": "str",
},
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -181,11 +184,11 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_edge_devices_begin_delete(self, resource_group):
response = self.client.edge_devices.begin_delete(
resource_uri="str",
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -193,12 +196,12 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_validate(self, resource_group):
+ def test_edge_devices_begin_validate(self, resource_group):
response = self.client.edge_devices.begin_validate(
resource_uri="str",
validate_request={"edgeDeviceIds": ["str"], "additionalInfo": "str"},
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations_async.py
index e066e78a66a7..407714eacda5 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_edge_devices_operations_async.py
@@ -21,10 +21,10 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_edge_devices_list(self, resource_group):
response = self.client.edge_devices.list(
resource_uri="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -32,11 +32,11 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_edge_devices_get(self, resource_group):
response = await self.client.edge_devices.get(
resource_uri="str",
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -44,7 +44,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_edge_devices_begin_create_or_update(self, resource_group):
response = await (
await self.client.edge_devices.begin_create_or_update(
resource_uri="str",
@@ -84,6 +84,7 @@ async def test_begin_create_or_update(self, resource_group):
}
]
},
+ "hardwareProfile": {"processorType": "str"},
"networkProfile": {
"hostNetwork": {
"enableStorageAutoIp": bool,
@@ -144,6 +145,7 @@ async def test_begin_create_or_update(self, resource_group):
"macAddress": "str",
"nicStatus": "str",
"nicType": "str",
+ "rdmaCapability": "Disabled",
"slot": "str",
"subnetMask": "str",
"switchName": "str",
@@ -162,6 +164,7 @@ async def test_begin_create_or_update(self, resource_group):
},
"osProfile": {"assemblyVersion": "str", "bootType": "str"},
"sbeDeploymentPackageInfo": {"code": "str", "message": "str", "sbeManifest": "str"},
+ "storageProfile": {"poolableDisksCount": 0},
},
},
"systemData": {
@@ -175,7 +178,7 @@ async def test_begin_create_or_update(self, resource_group):
"type": "str",
},
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -184,12 +187,12 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_edge_devices_begin_delete(self, resource_group):
response = await (
await self.client.edge_devices.begin_delete(
resource_uri="str",
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -198,13 +201,13 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_validate(self, resource_group):
+ async def test_edge_devices_begin_validate(self, resource_group):
response = await (
await self.client.edge_devices.begin_validate(
resource_uri="str",
validate_request={"edgeDeviceIds": ["str"], "additionalInfo": "str"},
edge_device_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations.py
index 959d8f32460f..8dc7d25c9726 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_arc_setting(self, resource_group):
+ def test_extensions_list_by_arc_setting(self, resource_group):
response = self.client.extensions.list_by_arc_setting(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list_by_arc_setting(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_extensions_get(self, resource_group):
response = self.client.extensions.get(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
extension_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create(self, resource_group):
+ def test_extensions_begin_create(self, resource_group):
response = self.client.extensions.begin_create(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -96,7 +96,7 @@ def test_begin_create(self, resource_group):
"type": "str",
"typeHandlerVersion": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -104,7 +104,7 @@ def test_begin_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_update(self, resource_group):
+ def test_extensions_begin_update(self, resource_group):
response = self.client.extensions.begin_update(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -118,7 +118,7 @@ def test_begin_update(self, resource_group):
"typeHandlerVersion": "str",
}
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -126,13 +126,13 @@ def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_extensions_begin_delete(self, resource_group):
response = self.client.extensions.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
extension_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -140,14 +140,14 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_upgrade(self, resource_group):
+ def test_extensions_begin_upgrade(self, resource_group):
response = self.client.extensions.begin_upgrade(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
extension_name="str",
extension_upgrade_parameters={"targetVersion": "str"},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations_async.py
index 7f0975e129d2..62ef7d1f54f2 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_extensions_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_arc_setting(self, resource_group):
+ async def test_extensions_list_by_arc_setting(self, resource_group):
response = self.client.extensions.list_by_arc_setting(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,13 +34,13 @@ async def test_list_by_arc_setting(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_extensions_get(self, resource_group):
response = await self.client.extensions.get(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
extension_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -48,7 +48,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create(self, resource_group):
+ async def test_extensions_begin_create(self, resource_group):
response = await (
await self.client.extensions.begin_create(
resource_group_name=resource_group.name,
@@ -98,7 +98,7 @@ async def test_begin_create(self, resource_group):
"type": "str",
"typeHandlerVersion": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -107,7 +107,7 @@ async def test_begin_create(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_update(self, resource_group):
+ async def test_extensions_begin_update(self, resource_group):
response = await (
await self.client.extensions.begin_update(
resource_group_name=resource_group.name,
@@ -122,7 +122,7 @@ async def test_begin_update(self, resource_group):
"typeHandlerVersion": "str",
}
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -131,14 +131,14 @@ async def test_begin_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_extensions_begin_delete(self, resource_group):
response = await (
await self.client.extensions.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
arc_setting_name="str",
extension_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -147,7 +147,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_upgrade(self, resource_group):
+ async def test_extensions_begin_upgrade(self, resource_group):
response = await (
await self.client.extensions.begin_upgrade(
resource_group_name=resource_group.name,
@@ -155,7 +155,7 @@ async def test_begin_upgrade(self, resource_group):
arc_setting_name="str",
extension_name="str",
extension_upgrade_parameters={"targetVersion": "str"},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations.py
index 57d9691a2b84..a726a742e11c 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_publisher(self, resource_group):
+ def test_offers_list_by_publisher(self, resource_group):
response = self.client.offers.list_by_publisher(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,11 +33,11 @@ def test_list_by_publisher(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_cluster(self, resource_group):
+ def test_offers_list_by_cluster(self, resource_group):
response = self.client.offers.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -45,13 +45,13 @@ def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_offers_get(self, resource_group):
response = self.client.offers.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations_async.py
index f18028e3dd8a..d97c1f6bbb55 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_offers_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_publisher(self, resource_group):
+ async def test_offers_list_by_publisher(self, resource_group):
response = self.client.offers.list_by_publisher(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,11 +34,11 @@ async def test_list_by_publisher(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_cluster(self, resource_group):
+ async def test_offers_list_by_cluster(self, resource_group):
response = self.client.offers.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -46,13 +46,13 @@ async def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_offers_get(self, resource_group):
response = await self.client.offers.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations.py
index 85d912935e32..95e3b19c39e0 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations.py
@@ -20,10 +20,10 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_operations_list(self, resource_group):
response = self.client.operations.list(
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
-
+ result = [r for r in response]
# please add some check logic here by yourself
# ...
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations_async.py
index 3bee9caf1099..f33bab951034 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_operations_async.py
@@ -21,10 +21,10 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
- response = await self.client.operations.list(
- api_version="2024-04-01",
+ async def test_operations_list(self, resource_group):
+ response = self.client.operations.list(
+ api_version="2025-02-01-preview",
)
-
+ result = [r async for r in response]
# please add some check logic here by yourself
# ...
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations.py
index b8ff5ab5f2bd..500529c8834e 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_cluster(self, resource_group):
+ def test_publishers_list_by_cluster(self, resource_group):
response = self.client.publishers.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_publishers_get(self, resource_group):
response = self.client.publishers.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations_async.py
index 30ca60b18682..2e2bc0c10f18 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_publishers_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_cluster(self, resource_group):
+ async def test_publishers_list_by_cluster(self, resource_group):
response = self.client.publishers.list_by_cluster(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_by_cluster(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_publishers_get(self, resource_group):
response = await self.client.publishers.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations.py
index 4a09b4536e85..ce58168a80c2 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_clusters(self, resource_group):
+ def test_security_settings_list_by_clusters(self, resource_group):
response = self.client.security_settings.list_by_clusters(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,12 +32,12 @@ def test_list_by_clusters(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_security_settings_get(self, resource_group):
response = self.client.security_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -45,7 +45,7 @@ def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_create_or_update(self, resource_group):
+ def test_security_settings_begin_create_or_update(self, resource_group):
response = self.client.security_settings.begin_create_or_update(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -74,7 +74,7 @@ def test_begin_create_or_update(self, resource_group):
"wdacComplianceAssignment": "str",
},
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -82,12 +82,12 @@ def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_security_settings_begin_delete(self, resource_group):
response = self.client.security_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations_async.py
index 4b56e479fec4..1ed705debd80 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_security_settings_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_clusters(self, resource_group):
+ async def test_security_settings_list_by_clusters(self, resource_group):
response = self.client.security_settings.list_by_clusters(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list_by_clusters(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_security_settings_get(self, resource_group):
response = await self.client.security_settings.get(
resource_group_name=resource_group.name,
cluster_name="str",
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -46,7 +46,7 @@ async def test_get(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_create_or_update(self, resource_group):
+ async def test_security_settings_begin_create_or_update(self, resource_group):
response = await (
await self.client.security_settings.begin_create_or_update(
resource_group_name=resource_group.name,
@@ -76,7 +76,7 @@ async def test_begin_create_or_update(self, resource_group):
"wdacComplianceAssignment": "str",
},
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -85,13 +85,13 @@ async def test_begin_create_or_update(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_security_settings_begin_delete(self, resource_group):
response = await (
await self.client.security_settings.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
security_settings_name="default",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations.py
index 96716711a736..681b4a054896 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations.py
@@ -20,13 +20,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list_by_offer(self, resource_group):
+ def test_skus_list_by_offer(self, resource_group):
response = self.client.skus.list_by_offer(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -34,14 +34,14 @@ def test_list_by_offer(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_skus_get(self, resource_group):
response = self.client.skus.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
sku_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations_async.py
index 79b8dc6a74ea..088740a2dcac 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_skus_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list_by_offer(self, resource_group):
+ async def test_skus_list_by_offer(self, resource_group):
response = self.client.skus.list_by_offer(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -35,14 +35,14 @@ async def test_list_by_offer(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_skus_get(self, resource_group):
response = await self.client.skus.get(
resource_group_name=resource_group.name,
cluster_name="str",
publisher_name="str",
offer_name="str",
sku_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations.py
index 795a1dbe1b26..252ccf049587 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_update_runs_list(self, resource_group):
response = self.client.update_runs.list(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -33,13 +33,13 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_update_runs_begin_delete(self, resource_group):
response = self.client.update_runs.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
update_run_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -47,7 +47,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_put(self, resource_group):
+ def test_update_runs_put(self, resource_group):
response = self.client.update_runs.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -92,7 +92,7 @@ def test_put(self, resource_group):
"timeStarted": "2020-02-20 00:00:00",
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -100,13 +100,13 @@ def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_update_runs_get(self, resource_group):
response = self.client.update_runs.get(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
update_run_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations_async.py
index b3283f3e8e79..e92aa443dd31 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_runs_operations_async.py
@@ -21,12 +21,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_update_runs_list(self, resource_group):
response = self.client.update_runs.list(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -34,14 +34,14 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_update_runs_begin_delete(self, resource_group):
response = await (
await self.client.update_runs.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
update_run_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -50,7 +50,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_put(self, resource_group):
+ async def test_update_runs_put(self, resource_group):
response = await self.client.update_runs.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -95,7 +95,7 @@ async def test_put(self, resource_group):
"timeStarted": "2020-02-20 00:00:00",
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -103,13 +103,13 @@ async def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_update_runs_get(self, resource_group):
response = await self.client.update_runs.get(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
update_run_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations.py
index c0145c494cfe..93e986f51ebc 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations.py
@@ -20,11 +20,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_update_summaries_list(self, resource_group):
response = self.client.update_summaries.list(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -32,11 +32,11 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_update_summaries_begin_delete(self, resource_group):
response = self.client.update_summaries.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -44,7 +44,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_put(self, resource_group):
+ def test_update_summaries_put(self, resource_group):
response = self.client.update_summaries.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -93,7 +93,7 @@ def test_put(self, resource_group):
},
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -101,11 +101,11 @@ def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_update_summaries_get(self, resource_group):
response = self.client.update_summaries.get(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations_async.py
index cc60f92f8ed5..252ed612b8f4 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_update_summaries_operations_async.py
@@ -21,11 +21,11 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_update_summaries_list(self, resource_group):
response = self.client.update_summaries.list(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -33,12 +33,12 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_update_summaries_begin_delete(self, resource_group):
response = await (
await self.client.update_summaries.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -47,7 +47,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_put(self, resource_group):
+ async def test_update_summaries_put(self, resource_group):
response = await self.client.update_summaries.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -96,7 +96,7 @@ async def test_put(self, resource_group):
},
"type": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -104,11 +104,11 @@ async def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_update_summaries_get(self, resource_group):
response = await self.client.update_summaries.get(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations.py
index 93d23ec988d7..e7daac944a94 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations.py
@@ -20,12 +20,12 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_post(self, resource_group):
+ def test_updates_begin_post(self, resource_group):
response = self.client.updates.begin_post(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -33,11 +33,11 @@ def test_begin_post(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_list(self, resource_group):
+ def test_updates_list(self, resource_group):
response = self.client.updates.list(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r for r in response]
# please add some check logic here by yourself
@@ -45,12 +45,12 @@ def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_begin_delete(self, resource_group):
+ def test_updates_begin_delete(self, resource_group):
response = self.client.updates.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
).result() # call '.result()' to poll until service return final result
# please add some check logic here by yourself
@@ -58,7 +58,7 @@ def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_put(self, resource_group):
+ def test_updates_put(self, resource_group):
response = self.client.updates.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -116,7 +116,7 @@ def test_put(self, resource_group):
"type": "str",
"version": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -124,12 +124,12 @@ def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy
- def test_get(self, resource_group):
+ def test_updates_get(self, resource_group):
response = self.client.updates.get(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations_async.py
index 6929349d843f..680d168239e3 100644
--- a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations_async.py
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_updates_operations_async.py
@@ -21,13 +21,13 @@ def setup_method(self, method):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_post(self, resource_group):
+ async def test_updates_begin_post(self, resource_group):
response = await (
await self.client.updates.begin_post(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -36,11 +36,11 @@ async def test_begin_post(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_list(self, resource_group):
+ async def test_updates_list(self, resource_group):
response = self.client.updates.list(
resource_group_name=resource_group.name,
cluster_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
result = [r async for r in response]
# please add some check logic here by yourself
@@ -48,13 +48,13 @@ async def test_list(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_begin_delete(self, resource_group):
+ async def test_updates_begin_delete(self, resource_group):
response = await (
await self.client.updates.begin_delete(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
).result() # call '.result()' to poll until service return final result
@@ -63,7 +63,7 @@ async def test_begin_delete(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_put(self, resource_group):
+ async def test_updates_put(self, resource_group):
response = await self.client.updates.put(
resource_group_name=resource_group.name,
cluster_name="str",
@@ -121,7 +121,7 @@ async def test_put(self, resource_group):
"type": "str",
"version": "str",
},
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
@@ -129,12 +129,12 @@ async def test_put(self, resource_group):
@RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
@recorded_by_proxy_async
- async def test_get(self, resource_group):
+ async def test_updates_get(self, resource_group):
response = await self.client.updates.get(
resource_group_name=resource_group.name,
cluster_name="str",
update_name="str",
- api_version="2024-04-01",
+ api_version="2025-02-01-preview",
)
# please add some check logic here by yourself
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations.py
new file mode 100644
index 000000000000..1dcc2559bf04
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations.py
@@ -0,0 +1,42 @@
+# 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.
+# --------------------------------------------------------------------------
+import pytest
+from azure.mgmt.azurestackhci import AzureStackHCIClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer, recorded_by_proxy
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAzureStackHCIValidatedSolutionRecipesOperations(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AzureStackHCIClient)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_validated_solution_recipes_list_by_subscription_location_resource(self, resource_group):
+ response = self.client.validated_solution_recipes.list_by_subscription_location_resource(
+ location="str",
+ api_version="2025-02-01-preview",
+ )
+ result = [r for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy
+ def test_validated_solution_recipes_get(self, resource_group):
+ response = self.client.validated_solution_recipes.get(
+ location="str",
+ validated_solution_recipe_name="str",
+ api_version="2025-02-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...
diff --git a/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations_async.py b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations_async.py
new file mode 100644
index 000000000000..28d05215509a
--- /dev/null
+++ b/sdk/azurestackhci/azure-mgmt-azurestackhci/generated_tests/test_azure_stack_hci_validated_solution_recipes_operations_async.py
@@ -0,0 +1,43 @@
+# 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.
+# --------------------------------------------------------------------------
+import pytest
+from azure.mgmt.azurestackhci.aio import AzureStackHCIClient
+
+from devtools_testutils import AzureMgmtRecordedTestCase, RandomNameResourceGroupPreparer
+from devtools_testutils.aio import recorded_by_proxy_async
+
+AZURE_LOCATION = "eastus"
+
+
+@pytest.mark.skip("you may need to update the auto-generated test case before run it")
+class TestAzureStackHCIValidatedSolutionRecipesOperationsAsync(AzureMgmtRecordedTestCase):
+ def setup_method(self, method):
+ self.client = self.create_mgmt_client(AzureStackHCIClient, is_async=True)
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_validated_solution_recipes_list_by_subscription_location_resource(self, resource_group):
+ response = self.client.validated_solution_recipes.list_by_subscription_location_resource(
+ location="str",
+ api_version="2025-02-01-preview",
+ )
+ result = [r async for r in response]
+ # please add some check logic here by yourself
+ # ...
+
+ @RandomNameResourceGroupPreparer(location=AZURE_LOCATION)
+ @recorded_by_proxy_async
+ async def test_validated_solution_recipes_get(self, resource_group):
+ response = await self.client.validated_solution_recipes.get(
+ location="str",
+ validated_solution_recipe_name="str",
+ api_version="2025-02-01-preview",
+ )
+
+ # please add some check logic here by yourself
+ # ...