From e6f13c64144958695388c3f5ce34f2b4e390911f Mon Sep 17 00:00:00 2001 From: kartikverma020 <146417388+kartikverma020@users.noreply.github.com> Date: Mon, 7 Apr 2025 14:15:19 +0530 Subject: [PATCH 1/4] Adding generated vendored sdks. --- .../vendored_sdks/scvmm/_configuration.py | 7 +- .../scvmm/_sc_vmm_mgmt_client.py | 9 +- .../vendored_sdks/scvmm/aio/_configuration.py | 7 +- .../scvmm/aio/_sc_vmm_mgmt_client.py | 9 +- .../_availability_sets_operations.py | 114 ++-- .../aio/operations/_clouds_operations.py | 114 ++-- .../operations/_guest_agents_operations.py | 68 ++- .../operations/_inventory_items_operations.py | 59 +- .../scvmm/aio/operations/_operations.py | 19 +- .../_virtual_machine_instances_operations.py | 266 ++++----- .../_virtual_machine_templates_operations.py | 114 ++-- .../_virtual_networks_operations.py | 114 ++-- ...ce_hybrid_identity_metadatas_operations.py | 31 +- .../aio/operations/_vmm_servers_operations.py | 114 ++-- .../vendored_sdks/scvmm/models/__init__.py | 4 +- .../vendored_sdks/scvmm/models/_models.py | 94 +++- .../vendored_sdks/scvmm/models/_models_py3.py | 103 +++- .../scvmm/models/_sc_vmm_mgmt_client_enums.py | 2 +- .../_availability_sets_operations.py | 243 +++++---- .../scvmm/operations/_clouds_operations.py | 243 +++++---- .../operations/_guest_agents_operations.py | 153 +++--- .../operations/_inventory_items_operations.py | 144 +++-- .../scvmm/operations/_operations.py | 39 +- .../_virtual_machine_instances_operations.py | 505 +++++++++--------- .../_virtual_machine_templates_operations.py | 243 +++++---- .../_virtual_networks_operations.py | 243 +++++---- ...ce_hybrid_identity_metadatas_operations.py | 74 ++- .../operations/_vmm_servers_operations.py | 243 +++++---- 28 files changed, 1741 insertions(+), 1637 deletions(-) diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_configuration.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_configuration.py index 17bef65a21d..cf02992f3fa 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_configuration.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_configuration.py @@ -21,7 +21,7 @@ from azure.core.credentials import TokenCredential -class ScVmmMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class ScVmmMgmtClientConfiguration(Configuration): """Configuration for ScVmmMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -31,8 +31,7 @@ class ScVmmMgmtClientConfiguration(Configuration): # pylint: disable=too-many-i :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. :type subscription_id: str - :keyword api_version: Api Version. The default value is "2023-10-07". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -44,7 +43,7 @@ def __init__( ): # type: (...) -> None super(ScVmmMgmtClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_sc_vmm_mgmt_client.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_sc_vmm_mgmt_client.py index a55c0f2f191..a3fa36d4c43 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_sc_vmm_mgmt_client.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/_sc_vmm_mgmt_client.py @@ -9,9 +9,8 @@ from copy import deepcopy from typing import TYPE_CHECKING -from msrest import Deserializer, Serializer - from azure.mgmt.core import ARMPipelineClient +from msrest import Deserializer, Serializer from . import models from ._configuration import ScVmmMgmtClientConfiguration @@ -19,12 +18,12 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any + from typing import Any, Optional from azure.core.credentials import TokenCredential from azure.core.rest import HttpRequest, HttpResponse -class ScVmmMgmtClient(object): # pylint: disable=too-many-instance-attributes +class ScVmmMgmtClient(object): """The Microsoft.ScVmm Rest API spec. :ivar virtual_machine_instances: VirtualMachineInstancesOperations operations @@ -57,7 +56,7 @@ class ScVmmMgmtClient(object): # pylint: disable=too-many-instance-attributes :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. The default value is "2023-10-07". Note that overriding this + :keyword api_version: Api Version. The default value is "2025-03-13". 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 diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_configuration.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_configuration.py index 84264c40cac..1198b2488cc 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_configuration.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_configuration.py @@ -19,7 +19,7 @@ from azure.core.credentials_async import AsyncTokenCredential -class ScVmmMgmtClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes +class ScVmmMgmtClientConfiguration(Configuration): """Configuration for ScVmmMgmtClient. Note that all parameters used to create this instance are saved as instance @@ -29,8 +29,7 @@ class ScVmmMgmtClientConfiguration(Configuration): # pylint: disable=too-many-i :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: The ID of the target subscription. The value must be an UUID. :type subscription_id: str - :keyword api_version: Api Version. The default value is "2023-10-07". Note that overriding this - default value may result in unsupported behavior. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this default value may result in unsupported behavior. :paramtype api_version: str """ @@ -41,7 +40,7 @@ def __init__( **kwargs: Any ) -> None: super(ScVmmMgmtClientConfiguration, self).__init__(**kwargs) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str if credential is None: raise ValueError("Parameter 'credential' must not be None.") diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_sc_vmm_mgmt_client.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_sc_vmm_mgmt_client.py index 9975dae2e00..760a79ac7a6 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_sc_vmm_mgmt_client.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/_sc_vmm_mgmt_client.py @@ -7,12 +7,11 @@ # -------------------------------------------------------------------------- from copy import deepcopy -from typing import Any, Awaitable, TYPE_CHECKING - -from msrest import Deserializer, Serializer +from typing import Any, Awaitable, Optional, TYPE_CHECKING from azure.core.rest import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient +from msrest import Deserializer, Serializer from .. import models from ._configuration import ScVmmMgmtClientConfiguration @@ -22,7 +21,7 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -class ScVmmMgmtClient: # pylint: disable=too-many-instance-attributes +class ScVmmMgmtClient: """The Microsoft.ScVmm Rest API spec. :ivar virtual_machine_instances: VirtualMachineInstancesOperations operations @@ -55,7 +54,7 @@ class ScVmmMgmtClient: # pylint: disable=too-many-instance-attributes :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. The default value is "2023-10-07". Note that overriding this + :keyword api_version: Api Version. The default value is "2025-03-13". 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 diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_availability_sets_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_availability_sets_operations.py index 28a357716d2..2273ee8d7ff 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_availability_sets_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_availability_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,6 +57,9 @@ def list_by_subscription( List of AvailabilitySets in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailabilitySetListResult or the result of cls(response) @@ -63,7 +67,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.AvailabilitySetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySetListResult"] error_map = { @@ -103,11 +107,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets'} # type: ignore @distributed_trace def list_by_resource_group( @@ -135,6 +135,9 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailabilitySetListResult or the result of cls(response) @@ -142,7 +145,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.AvailabilitySetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySetListResult"] error_map = { @@ -184,11 +187,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -202,7 +201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets'} # type: ignore @distributed_trace_async async def get( @@ -219,6 +218,9 @@ async def get( :type resource_group_name: str :param availability_set_resource_name: Name of the AvailabilitySet. :type availability_set_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AvailabilitySet, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.AvailabilitySet @@ -230,7 +232,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -243,11 +245,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore async def _create_or_update_initial( @@ -278,7 +276,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'AvailabilitySet') @@ -295,11 +293,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -321,7 +315,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace_async @@ -342,6 +336,9 @@ async def begin_create_or_update( :type availability_set_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.AvailabilitySet + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -355,9 +352,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.AvailabilitySet] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySet"] lro_delay = kwargs.pop( 'polling_interval', @@ -394,9 +391,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore async def _update_initial( self, @@ -411,7 +409,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'AvailabilitySetTagsUpdate') @@ -428,11 +426,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -454,7 +448,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace_async @@ -475,6 +469,9 @@ async def begin_update( :type availability_set_resource_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.AvailabilitySetTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -488,9 +485,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.AvailabilitySet] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySet"] lro_delay = kwargs.pop( 'polling_interval', @@ -527,11 +524,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, availability_set_resource_name: str, @@ -544,7 +542,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -558,11 +556,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -579,11 +573,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, availability_set_resource_name: str, @@ -600,6 +594,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type availability_set_resource_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -612,8 +609,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -646,6 +643,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_clouds_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_clouds_operations.py index e22be006481..4ab6db1b1c3 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_clouds_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_clouds_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,12 +57,15 @@ def list_by_subscription( List of Clouds in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CloudListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.CloudListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudListResult"] error_map = { @@ -101,11 +105,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -119,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds'} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,12 +133,15 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CloudListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.CloudListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudListResult"] error_map = { @@ -180,11 +183,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -198,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds'} # type: ignore @distributed_trace_async async def get( @@ -215,6 +214,9 @@ async def get( :type resource_group_name: str :param cloud_resource_name: Name of the Cloud. :type cloud_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cloud, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.Cloud @@ -226,7 +228,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -239,11 +241,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -258,7 +256,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore async def _create_or_update_initial( @@ -274,7 +272,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'Cloud') @@ -291,11 +289,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -316,7 +310,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace_async @@ -337,6 +331,9 @@ async def begin_create_or_update( :type cloud_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.Cloud + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -349,9 +346,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.Cloud] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cloud"] lro_delay = kwargs.pop( 'polling_interval', @@ -388,9 +385,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore async def _update_initial( self, @@ -405,7 +403,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'CloudTagsUpdate') @@ -422,11 +420,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -448,7 +442,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace_async @@ -469,6 +463,9 @@ async def begin_update( :type cloud_resource_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.CloudTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -481,9 +478,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.Cloud] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cloud"] lro_delay = kwargs.pop( 'polling_interval', @@ -520,11 +517,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, cloud_resource_name: str, @@ -537,7 +535,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -551,11 +549,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -571,11 +565,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, cloud_resource_name: str, @@ -592,6 +586,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type cloud_resource_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -604,8 +601,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -638,6 +635,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_guest_agents_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_guest_agents_operations.py index 23978390201..de7a639e5bb 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_guest_agents_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_guest_agents_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -59,13 +60,16 @@ def list_by_virtual_machine_instance( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GuestAgentListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.GuestAgentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentListResult"] error_map = { @@ -105,11 +109,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -123,7 +123,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_virtual_machine_instance.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents"} # type: ignore + list_by_virtual_machine_instance.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents'} # type: ignore @distributed_trace_async async def get( @@ -137,6 +137,9 @@ async def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestAgent, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.GuestAgent @@ -148,7 +151,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -159,11 +162,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -178,7 +177,7 @@ async def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore async def _create_initial( @@ -193,7 +192,7 @@ async def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'GuestAgent') @@ -208,11 +207,7 @@ async def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -233,7 +228,7 @@ async def _create_initial( return deserialized - _create_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + _create_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore @distributed_trace_async @@ -251,6 +246,9 @@ async def begin_create( :type resource_uri: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.GuestAgent + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -264,9 +262,9 @@ async def begin_create( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.GuestAgent] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] lro_delay = kwargs.pop( 'polling_interval', @@ -302,12 +300,13 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + begin_create.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, resource_uri: str, **kwargs: Any @@ -318,6 +317,9 @@ async def delete( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -329,7 +331,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request( @@ -340,11 +342,7 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -355,5 +353,5 @@ async def delete( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_inventory_items_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_inventory_items_operations.py index b3f2011b3d6..ab9fbec741f 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_inventory_items_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_inventory_items_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -60,6 +61,9 @@ def list_by_vmm_server( :type resource_group_name: str :param vmm_server_name: Name of the VmmServer. :type vmm_server_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InventoryItemListResult or the result of cls(response) @@ -67,7 +71,7 @@ def list_by_vmm_server( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.InventoryItemListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItemListResult"] error_map = { @@ -111,11 +115,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -129,7 +129,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_vmm_server.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems"} # type: ignore + list_by_vmm_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems'} # type: ignore @distributed_trace_async async def get( @@ -149,6 +149,9 @@ async def get( :type vmm_server_name: str :param inventory_item_resource_name: Name of the inventoryItem. :type inventory_item_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.InventoryItem @@ -160,7 +163,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -174,11 +177,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -193,7 +192,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore @distributed_trace_async @@ -217,6 +216,9 @@ async def create( :type inventory_item_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.InventoryItem + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.InventoryItem @@ -228,7 +230,7 @@ async def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'InventoryItem') @@ -246,11 +248,7 @@ async def create( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -269,11 +267,11 @@ async def create( return deserialized - create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore @distributed_trace_async - async def delete( # pylint: disable=inconsistent-return-statements + async def delete( self, resource_group_name: str, vmm_server_name: str, @@ -290,6 +288,9 @@ async def delete( # pylint: disable=inconsistent-return-statements :type vmm_server_name: str :param inventory_item_resource_name: Name of the inventoryItem. :type inventory_item_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -301,7 +302,7 @@ async def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request( @@ -315,11 +316,7 @@ async def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -330,5 +327,5 @@ async def delete( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_operations.py index c234c47dc84..6bd7f5ae7bc 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -14,6 +15,7 @@ from azure.core.pipeline.transport import AsyncHttpResponse from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace +from azure.core.tracing.decorator_async import distributed_trace_async from azure.mgmt.core.exceptions import ARMErrorFormat from ... import models as _models @@ -51,12 +53,15 @@ def list( ) -> AsyncIterable["_models.OperationListResult"]: """List the operations for the provider. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { @@ -94,11 +99,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -112,4 +113,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': "/providers/Microsoft.ScVmm/operations"} # type: ignore + list.metadata = {'url': '/providers/Microsoft.ScVmm/operations'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_instances_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_instances_operations.py index 17dba456139..281522f60fb 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_instances_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_instances_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -59,6 +60,9 @@ def list( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineInstanceListResult or the result of cls(response) @@ -66,7 +70,7 @@ def list( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VirtualMachineInstanceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstanceListResult"] error_map = { @@ -106,11 +110,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -124,7 +124,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances"} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances'} # type: ignore @distributed_trace_async async def get( @@ -138,6 +138,9 @@ async def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineInstance, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualMachineInstance @@ -149,7 +152,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -160,11 +163,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -179,7 +178,7 @@ async def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore async def _create_or_update_initial( @@ -194,7 +193,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualMachineInstance') @@ -209,11 +208,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -234,7 +229,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _create_or_update_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace_async @@ -253,6 +248,9 @@ async def begin_create_or_update( :type resource_uri: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualMachineInstance + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -266,9 +264,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualMachineInstance] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] lro_delay = kwargs.pop( 'polling_interval', @@ -304,9 +302,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore async def _update_initial( self, @@ -320,7 +319,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualMachineInstanceUpdate') @@ -335,11 +334,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -361,7 +356,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _update_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace_async @@ -379,6 +374,9 @@ async def begin_update( :type resource_uri: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualMachineInstanceUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -392,9 +390,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualMachineInstance] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] lro_delay = kwargs.pop( 'polling_interval', @@ -430,11 +428,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_uri: str, force: Optional[Union[str, "_models.ForceDelete"]] = None, @@ -447,7 +446,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -460,11 +459,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -480,11 +475,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _delete_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_uri: str, force: Optional[Union[str, "_models.ForceDelete"]] = None, @@ -501,6 +496,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type force: str or ~azure.mgmt.scvmm.models.ForceDelete :param delete_from_host: Whether to disable the VM from azure and also delete it from Vmm. :type delete_from_host: str or ~azure.mgmt.scvmm.models.DeleteFromHost + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -513,8 +511,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -547,11 +545,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore - async def _create_checkpoint_initial( # pylint: disable=inconsistent-return-statements + async def _create_checkpoint_initial( self, resource_uri: str, body: "_models.VirtualMachineCreateCheckpoint", @@ -563,7 +562,7 @@ async def _create_checkpoint_initial( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineCreateCheckpoint') @@ -578,11 +577,7 @@ async def _create_checkpoint_initial( # pylint: disable=inconsistent-return-sta request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -597,11 +592,11 @@ async def _create_checkpoint_initial( # pylint: disable=inconsistent-return-sta if cls: return cls(pipeline_response, None, response_headers) - _create_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint"} # type: ignore + _create_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint'} # type: ignore @distributed_trace_async - async def begin_create_checkpoint( # pylint: disable=inconsistent-return-statements + async def begin_create_checkpoint( self, resource_uri: str, body: "_models.VirtualMachineCreateCheckpoint", @@ -615,6 +610,9 @@ async def begin_create_checkpoint( # pylint: disable=inconsistent-return-statem :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineCreateCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -627,9 +625,9 @@ async def begin_create_checkpoint( # pylint: disable=inconsistent-return-statem :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -662,11 +660,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint"} # type: ignore + begin_create_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint'} # type: ignore - async def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-statements + async def _delete_checkpoint_initial( self, resource_uri: str, body: "_models.VirtualMachineDeleteCheckpoint", @@ -678,7 +677,7 @@ async def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-sta } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineDeleteCheckpoint') @@ -693,11 +692,7 @@ async def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-sta request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -712,11 +707,11 @@ async def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-sta if cls: return cls(pipeline_response, None, response_headers) - _delete_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint"} # type: ignore + _delete_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint'} # type: ignore @distributed_trace_async - async def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statements + async def begin_delete_checkpoint( self, resource_uri: str, body: "_models.VirtualMachineDeleteCheckpoint", @@ -730,6 +725,9 @@ async def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statem :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineDeleteCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -742,9 +740,9 @@ async def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statem :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -777,11 +775,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint"} # type: ignore + begin_delete_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint'} # type: ignore - async def _restart_initial( # pylint: disable=inconsistent-return-statements + async def _restart_initial( self, resource_uri: str, **kwargs: Any @@ -792,7 +791,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_restart_request_initial( @@ -803,11 +802,7 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -822,11 +817,11 @@ async def _restart_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _restart_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart"} # type: ignore + _restart_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart'} # type: ignore @distributed_trace_async - async def begin_restart( # pylint: disable=inconsistent-return-statements + async def begin_restart( self, resource_uri: str, **kwargs: Any @@ -837,6 +832,9 @@ async def begin_restart( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -849,8 +847,8 @@ async def begin_restart( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -881,11 +879,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restart.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart"} # type: ignore + begin_restart.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart'} # type: ignore - async def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-statements + async def _restore_checkpoint_initial( self, resource_uri: str, body: "_models.VirtualMachineRestoreCheckpoint", @@ -897,7 +896,7 @@ async def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-st } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineRestoreCheckpoint') @@ -912,11 +911,7 @@ async def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-st request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -931,11 +926,11 @@ async def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-st if cls: return cls(pipeline_response, None, response_headers) - _restore_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint"} # type: ignore + _restore_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint'} # type: ignore @distributed_trace_async - async def begin_restore_checkpoint( # pylint: disable=inconsistent-return-statements + async def begin_restore_checkpoint( self, resource_uri: str, body: "_models.VirtualMachineRestoreCheckpoint", @@ -949,6 +944,9 @@ async def begin_restore_checkpoint( # pylint: disable=inconsistent-return-state :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineRestoreCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -961,9 +959,9 @@ async def begin_restore_checkpoint( # pylint: disable=inconsistent-return-state :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -996,11 +994,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint"} # type: ignore + begin_restore_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint'} # type: ignore - async def _start_initial( # pylint: disable=inconsistent-return-statements + async def _start_initial( self, resource_uri: str, **kwargs: Any @@ -1011,7 +1010,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_start_request_initial( @@ -1022,11 +1021,7 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1041,11 +1036,11 @@ async def _start_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _start_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start"} # type: ignore + _start_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start'} # type: ignore @distributed_trace_async - async def begin_start( # pylint: disable=inconsistent-return-statements + async def begin_start( self, resource_uri: str, **kwargs: Any @@ -1056,6 +1051,9 @@ async def begin_start( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1068,8 +1066,8 @@ async def begin_start( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1100,14 +1098,15 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start"} # type: ignore + begin_start.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start'} # type: ignore - async def _stop_initial( # pylint: disable=inconsistent-return-statements + async def _stop_initial( self, resource_uri: str, - body: "_models.StopVirtualMachineOptions", + body: Optional["_models.StopVirtualMachineOptions"] = None, **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] @@ -1116,10 +1115,13 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(body, 'StopVirtualMachineOptions') + if body is not None: + _json = self._serialize.body(body, 'StopVirtualMachineOptions') + else: + _json = None request = build_stop_request_initial( resource_uri=resource_uri, @@ -1131,11 +1133,7 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1150,14 +1148,14 @@ async def _stop_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _stop_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop"} # type: ignore + _stop_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop'} # type: ignore @distributed_trace_async - async def begin_stop( # pylint: disable=inconsistent-return-statements + async def begin_stop( self, resource_uri: str, - body: "_models.StopVirtualMachineOptions", + body: Optional["_models.StopVirtualMachineOptions"] = None, **kwargs: Any ) -> AsyncLROPoller[None]: """Implements the operation to stop a virtual machine. @@ -1168,6 +1166,9 @@ async def begin_stop( # pylint: disable=inconsistent-return-statements :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.StopVirtualMachineOptions + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -1180,9 +1181,9 @@ async def begin_stop( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1215,6 +1216,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop"} # type: ignore + begin_stop.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_templates_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_templates_operations.py index 8b4cc737b5d..883b8ee8fe8 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_templates_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_machine_templates_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,6 +57,9 @@ def list_by_subscription( List of VirtualMachineTemplates in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineTemplateListResult or the result of cls(response) @@ -63,7 +67,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VirtualMachineTemplateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplateListResult"] error_map = { @@ -103,11 +107,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates'} # type: ignore @distributed_trace def list_by_resource_group( @@ -135,6 +135,9 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineTemplateListResult or the result of cls(response) @@ -142,7 +145,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VirtualMachineTemplateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplateListResult"] error_map = { @@ -184,11 +187,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -202,7 +201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates'} # type: ignore @distributed_trace_async async def get( @@ -219,6 +218,9 @@ async def get( :type resource_group_name: str :param virtual_machine_template_name: Name of the VirtualMachineTemplate. :type virtual_machine_template_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualMachineTemplate @@ -230,7 +232,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -243,11 +245,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore async def _create_or_update_initial( @@ -278,7 +276,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualMachineTemplate') @@ -295,11 +293,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -320,7 +314,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace_async @@ -341,6 +335,9 @@ async def begin_create_or_update( :type virtual_machine_template_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualMachineTemplate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -354,9 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] lro_delay = kwargs.pop( 'polling_interval', @@ -393,9 +390,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore async def _update_initial( self, @@ -410,7 +408,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualMachineTemplateTagsUpdate') @@ -427,11 +425,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -453,7 +447,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace_async @@ -474,6 +468,9 @@ async def begin_update( :type virtual_machine_template_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualMachineTemplateTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -487,9 +484,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] lro_delay = kwargs.pop( 'polling_interval', @@ -526,11 +523,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, virtual_machine_template_name: str, @@ -543,7 +541,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -557,11 +555,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -577,11 +571,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, virtual_machine_template_name: str, @@ -598,6 +592,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type virtual_machine_template_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -610,8 +607,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -644,6 +641,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_networks_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_networks_operations.py index bf6e7b532ca..f40deec134c 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_networks_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_virtual_networks_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,6 +57,9 @@ def list_by_subscription( List of VirtualNetworks in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) @@ -63,7 +67,7 @@ def list_by_subscription( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] error_map = { @@ -103,11 +107,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -121,7 +121,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks'} # type: ignore @distributed_trace def list_by_resource_group( @@ -135,6 +135,9 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) @@ -142,7 +145,7 @@ def list_by_resource_group( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] error_map = { @@ -184,11 +187,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -202,7 +201,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks'} # type: ignore @distributed_trace_async async def get( @@ -219,6 +218,9 @@ async def get( :type resource_group_name: str :param virtual_network_name: Name of the VirtualNetwork. :type virtual_network_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualNetwork @@ -230,7 +232,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -243,11 +245,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -262,7 +260,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore async def _create_or_update_initial( @@ -278,7 +276,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualNetwork') @@ -295,11 +293,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -320,7 +314,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace_async @@ -341,6 +335,9 @@ async def begin_create_or_update( :type virtual_network_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualNetwork + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -354,9 +351,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] lro_delay = kwargs.pop( 'polling_interval', @@ -393,9 +390,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore async def _update_initial( self, @@ -410,7 +408,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualNetworkTagsUpdate') @@ -427,11 +425,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -453,7 +447,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace_async @@ -474,6 +468,9 @@ async def begin_update( :type virtual_network_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualNetworkTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -487,9 +484,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] lro_delay = kwargs.pop( 'polling_interval', @@ -526,11 +523,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, virtual_network_name: str, @@ -543,7 +541,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -557,11 +555,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -577,11 +571,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, virtual_network_name: str, @@ -598,6 +592,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type virtual_network_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -610,8 +607,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -644,6 +641,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vm_instance_hybrid_identity_metadatas_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vm_instance_hybrid_identity_metadatas_operations.py index 93e6a21afb8..4569ef3a8b5 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vm_instance_hybrid_identity_metadatas_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vm_instance_hybrid_identity_metadatas_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -57,6 +58,9 @@ def list_by_virtual_machine_instance( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmInstanceHybridIdentityMetadataListResult or the result of cls(response) @@ -64,7 +68,7 @@ def list_by_virtual_machine_instance( ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VmInstanceHybridIdentityMetadataListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadataListResult"] error_map = { @@ -104,11 +108,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -122,7 +122,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_virtual_machine_instance.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata"} # type: ignore + list_by_virtual_machine_instance.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata'} # type: ignore @distributed_trace_async async def get( @@ -136,6 +136,9 @@ async def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VmInstanceHybridIdentityMetadata, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VmInstanceHybridIdentityMetadata @@ -147,7 +150,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -158,11 +161,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -177,5 +176,5 @@ async def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vmm_servers_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vmm_servers_operations.py index 3485efea8e4..8127d61fd36 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vmm_servers_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/aio/operations/_vmm_servers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,7 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from typing import Any, AsyncIterable, Callable, Dict, Optional, TypeVar, Union +import functools +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error @@ -56,12 +57,15 @@ def list_by_subscription( List of VmmServers in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmmServerListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VmmServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServerListResult"] error_map = { @@ -101,11 +105,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -119,7 +119,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers'} # type: ignore @distributed_trace def list_by_resource_group( @@ -133,12 +133,15 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmmServerListResult or the result of cls(response) :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.scvmm.models.VmmServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServerListResult"] error_map = { @@ -180,11 +183,7 @@ async def extract_data(pipeline_response): async def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -198,7 +197,7 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers'} # type: ignore @distributed_trace_async async def get( @@ -215,6 +214,9 @@ async def get( :type resource_group_name: str :param vmm_server_name: Name of the VmmServer. :type vmm_server_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VmmServer, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VmmServer @@ -226,7 +228,7 @@ async def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -239,11 +241,7 @@ async def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -258,7 +256,7 @@ async def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore async def _create_or_update_initial( @@ -274,7 +272,7 @@ async def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VmmServer') @@ -291,11 +289,7 @@ async def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -316,7 +310,7 @@ async def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace_async @@ -337,6 +331,9 @@ async def begin_create_or_update( :type vmm_server_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VmmServer + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -350,9 +347,9 @@ async def begin_create_or_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VmmServer] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServer"] lro_delay = kwargs.pop( 'polling_interval', @@ -389,9 +386,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore async def _update_initial( self, @@ -406,7 +404,7 @@ async def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VmmServerTagsUpdate') @@ -423,11 +421,7 @@ async def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -449,7 +443,7 @@ async def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace_async @@ -470,6 +464,9 @@ async def begin_update( :type vmm_server_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VmmServerTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -483,9 +480,9 @@ async def begin_update( :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.scvmm.models.VmmServer] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServer"] lro_delay = kwargs.pop( 'polling_interval', @@ -522,11 +519,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore - async def _delete_initial( # pylint: disable=inconsistent-return-statements + async def _delete_initial( self, resource_group_name: str, vmm_server_name: str, @@ -539,7 +537,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -553,11 +551,7 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = await self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -573,11 +567,11 @@ async def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace_async - async def begin_delete( # pylint: disable=inconsistent-return-statements + async def begin_delete( self, resource_group_name: str, vmm_server_name: str, @@ -594,6 +588,9 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :type vmm_server_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be AsyncARMPolling. Pass in False for @@ -606,8 +603,8 @@ async def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.AsyncLROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.AsyncPollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -640,6 +637,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/__init__.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/__init__.py index ad50945c8be..64dd9669f47 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/__init__.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/__init__.py @@ -174,7 +174,7 @@ Origin, OsType, ProvisioningAction, - ResourceProvisioningState, + ProvisioningState, SkipShutdown, ) @@ -268,6 +268,6 @@ 'Origin', 'OsType', 'ProvisioningAction', - 'ResourceProvisioningState', + 'ProvisioningState', 'SkipShutdown', ] diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models.py index 387c8759f08..094c3265db8 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models.py @@ -255,7 +255,7 @@ class AvailabilitySetProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -428,18 +428,22 @@ class CloudCapacity(msrest.serialization.Model): :vartype memory_mb: long :ivar vm_count: VMCount gives the max number of VMs that can be deployed in the cloud. :vartype vm_count: long + :ivar storage_gb: StorageGB gives the storage in GB present in the cloud. + :vartype storage_gb: long """ _validation = { 'cpu_count': {'readonly': True}, 'memory_mb': {'readonly': True}, 'vm_count': {'readonly': True}, + 'storage_gb': {'readonly': True}, } _attribute_map = { 'cpu_count': {'key': 'cpuCount', 'type': 'long'}, 'memory_mb': {'key': 'memoryMB', 'type': 'long'}, 'vm_count': {'key': 'vmCount', 'type': 'long'}, + 'storage_gb': {'key': 'storageGB', 'type': 'long'}, } def __init__( @@ -452,6 +456,7 @@ def __init__( self.cpu_count = None self.memory_mb = None self.vm_count = None + self.storage_gb = None class InventoryItemProperties(msrest.serialization.Model): @@ -477,7 +482,7 @@ class InventoryItemProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -534,7 +539,7 @@ class CloudInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -619,7 +624,7 @@ class CloudProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -961,7 +966,10 @@ class GuestAgentProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str """ _validation = { @@ -979,6 +987,7 @@ class GuestAgentProperties(msrest.serialization.Model): 'status': {'key': 'status', 'type': 'str'}, 'custom_resource_name': {'key': 'customResourceName', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, } def __init__( @@ -993,6 +1002,9 @@ def __init__( :keyword provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". :paramtype provisioning_action: str or ~azure.mgmt.scvmm.models.ProvisioningAction + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str """ super(GuestAgentProperties, self).__init__(**kwargs) self.uuid = None @@ -1002,6 +1014,7 @@ def __init__( self.status = None self.custom_resource_name = None self.provisioning_state = None + self.private_link_scope_resource_id = kwargs.get('private_link_scope_resource_id', None) class GuestCredential(msrest.serialization.Model): @@ -1767,6 +1780,8 @@ class OsProfileForVmInstance(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar admin_username: Gets or sets the admin username. + :vartype admin_username: str :ivar admin_password: Admin password of the virtual machine. :vartype admin_password: str :ivar computer_name: Gets or sets computer name. @@ -1777,6 +1792,21 @@ class OsProfileForVmInstance(msrest.serialization.Model): :vartype os_sku: str :ivar os_version: Gets os version. :vartype os_version: str + :ivar domain_name: Gets or sets the domain name. + :vartype domain_name: str + :ivar domain_username: Gets or sets the domain username. + :vartype domain_username: str + :ivar domain_password: Password of the domain the VM has to join. + :vartype domain_password: str + :ivar workgroup: Gets or sets the workgroup. + :vartype workgroup: str + :ivar product_key: Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx. + :vartype product_key: str + :ivar timezone: Gets or sets the index value of the timezone. + :vartype timezone: int + :ivar run_once_commands: Get or sets the commands to be run once at the time of creation + separated by semicolons. + :vartype run_once_commands: str """ _validation = { @@ -1786,11 +1816,19 @@ class OsProfileForVmInstance(msrest.serialization.Model): } _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, 'admin_password': {'key': 'adminPassword', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'os_sku': {'key': 'osSku', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'domain_username': {'key': 'domainUsername', 'type': 'str'}, + 'domain_password': {'key': 'domainPassword', 'type': 'str'}, + 'workgroup': {'key': 'workgroup', 'type': 'str'}, + 'product_key': {'key': 'productKey', 'type': 'str'}, + 'timezone': {'key': 'timezone', 'type': 'int'}, + 'run_once_commands': {'key': 'runOnceCommands', 'type': 'str'}, } def __init__( @@ -1798,17 +1836,42 @@ def __init__( **kwargs ): """ + :keyword admin_username: Gets or sets the admin username. + :paramtype admin_username: str :keyword admin_password: Admin password of the virtual machine. :paramtype admin_password: str :keyword computer_name: Gets or sets computer name. :paramtype computer_name: str + :keyword domain_name: Gets or sets the domain name. + :paramtype domain_name: str + :keyword domain_username: Gets or sets the domain username. + :paramtype domain_username: str + :keyword domain_password: Password of the domain the VM has to join. + :paramtype domain_password: str + :keyword workgroup: Gets or sets the workgroup. + :paramtype workgroup: str + :keyword product_key: Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx. + :paramtype product_key: str + :keyword timezone: Gets or sets the index value of the timezone. + :paramtype timezone: int + :keyword run_once_commands: Get or sets the commands to be run once at the time of creation + separated by semicolons. + :paramtype run_once_commands: str """ super(OsProfileForVmInstance, self).__init__(**kwargs) + self.admin_username = kwargs.get('admin_username', None) self.admin_password = kwargs.get('admin_password', None) self.computer_name = kwargs.get('computer_name', None) self.os_type = None self.os_sku = None self.os_version = None + self.domain_name = kwargs.get('domain_name', None) + self.domain_username = kwargs.get('domain_username', None) + self.domain_password = kwargs.get('domain_password', None) + self.workgroup = kwargs.get('workgroup', None) + self.product_key = kwargs.get('product_key', None) + self.timezone = kwargs.get('timezone', None) + self.run_once_commands = kwargs.get('run_once_commands', None) class StopVirtualMachineOptions(msrest.serialization.Model): @@ -2359,7 +2422,7 @@ class VirtualMachineInstanceProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -2497,7 +2560,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState :ivar os_type: Gets the type of the os. Possible values include: "Windows", "Linux", "Other". :vartype os_type: str or ~azure.mgmt.scvmm.models.OsType :ivar os_name: Gets os name. @@ -2506,6 +2569,8 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :vartype os_version: str :ivar power_state: Gets the power state of the virtual machine. :vartype power_state: str + :ivar generation: Gets vm generation. + :vartype generation: long :ivar ip_addresses: Gets or sets the nic ip addresses. :vartype ip_addresses: list[str] :ivar cloud: Cloud inventory resource details where the VM is present. @@ -2527,6 +2592,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'os_name': {'readonly': True}, 'os_version': {'readonly': True}, 'power_state': {'readonly': True}, + 'generation': {'readonly': True}, 'bios_guid': {'readonly': True}, 'managed_machine_resource_id': {'readonly': True}, } @@ -2541,6 +2607,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'os_name': {'key': 'osName', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, 'power_state': {'key': 'powerState', 'type': 'str'}, + 'generation': {'key': 'generation', 'type': 'long'}, 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, 'cloud': {'key': 'cloud', 'type': 'InventoryItemDetails'}, 'bios_guid': {'key': 'biosGuid', 'type': 'str'}, @@ -2563,6 +2630,7 @@ def __init__( self.os_name = None self.os_version = None self.power_state = None + self.generation = None self.ip_addresses = kwargs.get('ip_addresses', None) self.cloud = kwargs.get('cloud', None) self.bios_guid = None @@ -2679,7 +2747,7 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState :ivar cpu_count: Gets the desired number of vCPUs for the vm. :vartype cpu_count: int :ivar memory_mb: MemoryMB is the desired size of a virtual machine's memory, in MB. @@ -2810,7 +2878,7 @@ class VirtualMachineTemplateProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -2996,7 +3064,7 @@ class VirtualNetworkInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3077,7 +3145,7 @@ class VirtualNetworkProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3232,7 +3300,7 @@ class VmInstanceHybridIdentityMetadataProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3417,7 +3485,7 @@ class VmmServerProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models_py3.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models_py3.py index 6ed674c7801..3c8fc1007b9 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models_py3.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_models_py3.py @@ -273,7 +273,7 @@ class AvailabilitySetProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -461,18 +461,22 @@ class CloudCapacity(msrest.serialization.Model): :vartype memory_mb: long :ivar vm_count: VMCount gives the max number of VMs that can be deployed in the cloud. :vartype vm_count: long + :ivar storage_gb: StorageGB gives the storage in GB present in the cloud. + :vartype storage_gb: long """ _validation = { 'cpu_count': {'readonly': True}, 'memory_mb': {'readonly': True}, 'vm_count': {'readonly': True}, + 'storage_gb': {'readonly': True}, } _attribute_map = { 'cpu_count': {'key': 'cpuCount', 'type': 'long'}, 'memory_mb': {'key': 'memoryMB', 'type': 'long'}, 'vm_count': {'key': 'vmCount', 'type': 'long'}, + 'storage_gb': {'key': 'storageGB', 'type': 'long'}, } def __init__( @@ -485,6 +489,7 @@ def __init__( self.cpu_count = None self.memory_mb = None self.vm_count = None + self.storage_gb = None class InventoryItemProperties(msrest.serialization.Model): @@ -510,7 +515,7 @@ class InventoryItemProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -567,7 +572,7 @@ class CloudInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -654,7 +659,7 @@ class CloudProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -1011,7 +1016,10 @@ class GuestAgentProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState + :ivar private_link_scope_resource_id: The resource id of the private link scope this machine is + assigned to, if any. + :vartype private_link_scope_resource_id: str """ _validation = { @@ -1029,6 +1037,7 @@ class GuestAgentProperties(msrest.serialization.Model): 'status': {'key': 'status', 'type': 'str'}, 'custom_resource_name': {'key': 'customResourceName', 'type': 'str'}, 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'private_link_scope_resource_id': {'key': 'privateLinkScopeResourceId', 'type': 'str'}, } def __init__( @@ -1037,6 +1046,7 @@ def __init__( credentials: Optional["GuestCredential"] = None, http_proxy_config: Optional["HttpProxyConfiguration"] = None, provisioning_action: Optional[Union[str, "ProvisioningAction"]] = None, + private_link_scope_resource_id: Optional[str] = None, **kwargs ): """ @@ -1047,6 +1057,9 @@ def __init__( :keyword provisioning_action: Gets or sets the guest agent provisioning action. Possible values include: "install", "uninstall", "repair". :paramtype provisioning_action: str or ~azure.mgmt.scvmm.models.ProvisioningAction + :keyword private_link_scope_resource_id: The resource id of the private link scope this machine + is assigned to, if any. + :paramtype private_link_scope_resource_id: str """ super(GuestAgentProperties, self).__init__(**kwargs) self.uuid = None @@ -1056,6 +1069,7 @@ def __init__( self.status = None self.custom_resource_name = None self.provisioning_state = None + self.private_link_scope_resource_id = private_link_scope_resource_id class GuestCredential(msrest.serialization.Model): @@ -1882,6 +1896,8 @@ class OsProfileForVmInstance(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. + :ivar admin_username: Gets or sets the admin username. + :vartype admin_username: str :ivar admin_password: Admin password of the virtual machine. :vartype admin_password: str :ivar computer_name: Gets or sets computer name. @@ -1892,6 +1908,21 @@ class OsProfileForVmInstance(msrest.serialization.Model): :vartype os_sku: str :ivar os_version: Gets os version. :vartype os_version: str + :ivar domain_name: Gets or sets the domain name. + :vartype domain_name: str + :ivar domain_username: Gets or sets the domain username. + :vartype domain_username: str + :ivar domain_password: Password of the domain the VM has to join. + :vartype domain_password: str + :ivar workgroup: Gets or sets the workgroup. + :vartype workgroup: str + :ivar product_key: Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx. + :vartype product_key: str + :ivar timezone: Gets or sets the index value of the timezone. + :vartype timezone: int + :ivar run_once_commands: Get or sets the commands to be run once at the time of creation + separated by semicolons. + :vartype run_once_commands: str """ _validation = { @@ -1901,32 +1932,73 @@ class OsProfileForVmInstance(msrest.serialization.Model): } _attribute_map = { + 'admin_username': {'key': 'adminUsername', 'type': 'str'}, 'admin_password': {'key': 'adminPassword', 'type': 'str'}, 'computer_name': {'key': 'computerName', 'type': 'str'}, 'os_type': {'key': 'osType', 'type': 'str'}, 'os_sku': {'key': 'osSku', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'domain_username': {'key': 'domainUsername', 'type': 'str'}, + 'domain_password': {'key': 'domainPassword', 'type': 'str'}, + 'workgroup': {'key': 'workgroup', 'type': 'str'}, + 'product_key': {'key': 'productKey', 'type': 'str'}, + 'timezone': {'key': 'timezone', 'type': 'int'}, + 'run_once_commands': {'key': 'runOnceCommands', 'type': 'str'}, } def __init__( self, *, + admin_username: Optional[str] = None, admin_password: Optional[str] = None, computer_name: Optional[str] = None, + domain_name: Optional[str] = None, + domain_username: Optional[str] = None, + domain_password: Optional[str] = None, + workgroup: Optional[str] = None, + product_key: Optional[str] = None, + timezone: Optional[int] = None, + run_once_commands: Optional[str] = None, **kwargs ): """ + :keyword admin_username: Gets or sets the admin username. + :paramtype admin_username: str :keyword admin_password: Admin password of the virtual machine. :paramtype admin_password: str :keyword computer_name: Gets or sets computer name. :paramtype computer_name: str + :keyword domain_name: Gets or sets the domain name. + :paramtype domain_name: str + :keyword domain_username: Gets or sets the domain username. + :paramtype domain_username: str + :keyword domain_password: Password of the domain the VM has to join. + :paramtype domain_password: str + :keyword workgroup: Gets or sets the workgroup. + :paramtype workgroup: str + :keyword product_key: Gets or sets the product key.Input format xxxxx-xxxxx-xxxxx-xxxxx-xxxxx. + :paramtype product_key: str + :keyword timezone: Gets or sets the index value of the timezone. + :paramtype timezone: int + :keyword run_once_commands: Get or sets the commands to be run once at the time of creation + separated by semicolons. + :paramtype run_once_commands: str """ super(OsProfileForVmInstance, self).__init__(**kwargs) + self.admin_username = admin_username self.admin_password = admin_password self.computer_name = computer_name self.os_type = None self.os_sku = None self.os_version = None + self.domain_name = domain_name + self.domain_username = domain_username + self.domain_password = domain_password + self.workgroup = workgroup + self.product_key = product_key + self.timezone = timezone + self.run_once_commands = run_once_commands class StopVirtualMachineOptions(msrest.serialization.Model): @@ -2530,7 +2602,7 @@ class VirtualMachineInstanceProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -2683,7 +2755,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState :ivar os_type: Gets the type of the os. Possible values include: "Windows", "Linux", "Other". :vartype os_type: str or ~azure.mgmt.scvmm.models.OsType :ivar os_name: Gets os name. @@ -2692,6 +2764,8 @@ class VirtualMachineInventoryItem(InventoryItemProperties): :vartype os_version: str :ivar power_state: Gets the power state of the virtual machine. :vartype power_state: str + :ivar generation: Gets vm generation. + :vartype generation: long :ivar ip_addresses: Gets or sets the nic ip addresses. :vartype ip_addresses: list[str] :ivar cloud: Cloud inventory resource details where the VM is present. @@ -2713,6 +2787,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'os_name': {'readonly': True}, 'os_version': {'readonly': True}, 'power_state': {'readonly': True}, + 'generation': {'readonly': True}, 'bios_guid': {'readonly': True}, 'managed_machine_resource_id': {'readonly': True}, } @@ -2727,6 +2802,7 @@ class VirtualMachineInventoryItem(InventoryItemProperties): 'os_name': {'key': 'osName', 'type': 'str'}, 'os_version': {'key': 'osVersion', 'type': 'str'}, 'power_state': {'key': 'powerState', 'type': 'str'}, + 'generation': {'key': 'generation', 'type': 'long'}, 'ip_addresses': {'key': 'ipAddresses', 'type': '[str]'}, 'cloud': {'key': 'cloud', 'type': 'InventoryItemDetails'}, 'bios_guid': {'key': 'biosGuid', 'type': 'str'}, @@ -2752,6 +2828,7 @@ def __init__( self.os_name = None self.os_version = None self.power_state = None + self.generation = None self.ip_addresses = ip_addresses self.cloud = cloud self.bios_guid = None @@ -2875,7 +2952,7 @@ class VirtualMachineTemplateInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState :ivar cpu_count: Gets the desired number of vCPUs for the vm. :vartype cpu_count: int :ivar memory_mb: MemoryMB is the desired size of a virtual machine's memory, in MB. @@ -3008,7 +3085,7 @@ class VirtualMachineTemplateProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3205,7 +3282,7 @@ class VirtualNetworkInventoryItem(InventoryItemProperties): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3288,7 +3365,7 @@ class VirtualNetworkProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3453,7 +3530,7 @@ class VmInstanceHybridIdentityMetadataProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { @@ -3651,7 +3728,7 @@ class VmmServerProperties(msrest.serialization.Model): :ivar provisioning_state: Provisioning state of the resource. Possible values include: "Succeeded", "Failed", "Canceled", "Provisioning", "Updating", "Deleting", "Accepted", "Created". - :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ResourceProvisioningState + :vartype provisioning_state: str or ~azure.mgmt.scvmm.models.ProvisioningState """ _validation = { diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_sc_vmm_mgmt_client_enums.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_sc_vmm_mgmt_client_enums.py index 21ffbb1c2af..b9b1c1f20d5 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_sc_vmm_mgmt_client_enums.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/models/_sc_vmm_mgmt_client_enums.py @@ -138,7 +138,7 @@ class ProvisioningAction(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): #: Repair guest agent. REPAIR = "repair" -class ResourceProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): +class ProvisioningState(with_metaclass(CaseInsensitiveEnumMeta, str, Enum)): """The provisioning state of the resource. """ diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_availability_sets_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_availability_sets_operations.py index a5c95fa69b7..11fe5b13283 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_availability_sets_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_availability_sets_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_subscription_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets") + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -72,31 +72,31 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets') 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), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -108,32 +108,32 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}') 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), "availabilitySetResourceName": _SERIALIZER.url("availability_set_resource_name", availability_set_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -145,35 +145,35 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}') 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), "availabilitySetResourceName": _SERIALIZER.url("availability_set_resource_name", availability_set_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -185,35 +185,35 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}') 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), "availabilitySetResourceName": _SERIALIZER.url("availability_set_resource_name", availability_set_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -225,35 +225,35 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}') 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), "availabilitySetResourceName": _SERIALIZER.url("availability_set_resource_name", availability_set_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -290,13 +290,16 @@ def list_by_subscription( List of AvailabilitySets in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailabilitySetListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.AvailabilitySetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySetListResult"] error_map = { @@ -336,11 +339,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,7 +353,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/availabilitySets'} # type: ignore @distributed_trace def list_by_resource_group( @@ -369,13 +368,16 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either AvailabilitySetListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.AvailabilitySetListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySetListResult"] error_map = { @@ -417,11 +419,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -435,7 +433,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets'} # type: ignore @distributed_trace def get( @@ -453,6 +451,9 @@ def get( :type resource_group_name: str :param availability_set_resource_name: Name of the AvailabilitySet. :type availability_set_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: AvailabilitySet, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.AvailabilitySet @@ -464,7 +465,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -477,11 +478,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -496,7 +493,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore def _create_or_update_initial( @@ -513,7 +510,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'AvailabilitySet') @@ -530,11 +527,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -556,7 +549,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace @@ -578,6 +571,9 @@ def begin_create_or_update( :type availability_set_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.AvailabilitySet + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -591,9 +587,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.AvailabilitySet] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySet"] lro_delay = kwargs.pop( 'polling_interval', @@ -630,9 +626,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore def _update_initial( self, @@ -648,7 +645,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'AvailabilitySetTagsUpdate') @@ -665,11 +662,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -691,7 +684,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace @@ -713,6 +706,9 @@ def begin_update( :type availability_set_resource_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.AvailabilitySetTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -726,9 +722,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.AvailabilitySet] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.AvailabilitySet"] lro_delay = kwargs.pop( 'polling_interval', @@ -765,11 +761,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name, # type: str availability_set_resource_name, # type: str @@ -783,7 +780,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -797,11 +794,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -818,11 +811,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name, # type: str availability_set_resource_name, # type: str @@ -840,6 +833,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type availability_set_resource_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -852,8 +848,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -886,6 +882,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/availabilitySets/{availabilitySetResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_clouds_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_clouds_operations.py index 4f9fc5670df..72c049be330 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_clouds_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_clouds_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_subscription_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds") + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -72,31 +72,31 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds') 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), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -108,32 +108,32 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}') 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), "cloudResourceName": _SERIALIZER.url("cloud_resource_name", cloud_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -145,35 +145,35 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}') 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), "cloudResourceName": _SERIALIZER.url("cloud_resource_name", cloud_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -185,35 +185,35 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}') 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), "cloudResourceName": _SERIALIZER.url("cloud_resource_name", cloud_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -225,35 +225,35 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}') 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), "cloudResourceName": _SERIALIZER.url("cloud_resource_name", cloud_resource_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -290,12 +290,15 @@ def list_by_subscription( List of Clouds in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CloudListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.CloudListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudListResult"] error_map = { @@ -335,11 +338,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -353,7 +352,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/clouds'} # type: ignore @distributed_trace def list_by_resource_group( @@ -368,12 +367,15 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either CloudListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.CloudListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.CloudListResult"] error_map = { @@ -415,11 +417,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -433,7 +431,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds'} # type: ignore @distributed_trace def get( @@ -451,6 +449,9 @@ def get( :type resource_group_name: str :param cloud_resource_name: Name of the Cloud. :type cloud_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: Cloud, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.Cloud @@ -462,7 +463,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -475,11 +476,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -494,7 +491,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore def _create_or_update_initial( @@ -511,7 +508,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'Cloud') @@ -528,11 +525,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -553,7 +546,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace @@ -575,6 +568,9 @@ def begin_create_or_update( :type cloud_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.Cloud + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -587,9 +583,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.Cloud] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cloud"] lro_delay = kwargs.pop( 'polling_interval', @@ -626,9 +622,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore def _update_initial( self, @@ -644,7 +641,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'CloudTagsUpdate') @@ -661,11 +658,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -687,7 +680,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace @@ -709,6 +702,9 @@ def begin_update( :type cloud_resource_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.CloudTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -721,9 +717,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.Cloud] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.Cloud"] lro_delay = kwargs.pop( 'polling_interval', @@ -760,11 +756,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name, # type: str cloud_resource_name, # type: str @@ -778,7 +775,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -792,11 +789,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -812,11 +805,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name, # type: str cloud_resource_name, # type: str @@ -834,6 +827,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type cloud_resource_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -846,8 +842,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -880,6 +876,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/clouds/{cloudResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_guest_agents_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_guest_agents_operations.py index 10118acc73b..83d5724c999 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_guest_agents_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_guest_agents_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_virtual_machine_instance_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -71,30 +71,30 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -104,33 +104,33 @@ def build_create_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -140,30 +140,30 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -203,13 +203,16 @@ def list_by_virtual_machine_instance( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either GuestAgentListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.GuestAgentListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgentListResult"] error_map = { @@ -249,11 +252,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -267,7 +266,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_virtual_machine_instance.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents"} # type: ignore + list_by_virtual_machine_instance.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents'} # type: ignore @distributed_trace def get( @@ -282,6 +281,9 @@ def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: GuestAgent, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.GuestAgent @@ -293,7 +295,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -304,11 +306,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -323,7 +321,7 @@ def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore def _create_initial( @@ -339,7 +337,7 @@ def _create_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'GuestAgent') @@ -354,11 +352,7 @@ def _create_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -379,7 +373,7 @@ def _create_initial( return deserialized - _create_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + _create_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore @distributed_trace @@ -398,6 +392,9 @@ def begin_create( :type resource_uri: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.GuestAgent + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -410,9 +407,9 @@ def begin_create( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.GuestAgent] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.GuestAgent"] lro_delay = kwargs.pop( 'polling_interval', @@ -448,12 +445,13 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + begin_create.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, resource_uri, # type: str **kwargs # type: Any @@ -465,6 +463,9 @@ def delete( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -476,7 +477,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request( @@ -487,11 +488,7 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -502,5 +499,5 @@ def delete( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default"} # type: ignore + delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/guestAgents/default'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_inventory_items_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_inventory_items_operations.py index f76c84ebd3d..6f86a15ee7b 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_inventory_items_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_inventory_items_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,13 +16,14 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,32 +38,32 @@ def build_list_by_vmm_server_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems') 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), "vmmServerName": _SERIALIZER.url("vmm_server_name", vmm_server_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -76,11 +76,11 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}') 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), @@ -88,21 +88,21 @@ def build_get_request( "inventoryItemResourceName": _SERIALIZER.url("inventory_item_resource_name", inventory_item_resource_name, 'str', pattern=r'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -115,12 +115,12 @@ def build_create_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}') 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), @@ -128,23 +128,23 @@ def build_create_request( "inventoryItemResourceName": _SERIALIZER.url("inventory_item_resource_name", inventory_item_resource_name, 'str', pattern=r'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -157,11 +157,11 @@ def build_delete_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}') 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), @@ -169,21 +169,21 @@ def build_delete_request( "inventoryItemResourceName": _SERIALIZER.url("inventory_item_resource_name", inventory_item_resource_name, 'str', pattern=r'^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -226,13 +226,16 @@ def list_by_vmm_server( :type resource_group_name: str :param vmm_server_name: Name of the VmmServer. :type vmm_server_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either InventoryItemListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.InventoryItemListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.InventoryItemListResult"] error_map = { @@ -276,11 +279,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -294,7 +293,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_vmm_server.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems"} # type: ignore + list_by_vmm_server.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems'} # type: ignore @distributed_trace def get( @@ -315,6 +314,9 @@ def get( :type vmm_server_name: str :param inventory_item_resource_name: Name of the inventoryItem. :type inventory_item_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.InventoryItem @@ -326,7 +328,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -340,11 +342,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -359,7 +357,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore @distributed_trace @@ -384,6 +382,9 @@ def create( :type inventory_item_resource_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.InventoryItem + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: InventoryItem, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.InventoryItem @@ -395,7 +396,7 @@ def create( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'InventoryItem') @@ -413,11 +414,7 @@ def create( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -436,11 +433,11 @@ def create( return deserialized - create.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore @distributed_trace - def delete( # pylint: disable=inconsistent-return-statements + def delete( self, resource_group_name, # type: str vmm_server_name, # type: str @@ -458,6 +455,9 @@ def delete( # pylint: disable=inconsistent-return-statements :type vmm_server_name: str :param inventory_item_resource_name: Name of the inventoryItem. :type inventory_item_resource_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None @@ -469,7 +469,7 @@ def delete( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request( @@ -483,11 +483,7 @@ def delete( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 204]: @@ -498,5 +494,5 @@ def delete( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, {}) - delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}"} # type: ignore + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}/inventoryItems/{inventoryItemResourceName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_operations.py index a00428e77fb..b2d5816da75 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,13 +16,14 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -35,25 +35,25 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/providers/Microsoft.ScVmm/operations") + url = kwargs.pop("template_url", '/providers/Microsoft.ScVmm/operations') # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -88,12 +88,15 @@ def list( # type: (...) -> Iterable["_models.OperationListResult"] """List the operations for the provider. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either OperationListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.OperationListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.OperationListResult"] error_map = { @@ -131,11 +134,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -149,4 +148,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': "/providers/Microsoft.ScVmm/operations"} # type: ignore + list.metadata = {'url': '/providers/Microsoft.ScVmm/operations'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_instances_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_instances_operations.py index 700cd3f7f87..3e5b92217da 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_instances_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_instances_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -71,30 +71,30 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -104,33 +104,33 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -140,33 +140,33 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -176,36 +176,36 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] delete_from_host = kwargs.pop('delete_from_host', None) # type: Optional[Union[str, "_models.DeleteFromHost"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') if delete_from_host is not None: - _query_parameters['deleteFromHost'] = _SERIALIZER.query("delete_from_host", delete_from_host, 'str') + query_parameters['deleteFromHost'] = _SERIALIZER.query("delete_from_host", delete_from_host, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -215,33 +215,33 @@ def build_create_checkpoint_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -251,33 +251,33 @@ def build_delete_checkpoint_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -287,30 +287,30 @@ def build_restart_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -320,33 +320,33 @@ def build_restore_checkpoint_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -356,30 +356,30 @@ def build_start_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -389,33 +389,33 @@ def build_stop_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop") + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="POST", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -455,13 +455,16 @@ def list( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineInstanceListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VirtualMachineInstanceListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstanceListResult"] error_map = { @@ -501,11 +504,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -519,7 +518,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances"} # type: ignore + list.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances'} # type: ignore @distributed_trace def get( @@ -534,6 +533,9 @@ def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineInstance, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualMachineInstance @@ -545,7 +547,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -556,11 +558,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -575,7 +573,7 @@ def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore def _create_or_update_initial( @@ -591,7 +589,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualMachineInstance') @@ -606,11 +604,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -631,7 +625,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _create_or_update_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace @@ -651,6 +645,9 @@ def begin_create_or_update( :type resource_uri: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualMachineInstance + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -664,9 +661,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualMachineInstance] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] lro_delay = kwargs.pop( 'polling_interval', @@ -702,9 +699,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_create_or_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore def _update_initial( self, @@ -719,7 +717,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualMachineInstanceUpdate') @@ -734,11 +732,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -760,7 +754,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _update_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace @@ -779,6 +773,9 @@ def begin_update( :type resource_uri: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualMachineInstanceUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -792,9 +789,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualMachineInstance] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineInstance"] lro_delay = kwargs.pop( 'polling_interval', @@ -830,11 +827,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_update.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_uri, # type: str force=None, # type: Optional[Union[str, "_models.ForceDelete"]] @@ -848,7 +846,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -861,11 +859,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -881,11 +875,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + _delete_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_uri, # type: str force=None, # type: Optional[Union[str, "_models.ForceDelete"]] @@ -903,6 +897,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type force: str or ~azure.mgmt.scvmm.models.ForceDelete :param delete_from_host: Whether to disable the VM from azure and also delete it from Vmm. :type delete_from_host: str or ~azure.mgmt.scvmm.models.DeleteFromHost + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -915,8 +912,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -949,11 +946,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default"} # type: ignore + begin_delete.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default'} # type: ignore - def _create_checkpoint_initial( # pylint: disable=inconsistent-return-statements + def _create_checkpoint_initial( self, resource_uri, # type: str body, # type: "_models.VirtualMachineCreateCheckpoint" @@ -966,7 +964,7 @@ def _create_checkpoint_initial( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineCreateCheckpoint') @@ -981,11 +979,7 @@ def _create_checkpoint_initial( # pylint: disable=inconsistent-return-statement request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1000,11 +994,11 @@ def _create_checkpoint_initial( # pylint: disable=inconsistent-return-statement if cls: return cls(pipeline_response, None, response_headers) - _create_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint"} # type: ignore + _create_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint'} # type: ignore @distributed_trace - def begin_create_checkpoint( # pylint: disable=inconsistent-return-statements + def begin_create_checkpoint( self, resource_uri, # type: str body, # type: "_models.VirtualMachineCreateCheckpoint" @@ -1019,6 +1013,9 @@ def begin_create_checkpoint( # pylint: disable=inconsistent-return-statements :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineCreateCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1031,9 +1028,9 @@ def begin_create_checkpoint( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1066,11 +1063,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint"} # type: ignore + begin_create_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/createCheckpoint'} # type: ignore - def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-statements + def _delete_checkpoint_initial( self, resource_uri, # type: str body, # type: "_models.VirtualMachineDeleteCheckpoint" @@ -1083,7 +1081,7 @@ def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-statement } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineDeleteCheckpoint') @@ -1098,11 +1096,7 @@ def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-statement request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1117,11 +1111,11 @@ def _delete_checkpoint_initial( # pylint: disable=inconsistent-return-statement if cls: return cls(pipeline_response, None, response_headers) - _delete_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint"} # type: ignore + _delete_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint'} # type: ignore @distributed_trace - def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statements + def begin_delete_checkpoint( self, resource_uri, # type: str body, # type: "_models.VirtualMachineDeleteCheckpoint" @@ -1136,6 +1130,9 @@ def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statements :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineDeleteCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1148,9 +1145,9 @@ def begin_delete_checkpoint( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1183,11 +1180,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint"} # type: ignore + begin_delete_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/deleteCheckpoint'} # type: ignore - def _restart_initial( # pylint: disable=inconsistent-return-statements + def _restart_initial( self, resource_uri, # type: str **kwargs # type: Any @@ -1199,7 +1197,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_restart_request_initial( @@ -1210,11 +1208,7 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1229,11 +1223,11 @@ def _restart_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _restart_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart"} # type: ignore + _restart_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart'} # type: ignore @distributed_trace - def begin_restart( # pylint: disable=inconsistent-return-statements + def begin_restart( self, resource_uri, # type: str **kwargs # type: Any @@ -1245,6 +1239,9 @@ def begin_restart( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1257,8 +1254,8 @@ def begin_restart( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1289,11 +1286,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restart.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart"} # type: ignore + begin_restart.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restart'} # type: ignore - def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-statements + def _restore_checkpoint_initial( self, resource_uri, # type: str body, # type: "_models.VirtualMachineRestoreCheckpoint" @@ -1306,7 +1304,7 @@ def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-statemen } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(body, 'VirtualMachineRestoreCheckpoint') @@ -1321,11 +1319,7 @@ def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-statemen request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1340,11 +1334,11 @@ def _restore_checkpoint_initial( # pylint: disable=inconsistent-return-statemen if cls: return cls(pipeline_response, None, response_headers) - _restore_checkpoint_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint"} # type: ignore + _restore_checkpoint_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint'} # type: ignore @distributed_trace - def begin_restore_checkpoint( # pylint: disable=inconsistent-return-statements + def begin_restore_checkpoint( self, resource_uri, # type: str body, # type: "_models.VirtualMachineRestoreCheckpoint" @@ -1359,6 +1353,9 @@ def begin_restore_checkpoint( # pylint: disable=inconsistent-return-statements :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.VirtualMachineRestoreCheckpoint + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1371,9 +1368,9 @@ def begin_restore_checkpoint( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1406,11 +1403,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_restore_checkpoint.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint"} # type: ignore + begin_restore_checkpoint.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/restoreCheckpoint'} # type: ignore - def _start_initial( # pylint: disable=inconsistent-return-statements + def _start_initial( self, resource_uri, # type: str **kwargs # type: Any @@ -1422,7 +1420,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_start_request_initial( @@ -1433,11 +1431,7 @@ def _start_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1452,11 +1446,11 @@ def _start_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _start_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start"} # type: ignore + _start_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start'} # type: ignore @distributed_trace - def begin_start( # pylint: disable=inconsistent-return-statements + def begin_start( self, resource_uri, # type: str **kwargs # type: Any @@ -1468,6 +1462,9 @@ def begin_start( # pylint: disable=inconsistent-return-statements :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1480,8 +1477,8 @@ def begin_start( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1512,14 +1509,15 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_start.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start"} # type: ignore + begin_start.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/start'} # type: ignore - def _stop_initial( # pylint: disable=inconsistent-return-statements + def _stop_initial( self, resource_uri, # type: str - body, # type: "_models.StopVirtualMachineOptions" + body=None, # type: Optional["_models.StopVirtualMachineOptions"] **kwargs # type: Any ): # type: (...) -> None @@ -1529,10 +1527,13 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - _json = self._serialize.body(body, 'StopVirtualMachineOptions') + if body is not None: + _json = self._serialize.body(body, 'StopVirtualMachineOptions') + else: + _json = None request = build_stop_request_initial( resource_uri=resource_uri, @@ -1544,11 +1545,7 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202]: @@ -1563,14 +1560,14 @@ def _stop_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _stop_initial.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop"} # type: ignore + _stop_initial.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop'} # type: ignore @distributed_trace - def begin_stop( # pylint: disable=inconsistent-return-statements + def begin_stop( self, resource_uri, # type: str - body, # type: "_models.StopVirtualMachineOptions" + body=None, # type: Optional["_models.StopVirtualMachineOptions"] **kwargs # type: Any ): # type: (...) -> LROPoller[None] @@ -1582,6 +1579,9 @@ def begin_stop( # pylint: disable=inconsistent-return-statements :type resource_uri: str :param body: The content of the action request. :type body: ~azure.mgmt.scvmm.models.StopVirtualMachineOptions + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -1594,9 +1594,9 @@ def begin_stop( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -1629,6 +1629,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_stop.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop"} # type: ignore + begin_stop.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/stop'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_templates_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_templates_operations.py index 20fe2735540..9992e925cac 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_templates_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_machine_templates_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_subscription_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates") + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -72,31 +72,31 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates') 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), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -108,32 +108,32 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}') 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), "virtualMachineTemplateName": _SERIALIZER.url("virtual_machine_template_name", virtual_machine_template_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -145,35 +145,35 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}') 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), "virtualMachineTemplateName": _SERIALIZER.url("virtual_machine_template_name", virtual_machine_template_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -185,35 +185,35 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}') 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), "virtualMachineTemplateName": _SERIALIZER.url("virtual_machine_template_name", virtual_machine_template_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -225,35 +225,35 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}') 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), "virtualMachineTemplateName": _SERIALIZER.url("virtual_machine_template_name", virtual_machine_template_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -290,13 +290,16 @@ def list_by_subscription( List of VirtualMachineTemplates in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineTemplateListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VirtualMachineTemplateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplateListResult"] error_map = { @@ -336,11 +339,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,7 +353,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualMachineTemplates'} # type: ignore @distributed_trace def list_by_resource_group( @@ -369,13 +368,16 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualMachineTemplateListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VirtualMachineTemplateListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplateListResult"] error_map = { @@ -417,11 +419,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -435,7 +433,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates'} # type: ignore @distributed_trace def get( @@ -453,6 +451,9 @@ def get( :type resource_group_name: str :param virtual_machine_template_name: Name of the VirtualMachineTemplate. :type virtual_machine_template_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualMachineTemplate, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualMachineTemplate @@ -464,7 +465,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -477,11 +478,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -496,7 +493,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore def _create_or_update_initial( @@ -513,7 +510,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualMachineTemplate') @@ -530,11 +527,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -555,7 +548,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace @@ -577,6 +570,9 @@ def begin_create_or_update( :type virtual_machine_template_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualMachineTemplate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -590,9 +586,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] lro_delay = kwargs.pop( 'polling_interval', @@ -629,9 +625,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore def _update_initial( self, @@ -647,7 +644,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualMachineTemplateTagsUpdate') @@ -664,11 +661,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -690,7 +683,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace @@ -712,6 +705,9 @@ def begin_update( :type virtual_machine_template_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualMachineTemplateTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -725,9 +721,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualMachineTemplate] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineTemplate"] lro_delay = kwargs.pop( 'polling_interval', @@ -764,11 +760,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name, # type: str virtual_machine_template_name, # type: str @@ -782,7 +779,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -796,11 +793,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -816,11 +809,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name, # type: str virtual_machine_template_name, # type: str @@ -838,6 +831,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type virtual_machine_template_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -850,8 +846,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -884,6 +880,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualMachineTemplates/{virtualMachineTemplateName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_networks_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_networks_operations.py index 807178ed49d..1ec156124a9 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_networks_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_virtual_networks_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_subscription_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks") + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -72,31 +72,31 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks') 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), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -108,32 +108,32 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}') 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), "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -145,35 +145,35 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}') 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), "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -185,35 +185,35 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}') 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), "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -225,35 +225,35 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}') 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), "virtualNetworkName": _SERIALIZER.url("virtual_network_name", virtual_network_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -290,13 +290,16 @@ def list_by_subscription( List of VirtualNetworks in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] error_map = { @@ -336,11 +339,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -354,7 +353,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/virtualNetworks'} # type: ignore @distributed_trace def list_by_resource_group( @@ -369,13 +368,16 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VirtualNetworkListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VirtualNetworkListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetworkListResult"] error_map = { @@ -417,11 +419,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -435,7 +433,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks'} # type: ignore @distributed_trace def get( @@ -453,6 +451,9 @@ def get( :type resource_group_name: str :param virtual_network_name: Name of the VirtualNetwork. :type virtual_network_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VirtualNetwork, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VirtualNetwork @@ -464,7 +465,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -477,11 +478,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -496,7 +493,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore def _create_or_update_initial( @@ -513,7 +510,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VirtualNetwork') @@ -530,11 +527,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -555,7 +548,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace @@ -577,6 +570,9 @@ def begin_create_or_update( :type virtual_network_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VirtualNetwork + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -590,9 +586,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] lro_delay = kwargs.pop( 'polling_interval', @@ -629,9 +625,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore def _update_initial( self, @@ -647,7 +644,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VirtualNetworkTagsUpdate') @@ -664,11 +661,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -690,7 +683,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace @@ -712,6 +705,9 @@ def begin_update( :type virtual_network_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VirtualNetworkTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -725,9 +721,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VirtualNetwork] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualNetwork"] lro_delay = kwargs.pop( 'polling_interval', @@ -764,11 +760,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name, # type: str virtual_network_name, # type: str @@ -782,7 +779,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -796,11 +793,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -816,11 +809,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name, # type: str virtual_network_name, # type: str @@ -838,6 +831,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type virtual_network_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -850,8 +846,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -884,6 +880,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/virtualNetworks/{virtualNetworkName}'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vm_instance_hybrid_identity_metadatas_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vm_instance_hybrid_identity_metadatas_operations.py index cea2eb92007..ab924377c37 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vm_instance_hybrid_identity_metadatas_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vm_instance_hybrid_identity_metadatas_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -17,13 +16,14 @@ from azure.core.rest import HttpRequest from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -36,30 +36,30 @@ def build_list_by_virtual_machine_instance_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -69,30 +69,30 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default') path_format_arguments = { "resourceUri": _SERIALIZER.url("resource_uri", resource_uri, 'str', skip_quote=True), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -132,6 +132,9 @@ def list_by_virtual_machine_instance( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmInstanceHybridIdentityMetadataListResult or the result of cls(response) @@ -139,7 +142,7 @@ def list_by_virtual_machine_instance( ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VmInstanceHybridIdentityMetadataListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmInstanceHybridIdentityMetadataListResult"] error_map = { @@ -179,11 +182,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -197,7 +196,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_virtual_machine_instance.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata"} # type: ignore + list_by_virtual_machine_instance.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata'} # type: ignore @distributed_trace def get( @@ -212,6 +211,9 @@ def get( :param resource_uri: The fully qualified Azure Resource manager identifier of the resource. :type resource_uri: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VmInstanceHybridIdentityMetadata, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VmInstanceHybridIdentityMetadata @@ -223,7 +225,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -234,11 +236,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -253,5 +251,5 @@ def get( return deserialized - get.metadata = {'url': "/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default"} # type: ignore + get.metadata = {'url': '/{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default/hybridIdentityMetadata/default'} # type: ignore diff --git a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vmm_servers_operations.py b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vmm_servers_operations.py index db50bb189ff..1575054e6d2 100644 --- a/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vmm_servers_operations.py +++ b/src/scvmm/azext_scvmm/vendored_sdks/scvmm/operations/_vmm_servers_operations.py @@ -1,4 +1,3 @@ -# pylint: disable=too-many-lines # coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. @@ -6,9 +5,9 @@ # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +import functools from typing import TYPE_CHECKING - -from msrest import Serializer +import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged @@ -19,13 +18,14 @@ from azure.core.tracing.decorator import distributed_trace from azure.mgmt.core.exceptions import ARMErrorFormat from azure.mgmt.core.polling.arm_polling import ARMPolling +from msrest import Serializer from .. import models as _models from .._vendor import _convert_request, _format_url_section if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Iterable, Optional, TypeVar, Union + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] @@ -38,30 +38,30 @@ def build_list_by_subscription_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers") + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers') path_format_arguments = { "subscriptionId": _SERIALIZER.url("subscription_id", subscription_id, 'str'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -72,31 +72,31 @@ def build_list_by_resource_group_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers') 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), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -108,32 +108,32 @@ def build_get_request( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}') 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), "vmmServerName": _SERIALIZER.url("vmm_server_name", vmm_server_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="GET", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -145,35 +145,35 @@ def build_create_or_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}') 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), "vmmServerName": _SERIALIZER.url("vmm_server_name", vmm_server_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PUT", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -185,35 +185,35 @@ def build_update_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', None) # type: Optional[str] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}') 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), "vmmServerName": _SERIALIZER.url("vmm_server_name", vmm_server_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] if content_type is not None: - _header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters['Content-Type'] = _SERIALIZER.header("content_type", content_type, 'str') + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="PATCH", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -225,35 +225,35 @@ def build_delete_request_initial( **kwargs # type: Any ): # type: (...) -> HttpRequest - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str force = kwargs.pop('force', None) # type: Optional[Union[str, "_models.ForceDelete"]] accept = "application/json" # Construct URL - _url = kwargs.pop("template_url", "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}") # pylint: disable=line-too-long + url = kwargs.pop("template_url", '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}') 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), "vmmServerName": _SERIALIZER.url("vmm_server_name", vmm_server_name, 'str', max_length=54, min_length=1, pattern=r'[a-zA-Z0-9-_\.]'), } - _url = _format_url_section(_url, **path_format_arguments) + url = _format_url_section(url, **path_format_arguments) # Construct parameters - _query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] - _query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') + query_parameters = kwargs.pop("params", {}) # type: Dict[str, Any] + query_parameters['api-version'] = _SERIALIZER.query("api_version", api_version, 'str') if force is not None: - _query_parameters['force'] = _SERIALIZER.query("force", force, 'str') + query_parameters['force'] = _SERIALIZER.query("force", force, 'str') # Construct headers - _header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] - _header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') + header_parameters = kwargs.pop("headers", {}) # type: Dict[str, Any] + header_parameters['Accept'] = _SERIALIZER.header("accept", accept, 'str') return HttpRequest( method="DELETE", - url=_url, - params=_query_parameters, - headers=_header_parameters, + url=url, + params=query_parameters, + headers=header_parameters, **kwargs ) @@ -290,12 +290,15 @@ def list_by_subscription( List of VmmServers in a subscription. + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmmServerListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VmmServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServerListResult"] error_map = { @@ -335,11 +338,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -353,7 +352,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_subscription.metadata = {'url': "/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers"} # type: ignore + list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ScVmm/vmmServers'} # type: ignore @distributed_trace def list_by_resource_group( @@ -368,12 +367,15 @@ def list_by_resource_group( :param resource_group_name: The name of the resource group. The name is case insensitive. :type resource_group_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either VmmServerListResult or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.scvmm.models.VmmServerListResult] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServerListResult"] error_map = { @@ -415,11 +417,7 @@ def extract_data(pipeline_response): def get_next(next_link=None): request = prepare_request(next_link) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -433,7 +431,7 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list_by_resource_group.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers"} # type: ignore + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers'} # type: ignore @distributed_trace def get( @@ -451,6 +449,9 @@ def get( :type resource_group_name: str :param vmm_server_name: Name of the VmmServer. :type vmm_server_name: str + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :return: VmmServer, or the result of cls(response) :rtype: ~azure.mgmt.scvmm.models.VmmServer @@ -462,7 +463,7 @@ def get( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_get_request( @@ -475,11 +476,7 @@ def get( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: @@ -494,7 +491,7 @@ def get( return deserialized - get.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore def _create_or_update_initial( @@ -511,7 +508,7 @@ def _create_or_update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(resource, 'VmmServer') @@ -528,11 +525,7 @@ def _create_or_update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: @@ -553,7 +546,7 @@ def _create_or_update_initial( return deserialized - _create_or_update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _create_or_update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace @@ -575,6 +568,9 @@ def begin_create_or_update( :type vmm_server_name: str :param resource: Resource create parameters. :type resource: ~azure.mgmt.scvmm.models.VmmServer + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -587,9 +583,9 @@ def begin_create_or_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VmmServer] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServer"] lro_delay = kwargs.pop( 'polling_interval', @@ -626,9 +622,10 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_create_or_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore def _update_initial( self, @@ -644,7 +641,7 @@ def _update_initial( } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] _json = self._serialize.body(properties, 'VmmServerTagsUpdate') @@ -661,11 +658,7 @@ def _update_initial( request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 202]: @@ -687,7 +680,7 @@ def _update_initial( return deserialized - _update_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _update_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace @@ -709,6 +702,9 @@ def begin_update( :type vmm_server_name: str :param properties: The resource properties to be updated. :type properties: ~azure.mgmt.scvmm.models.VmmServerTagsUpdate + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -721,9 +717,9 @@ def begin_update( :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.scvmm.models.VmmServer] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str content_type = kwargs.pop('content_type', "application/json") # type: Optional[str] - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType["_models.VmmServer"] lro_delay = kwargs.pop( 'polling_interval', @@ -760,11 +756,12 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_update.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore - def _delete_initial( # pylint: disable=inconsistent-return-statements + def _delete_initial( self, resource_group_name, # type: str vmm_server_name, # type: str @@ -778,7 +775,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements } error_map.update(kwargs.pop('error_map', {})) - api_version = kwargs.pop('api_version', "2023-10-07") # type: str + api_version = kwargs.pop('api_version', "2025-03-13") # type: str request = build_delete_request_initial( @@ -792,11 +789,7 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements request = _convert_request(request) request.url = self._client.format_url(request.url) - pipeline_response = self._client._pipeline.run( # pylint: disable=protected-access - request, - stream=False, - **kwargs - ) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [202, 204]: @@ -812,11 +805,11 @@ def _delete_initial( # pylint: disable=inconsistent-return-statements if cls: return cls(pipeline_response, None, response_headers) - _delete_initial.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + _delete_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore @distributed_trace - def begin_delete( # pylint: disable=inconsistent-return-statements + def begin_delete( self, resource_group_name, # type: str vmm_server_name, # type: str @@ -834,6 +827,9 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :type vmm_server_name: str :param force: Forces the resource to be deleted. :type force: str or ~azure.mgmt.scvmm.models.ForceDelete + :keyword api_version: Api Version. The default value is "2025-03-13". Note that overriding this + default value may result in unsupported behavior. + :paramtype api_version: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. :keyword polling: By default, your polling method will be ARMPolling. Pass in False for this @@ -846,8 +842,8 @@ def begin_delete( # pylint: disable=inconsistent-return-statements :rtype: ~azure.core.polling.LROPoller[None] :raises: ~azure.core.exceptions.HttpResponseError """ - api_version = kwargs.pop('api_version', "2023-10-07") # type: str - polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + api_version = kwargs.pop('api_version', "2025-03-13") # type: str + polling = kwargs.pop('polling', True) # type: Union[bool, azure.core.polling.PollingMethod] cls = kwargs.pop('cls', None) # type: ClsType[None] lro_delay = kwargs.pop( 'polling_interval', @@ -880,6 +876,7 @@ def get_long_running_output(pipeline_response): client=self._client, deserialization_callback=get_long_running_output ) - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - begin_delete.metadata = {'url': "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}"} # type: ignore + begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ScVmm/vmmServers/{vmmServerName}'} # type: ignore From 0292bc4ac84dc75c8f20cda4a3b69ac9b9dab096 Mon Sep 17 00:00:00 2001 From: kartikverma020 <146417388+kartikverma020@users.noreply.github.com> Date: Wed, 9 Apr 2025 14:57:59 +0530 Subject: [PATCH 2/4] Changes for new version. Added new version 1.1.3 in history.rst and setup.py --- src/scvmm/HISTORY.rst | 4 ++++ src/scvmm/setup.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/scvmm/HISTORY.rst b/src/scvmm/HISTORY.rst index 11167cbd6de..d0e90e72f1c 100644 --- a/src/scvmm/HISTORY.rst +++ b/src/scvmm/HISTORY.rst @@ -3,6 +3,10 @@ Release History =============== +1.1.3 +++++++ +* Bump API version to stable/2025-03-13. + 1.1.2 ++++++ * Security upgrades and fixes - Drop `msrestazure` dependency. diff --git a/src/scvmm/setup.py b/src/scvmm/setup.py index db44381759f..d81ca1afd43 100644 --- a/src/scvmm/setup.py +++ b/src/scvmm/setup.py @@ -16,7 +16,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") -VERSION = '1.1.2' +VERSION = '1.1.3' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers From b1ea0d0fa77f8674ddf1f5cfb68b531548d89a63 Mon Sep 17 00:00:00 2001 From: kartikverma020 <146417388+kartikverma020@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:59:29 +0530 Subject: [PATCH 3/4] Updating custom.py Adding guest os properties in create vm and private link scope resource id in enable guest agent. --- src/scvmm/azext_scvmm/custom.py | 40 +++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/scvmm/azext_scvmm/custom.py b/src/scvmm/azext_scvmm/custom.py index e100721ac8e..71cd2a3689b 100644 --- a/src/scvmm/azext_scvmm/custom.py +++ b/src/scvmm/azext_scvmm/custom.py @@ -550,7 +550,16 @@ def create_vm( inventory_item=None, vm_template=None, cloud=None, + admin_username=None, admin_password=None, + computer_name=None, + domain_name=None, + domain_username=None, + domain_password=None, + workgroup=None, + product_key=None, + timezone=None, + run_once_commands=None, cpu_count=None, memory_size=None, dynamic_memory_enabled=None, @@ -593,8 +602,33 @@ def create_vm( dynamic_memory_max_mb=dynamic_memory_max, ) - if admin_password is not None: - os_profile = OsProfileForVmInstance(admin_password=admin_password) + if any( + prop is not None + for prop in [ + admin_username, + admin_password, + computer_name, + domain_name, + domain_username, + domain_password, + workgroup, + product_key, + timezone, + run_once_commands, + ] + ): + os_profile = OsProfileForVmInstance( + admin_username=admin_username, + admin_password=admin_password, + computer_name=computer_name, + domain_name=domain_name, + domain_username=domain_username, + domain_password=domain_password, + workgroup=workgroup, + product_key=product_key, + timezone=timezone, + run_once_commands=run_once_commands, + ) if nics is not None: network_profile = NetworkProfile( @@ -1825,6 +1859,7 @@ def enable_guest_agent( vm_name, username, password, + private_link_scope_resource_id=None, https_proxy=None, no_wait=False, ): @@ -1854,6 +1889,7 @@ def enable_guest_agent( credentials=vm_creds, http_proxy_config=https_proxy_config, provisioning_action=GUEST_AGENT_PROVISIONING_ACTION_INSTALL, + private_link_scope_resource_id=private_link_scope_resource_id, ) guest_agent = GuestAgent(properties=guest_agent_props) From c86a79742509c8883b27fb2ee7832a913c614384 Mon Sep 17 00:00:00 2001 From: kartikverma020 <146417388+kartikverma020@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:10:34 +0530 Subject: [PATCH 4/4] Minor changes. --- src/scvmm/HISTORY.rst | 2 +- src/scvmm/setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scvmm/HISTORY.rst b/src/scvmm/HISTORY.rst index d0e90e72f1c..c8d9f1bc78e 100644 --- a/src/scvmm/HISTORY.rst +++ b/src/scvmm/HISTORY.rst @@ -3,7 +3,7 @@ Release History =============== -1.1.3 +1.2.0 ++++++ * Bump API version to stable/2025-03-13. diff --git a/src/scvmm/setup.py b/src/scvmm/setup.py index d81ca1afd43..bc7ad2eceef 100644 --- a/src/scvmm/setup.py +++ b/src/scvmm/setup.py @@ -16,7 +16,7 @@ logger.warn("Wheel is not available, disabling bdist_wheel hook") -VERSION = '1.1.3' +VERSION = '1.2.0' # The full list of classifiers is available at # https://pypi.python.org/pypi?%3Aaction=list_classifiers