Skip to content

Commit

Permalink
CodeGen from PR 14507 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
T2 compute 0521 (Azure#14507)

* sql t2 readme config

* readme config

* Update readme.python.md

* conflient resolve

* readme t2 config

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
  • Loading branch information
SDKAuto and msyyc committed May 21, 2021
1 parent a98297f commit 24849e9
Show file tree
Hide file tree
Showing 705 changed files with 64,938 additions and 10,933 deletions.
11 changes: 7 additions & 4 deletions sdk/compute/azure-mgmt-compute/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.0.6369",
"use": "@autorest/python@5.6.2",
"commit": "b79c669038a6932848bf402578a4bceb2e9f329c",
"autorest": "3.4.2",
"use": [
"@autorest/python@5.8.0",
"@autorest/modelerfour@4.19.1"
],
"commit": "c31e0ae92120556e42561c55f832d6c014d239e9",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/compute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.2 --version=3.0.6369",
"autorest_command": "autorest specification/compute/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2",
"readme": "specification/compute/resource-manager/readme.md"
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# --------------------------------------------------------------------------

from ._compute_management_client import ComputeManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['ComputeManagementClient']

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from typing import Any, Optional

from azure.core.credentials import TokenCredential
from azure.core.pipeline.transport import HttpRequest, HttpResponse

from ._configuration import ComputeManagementClientConfiguration
from .operations import AvailabilitySetsOperations
Expand Down Expand Up @@ -96,6 +97,24 @@ def __init__(
self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations(
self._client, self._config, self._serialize, self._deserialize)

def _send_request(self, http_request, **kwargs):
# type: (HttpRequest, Any) -> HttpResponse
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.HttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

def close(self):
# type: () -> None
self._client.close()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class ComputeManagementClientConfiguration(Configuration):
"""Configuration for ComputeManagementClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ComputeManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
Expand Down Expand Up @@ -107,11 +107,5 @@
"virtual_machines": "VirtualMachinesOperations",
"virtual_machine_scale_sets": "VirtualMachineScaleSetsOperations",
"virtual_machine_scale_set_vms": "VirtualMachineScaleSetVMsOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from typing import Any, Optional, TYPE_CHECKING

from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
from azure.mgmt.core import AsyncARMPipelineClient
from msrest import Deserializer, Serializer

Expand Down Expand Up @@ -93,6 +94,23 @@ def __init__(
self.virtual_machine_scale_set_vms = VirtualMachineScaleSetVMsOperations(
self._client, self._config, self._serialize, self._deserialize)

async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
"""Runs the network request through the client's chained policies.
:param http_request: The network request you want to make. Required.
:type http_request: ~azure.core.pipeline.transport.HttpRequest
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
:return: The response of your network call. Does not do error handling on your response.
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
"""
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
stream = kwargs.pop("stream", True)
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
return pipeline_response.http_response

async def close(self) -> None:
await self._client.close()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

VERSION = "unknown"

class ComputeManagementClientConfiguration(Configuration):
"""Configuration for ComputeManagementClient.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def create_or_update(
resource_group_name: str,
name: str,
parameters: "_models.AvailabilitySet",
**kwargs
**kwargs: Any
) -> "_models.AvailabilitySet":
"""Create or update an availability set.
Expand Down Expand Up @@ -111,7 +111,7 @@ async def delete(
self,
resource_group_name: str,
availability_set_name: str,
**kwargs
**kwargs: Any
) -> Optional["_models.OperationStatusResponse"]:
"""Delete an availability set.
Expand Down Expand Up @@ -171,7 +171,7 @@ async def get(
self,
resource_group_name: str,
availability_set_name: str,
**kwargs
**kwargs: Any
) -> "_models.AvailabilitySet":
"""Retrieves information about an availability set.
Expand Down Expand Up @@ -228,7 +228,7 @@ async def get(
def list(
self,
resource_group_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AvailabilitySetListResult"]:
"""Lists all availability sets in a resource group.
Expand Down Expand Up @@ -299,7 +299,7 @@ def list_available_sizes(
self,
resource_group_name: str,
availability_set_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.VirtualMachineSizeListResult"]:
"""Lists all available virtual machine sizes that can be used to create a new virtual machine in
an existing availability set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def list(
self,
location: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ListUsagesResult"]:
"""Gets, for the specified location, the current compute resource usage information as well as the
limits for compute resources under the subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def get(
publisher_name: str,
type: str,
version: str,
**kwargs
**kwargs: Any
) -> "_models.VirtualMachineExtensionImage":
"""Gets a virtual machine extension image.
Expand Down Expand Up @@ -110,7 +110,7 @@ async def list_types(
self,
location: str,
publisher_name: str,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineExtensionImage"]:
"""Gets a list of virtual machine extension image types.
Expand Down Expand Up @@ -172,7 +172,7 @@ async def list_versions(
filter: Optional[str] = None,
top: Optional[int] = None,
orderby: Optional[str] = None,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineExtensionImage"]:
"""Gets a list of virtual machine extension image versions.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def _create_or_update_initial(
vm_name: str,
vm_extension_name: str,
extension_parameters: "_models.VirtualMachineExtension",
**kwargs
**kwargs: Any
) -> "_models.VirtualMachineExtension":
cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineExtension"]
error_map = {
Expand Down Expand Up @@ -107,7 +107,7 @@ async def begin_create_or_update(
vm_name: str,
vm_extension_name: str,
extension_parameters: "_models.VirtualMachineExtension",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.VirtualMachineExtension"]:
"""The operation to create or update the extension.
Expand All @@ -123,8 +123,8 @@ async def begin_create_or_update(
:type extension_parameters: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtension
: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: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either VirtualMachineExtension or the result of cls(response)
Expand Down Expand Up @@ -185,7 +185,7 @@ async def _update_initial(
vm_name: str,
vm_extension_name: str,
extension_parameters: "_models.VirtualMachineExtensionUpdate",
**kwargs
**kwargs: Any
) -> "_models.VirtualMachineExtension":
cls = kwargs.pop('cls', None) # type: ClsType["_models.VirtualMachineExtension"]
error_map = {
Expand Down Expand Up @@ -240,7 +240,7 @@ async def begin_update(
vm_name: str,
vm_extension_name: str,
extension_parameters: "_models.VirtualMachineExtensionUpdate",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.VirtualMachineExtension"]:
"""The operation to update the extension.
Expand All @@ -255,8 +255,8 @@ async def begin_update(
:type extension_parameters: ~azure.mgmt.compute.v2015_06_15.models.VirtualMachineExtensionUpdate
: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: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either VirtualMachineExtension or the result of cls(response)
Expand Down Expand Up @@ -316,7 +316,7 @@ async def _delete_initial(
resource_group_name: str,
vm_name: str,
vm_extension_name: str,
**kwargs
**kwargs: Any
) -> Optional["_models.OperationStatusResponse"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationStatusResponse"]]
error_map = {
Expand Down Expand Up @@ -367,7 +367,7 @@ async def begin_delete(
resource_group_name: str,
vm_name: str,
vm_extension_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.OperationStatusResponse"]:
"""The operation to delete the extension.
Expand All @@ -379,8 +379,8 @@ async def begin_delete(
:type vm_extension_name: 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: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:keyword polling: By default, your polling method will be AsyncARMPolling.
Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either OperationStatusResponse or the result of cls(response)
Expand Down Expand Up @@ -440,7 +440,7 @@ async def get(
vm_name: str,
vm_extension_name: str,
expand: Optional[str] = None,
**kwargs
**kwargs: Any
) -> "_models.VirtualMachineExtension":
"""The operation to get the extension.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ async def get(
offer: str,
skus: str,
version: str,
**kwargs
**kwargs: Any
) -> "_models.VirtualMachineImage":
"""Gets a virtual machine image.
Expand Down Expand Up @@ -119,7 +119,7 @@ async def list(
expand: Optional[str] = None,
top: Optional[int] = None,
orderby: Optional[str] = None,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineImageResource"]:
"""Gets a list of all virtual machine image versions for the specified location, publisher, offer,
and SKU.
Expand Down Expand Up @@ -196,7 +196,7 @@ async def list_offers(
self,
location: str,
publisher_name: str,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineImageResource"]:
"""Gets a list of virtual machine image offers for the specified location and publisher.
Expand Down Expand Up @@ -253,7 +253,7 @@ async def list_offers(
async def list_publishers(
self,
location: str,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineImageResource"]:
"""Gets a list of virtual machine image publishers for the specified Azure location.
Expand Down Expand Up @@ -309,7 +309,7 @@ async def list_skus(
location: str,
publisher_name: str,
offer: str,
**kwargs
**kwargs: Any
) -> List["_models.VirtualMachineImageResource"]:
"""Gets a list of virtual machine image SKUs for the specified location, publisher, and offer.
Expand Down
Loading

0 comments on commit 24849e9

Please sign in to comment.