Skip to content

Commit 2b1b494

Browse files
author
SDKAuto
committed
CodeGen from PR 15211 in Azure/azure-rest-api-specs
Merge ab1975bbfe34e47e8054c28328ee3946d67fad77 into 14f9889
1 parent 053e685 commit 2b1b494

30 files changed

+600
-316
lines changed
Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"autorest": "3.0.6369",
3-
"use": "@autorest/[email protected]",
4-
"commit": "5d89c9807d3e84a5890b381a68a308198f9ef141",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "776cfde9501cc9659314a83f8b0dfeea49fd6aea",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/hybridnetwork/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",
9+
"autorest_command": "autorest specification/hybridnetwork/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.4 --use=@autorest/[email protected].2 --version=3.4.5",
710
"readme": "specification/hybridnetwork/resource-manager/readme.md"
811
}

sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2020-01-01-preview"
51+
self.api_version = "2021-05-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-hybridnetwork/{}'.format(VERSION))
5454
self._configure(**kwargs)

sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_hybrid_network_management_client.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import HybridNetworkManagementClientConfiguration
2122
from .operations import NetworkFunctionsOperations
@@ -101,6 +102,24 @@ def __init__(
101102
self.role_instances = RoleInstancesOperations(
102103
self._client, self._config, self._serialize, self._deserialize)
103104

105+
def _send_request(self, http_request, **kwargs):
106+
# type: (HttpRequest, Any) -> HttpResponse
107+
"""Runs the network request through the client's chained policies.
108+
109+
:param http_request: The network request you want to make. Required.
110+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
111+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
112+
:return: The response of your network call. Does not do error handling on your response.
113+
:rtype: ~azure.core.pipeline.transport.HttpResponse
114+
"""
115+
path_format_arguments = {
116+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
117+
}
118+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
119+
stream = kwargs.pop("stream", True)
120+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
121+
return pipeline_response.http_response
122+
104123
def close(self):
105124
# type: () -> None
106125
self._client.close()

sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/_metadata.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2020-01-01-preview",
3-
"total_api_version_list": ["2020-01-01-preview"],
2+
"chosen_version": "2021-05-01",
3+
"total_api_version_list": ["2021-05-01"],
44
"client": {
55
"name": "HybridNetworkManagementClient",
66
"filename": "_hybrid_network_management_client",
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": true,
1212
"client_side_validation": false,
13-
"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\": [\"HybridNetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
14-
"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\": [\"HybridNetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
13+
"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\": [\"HybridNetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"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\": [\"HybridNetworkManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -108,11 +108,5 @@
108108
"network_function_vendor_skus": "NetworkFunctionVendorSkusOperations",
109109
"vendor_network_functions": "VendorNetworkFunctionsOperations",
110110
"role_instances": "RoleInstancesOperations"
111-
},
112-
"operation_mixins": {
113-
"sync_imports": "None",
114-
"async_imports": "None",
115-
"operations": {
116-
}
117111
}
118112
}

sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2020-01-01-preview"
48+
self.api_version = "2021-05-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-hybridnetwork/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/hybridnetwork/azure-mgmt-hybridnetwork/azure/mgmt/hybridnetwork/aio/_hybrid_network_management_client.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -98,6 +99,23 @@ def __init__(
9899
self.role_instances = RoleInstancesOperations(
99100
self._client, self._config, self._serialize, self._deserialize)
100101

102+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
103+
"""Runs the network request through the client's chained policies.
104+
105+
:param http_request: The network request you want to make. Required.
106+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
107+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
108+
:return: The response of your network call. Does not do error handling on your response.
109+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
110+
"""
111+
path_format_arguments = {
112+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1),
113+
}
114+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
115+
stream = kwargs.pop("stream", True)
116+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
117+
return pipeline_response.http_response
118+
101119
async def close(self) -> None:
102120
await self._client.close()
103121

0 commit comments

Comments
 (0)