Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[AutoPR track2_azure-mgmt-azurestackhci] merge 2023-08-01-preview API version to main repo #4971

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions sdk/azurestackhci/azure-mgmt-azurestackhci/_meta.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"commit": "85ea3e489c45e80383801d4f3a1278f1e687a7b8",
"commit": "50e66ac647aacb315a47accb24fe963b7ab11e5a",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest": "3.9.2",
"autorest": "3.9.7",
"use": [
"@autorest/python@6.2.7",
"@autorest/modelerfour@4.24.3"
"@autorest/python@6.7.1",
"@autorest/modelerfour@4.26.2"
],
"autorest_command": "autorest specification/azurestackhci/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --tag=package-preview-2021-09 --use=@autorest/python@6.2.7 --use=@autorest/modelerfour@4.24.3 --version=3.9.2 --version-tolerant=False",
"autorest_command": "autorest specification/azurestackhci/resource-manager/readme.md --generate-sample=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.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
"readme": "specification/azurestackhci/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,13 @@
ArcSettingsOperations,
ClustersOperations,
ExtensionsOperations,
GalleryimagesOperations,
GuestAgentOperations,
GuestAgentsOperations,
HybridIdentityMetadataOperations,
MachineExtensionsOperations,
MarketplacegalleryimagesOperations,
NetworkinterfacesOperations,
OffersOperations,
Operations,
StoragecontainersOperations,
VirtualharddisksOperations,
VirtualmachinesOperations,
VirtualnetworksOperations,
PublishersOperations,
SkusOperations,
UpdateRunsOperations,
UpdateSummariesOperations,
UpdatesOperations,
)

if TYPE_CHECKING:
Expand All @@ -47,39 +42,27 @@ class AzureStackHCIClient: # pylint: disable=client-accepts-api-version-keyword
:vartype clusters: azure.mgmt.azurestackhci.operations.ClustersOperations
:ivar extensions: ExtensionsOperations operations
:vartype extensions: azure.mgmt.azurestackhci.operations.ExtensionsOperations
:ivar galleryimages: GalleryimagesOperations operations
:vartype galleryimages: azure.mgmt.azurestackhci.operations.GalleryimagesOperations
:ivar marketplacegalleryimages: MarketplacegalleryimagesOperations operations
:vartype marketplacegalleryimages:
azure.mgmt.azurestackhci.operations.MarketplacegalleryimagesOperations
:ivar networkinterfaces: NetworkinterfacesOperations operations
:vartype networkinterfaces: azure.mgmt.azurestackhci.operations.NetworkinterfacesOperations
:ivar offers: OffersOperations operations
:vartype offers: azure.mgmt.azurestackhci.operations.OffersOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.azurestackhci.operations.Operations
:ivar storagecontainers: StoragecontainersOperations operations
:vartype storagecontainers: azure.mgmt.azurestackhci.operations.StoragecontainersOperations
:ivar virtualharddisks: VirtualharddisksOperations operations
:vartype virtualharddisks: azure.mgmt.azurestackhci.operations.VirtualharddisksOperations
:ivar virtualmachines: VirtualmachinesOperations operations
:vartype virtualmachines: azure.mgmt.azurestackhci.operations.VirtualmachinesOperations
:ivar hybrid_identity_metadata: HybridIdentityMetadataOperations operations
:vartype hybrid_identity_metadata:
azure.mgmt.azurestackhci.operations.HybridIdentityMetadataOperations
:ivar machine_extensions: MachineExtensionsOperations operations
:vartype machine_extensions: azure.mgmt.azurestackhci.operations.MachineExtensionsOperations
:ivar guest_agent: GuestAgentOperations operations
:vartype guest_agent: azure.mgmt.azurestackhci.operations.GuestAgentOperations
:ivar guest_agents: GuestAgentsOperations operations
:vartype guest_agents: azure.mgmt.azurestackhci.operations.GuestAgentsOperations
:ivar virtualnetworks: VirtualnetworksOperations operations
:vartype virtualnetworks: azure.mgmt.azurestackhci.operations.VirtualnetworksOperations
:ivar publishers: PublishersOperations operations
:vartype publishers: azure.mgmt.azurestackhci.operations.PublishersOperations
:ivar skus: SkusOperations operations
: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
: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. 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 "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-08-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
Expand All @@ -96,7 +79,7 @@ def __init__(
self._config = AzureStackHCIClientConfiguration(
credential=credential, subscription_id=subscription_id, **kwargs
)
self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)

client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
Expand All @@ -105,30 +88,15 @@ def __init__(
self.arc_settings = ArcSettingsOperations(self._client, self._config, self._serialize, self._deserialize)
self.clusters = ClustersOperations(self._client, self._config, self._serialize, self._deserialize)
self.extensions = ExtensionsOperations(self._client, self._config, self._serialize, self._deserialize)
self.galleryimages = GalleryimagesOperations(self._client, self._config, self._serialize, self._deserialize)
self.marketplacegalleryimages = MarketplacegalleryimagesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.networkinterfaces = NetworkinterfacesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.offers = OffersOperations(self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(self._client, self._config, self._serialize, self._deserialize)
self.storagecontainers = StoragecontainersOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.virtualharddisks = VirtualharddisksOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.virtualmachines = VirtualmachinesOperations(self._client, self._config, self._serialize, self._deserialize)
self.hybrid_identity_metadata = HybridIdentityMetadataOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.machine_extensions = MachineExtensionsOperations(
self.publishers = PublishersOperations(self._client, self._config, self._serialize, self._deserialize)
self.skus = SkusOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_runs = UpdateRunsOperations(self._client, self._config, self._serialize, self._deserialize)
self.update_summaries = UpdateSummariesOperations(
self._client, self._config, self._serialize, self._deserialize
)
self.guest_agent = GuestAgentOperations(self._client, self._config, self._serialize, self._deserialize)
self.guest_agents = GuestAgentsOperations(self._client, self._config, self._serialize, self._deserialize)
self.virtualnetworks = VirtualnetworksOperations(self._client, self._config, self._serialize, self._deserialize)
self.updates = UpdatesOperations(self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
"""Runs the network request through the client's chained policies.
Expand Down Expand Up @@ -159,5 +127,5 @@ def __enter__(self) -> "AzureStackHCIClient":
self._client.__enter__()
return self

def __exit__(self, *exc_details) -> None:
def __exit__(self, *exc_details: Any) -> None:
self._client.__exit__(*exc_details)
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

import sys
from typing import Any, TYPE_CHECKING

from azure.core.configuration import Configuration
Expand All @@ -15,11 +14,6 @@

from ._version import VERSION

if sys.version_info >= (3, 8):
from typing import Literal # pylint: disable=no-name-in-module, ungrouped-imports
else:
from typing_extensions import Literal # type: ignore # pylint: disable=ungrouped-imports

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials import TokenCredential
Expand All @@ -35,14 +29,14 @@ class AzureStackHCIClientConfiguration(Configuration): # pylint: disable=too-ma
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription. Required.
:type subscription_id: str
:keyword api_version: Api Version. Default value is "2021-09-01-preview". Note that overriding
:keyword api_version: Api Version. Default value is "2023-08-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:
super(AzureStackHCIClientConfiguration, self).__init__(**kwargs)
api_version: Literal["2021-09-01-preview"] = kwargs.pop("api_version", "2021-09-01-preview")
api_version: str = kwargs.pop("api_version", "2023-08-01-preview")

if credential is None:
raise ValueError("Parameter 'credential' must not be None.")
Expand Down
Loading