Skip to content

Commit 5999fda

Browse files
author
SDKAuto
committed
CodeGen from PR 16870 in Azure/azure-rest-api-specs
Merge 060b8c0b612f9682ea4128bbd36a6d1827b1fdbc into b6b8345
1 parent 9e1d561 commit 5999fda

12 files changed

+208
-39
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": "ea6ceada9e22eb0d455288d339955dfe56521302",
2+
"autorest": "3.4.5",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "3b39b0c64c68ef272c51511518a2d388b394b826",
58
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6-
"autorest_command": "autorest specification/azurestack/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/azurestack/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/azurestack/resource-manager/readme.md"
811
}

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_azure_stack_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 AzureStackManagementClientConfiguration
2122
from .operations import Operations
@@ -80,6 +81,24 @@ def __init__(
8081
self.linked_subscriptions = LinkedSubscriptionsOperations(
8182
self._client, self._config, self._serialize, self._deserialize)
8283

84+
def _send_request(self, http_request, **kwargs):
85+
# type: (HttpRequest, Any) -> HttpResponse
86+
"""Runs the network request through the client's chained policies.
87+
88+
:param http_request: The network request you want to make. Required.
89+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
90+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
91+
:return: The response of your network call. Does not do error handling on your response.
92+
:rtype: ~azure.core.pipeline.transport.HttpResponse
93+
"""
94+
path_format_arguments = {
95+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
96+
}
97+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
98+
stream = kwargs.pop("stream", True)
99+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
100+
return pipeline_response.http_response
101+
83102
def close(self):
84103
# type: () -> None
85104
self._client.close()

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

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"azure_arm": true,
1111
"has_lro_operations": false,
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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"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\": [\"AzureStackManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1515
},
1616
"global_parameters": {
1717
"sync": {
@@ -104,11 +104,5 @@
104104
"products": "ProductsOperations",
105105
"registrations": "RegistrationsOperations",
106106
"linked_subscriptions": "LinkedSubscriptionsOperations"
107-
},
108-
"operation_mixins": {
109-
"sync_imports": "None",
110-
"async_imports": "None",
111-
"operations": {
112-
}
113107
}
114108
}

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "1.0.0"
9+
VERSION = "1.0.0b1"

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/_azure_stack_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

@@ -77,6 +78,23 @@ def __init__(
7778
self.linked_subscriptions = LinkedSubscriptionsOperations(
7879
self._client, self._config, self._serialize, self._deserialize)
7980

81+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
82+
"""Runs the network request through the client's chained policies.
83+
84+
:param http_request: The network request you want to make. Required.
85+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
86+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
87+
:return: The response of your network call. Does not do error handling on your response.
88+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
89+
"""
90+
path_format_arguments = {
91+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
92+
}
93+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
94+
stream = kwargs.pop("stream", True)
95+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
96+
return pipeline_response.http_response
97+
8098
async def close(self) -> None:
8199
await self._client.close()
82100

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_cloud_manifest_file_operations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4242

4343
async def list(
4444
self,
45-
**kwargs
45+
**kwargs: Any
4646
) -> "_models.CloudManifestFileResponse":
4747
"""Returns a cloud specific manifest JSON file with latest version.
4848
@@ -91,7 +91,7 @@ async def get(
9191
self,
9292
verification_version: str,
9393
version_creation_date: Optional[str] = None,
94-
**kwargs
94+
**kwargs: Any
9595
) -> "_models.CloudManifestFileResponse":
9696
"""Returns a cloud specific manifest JSON file.
9797

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_customer_subscriptions_operations.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def list(
4545
self,
4646
resource_group: str,
4747
registration_name: str,
48-
**kwargs
48+
**kwargs: Any
4949
) -> AsyncIterable["_models.CustomerSubscriptionList"]:
5050
"""Returns a list of products.
5151
@@ -121,7 +121,7 @@ async def get(
121121
resource_group: str,
122122
registration_name: str,
123123
customer_subscription_name: str,
124-
**kwargs
124+
**kwargs: Any
125125
) -> "_models.CustomerSubscription":
126126
"""Returns the specified product.
127127
@@ -184,7 +184,7 @@ async def delete(
184184
resource_group: str,
185185
registration_name: str,
186186
customer_subscription_name: str,
187-
**kwargs
187+
**kwargs: Any
188188
) -> None:
189189
"""Deletes a customer subscription under a registration.
190190
@@ -245,7 +245,7 @@ async def create(
245245
registration_name: str,
246246
customer_subscription_name: str,
247247
customer_creation_parameters: "_models.CustomerSubscription",
248-
**kwargs
248+
**kwargs: Any
249249
) -> "_models.CustomerSubscription":
250250
"""Creates a new customer subscription under a registration.
251251

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_linked_subscriptions_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4444
def list_by_resource_group(
4545
self,
4646
resource_group: str,
47-
**kwargs
47+
**kwargs: Any
4848
) -> AsyncIterable["_models.LinkedSubscriptionsList"]:
4949
"""Returns a list of all linked subscriptions under current resource group.
5050
@@ -114,7 +114,7 @@ async def get_next(next_link=None):
114114

115115
def list_by_subscription(
116116
self,
117-
**kwargs
117+
**kwargs: Any
118118
) -> AsyncIterable["_models.LinkedSubscriptionsList"]:
119119
"""Returns a list of all linked subscriptions under current subscription.
120120
@@ -183,7 +183,7 @@ async def get(
183183
self,
184184
resource_group: str,
185185
linked_subscription_name: str,
186-
**kwargs
186+
**kwargs: Any
187187
) -> "_models.LinkedSubscription":
188188
"""Returns the properties of a Linked Subscription resource.
189189
@@ -242,7 +242,7 @@ async def delete(
242242
self,
243243
resource_group: str,
244244
linked_subscription_name: str,
245-
**kwargs
245+
**kwargs: Any
246246
) -> None:
247247
"""Delete the requested Linked Subscription resource.
248248
@@ -299,7 +299,7 @@ async def create_or_update(
299299
resource_group: str,
300300
linked_subscription_name: str,
301301
resource: "_models.LinkedSubscriptionParameter",
302-
**kwargs
302+
**kwargs: Any
303303
) -> "_models.LinkedSubscription":
304304
"""Create or update a linked subscription resource.
305305
@@ -370,7 +370,7 @@ async def update(
370370
resource_group: str,
371371
linked_subscription_name: str,
372372
resource: "_models.LinkedSubscriptionParameter",
373-
**kwargs
373+
**kwargs: Any
374374
) -> "_models.LinkedSubscription":
375375
"""Patch a Linked Subscription resource.
376376

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_operations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
4343

4444
def list(
4545
self,
46-
**kwargs
46+
**kwargs: Any
4747
) -> AsyncIterable["_models.OperationList"]:
4848
"""Returns the list of supported REST operations.
4949

sdk/azurestack/azure-mgmt-azurestack/azure/mgmt/azurestack/aio/operations/_products_operations.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def list(
4545
self,
4646
resource_group: str,
4747
registration_name: str,
48-
**kwargs
48+
**kwargs: Any
4949
) -> AsyncIterable["_models.ProductList"]:
5050
"""Returns a list of products.
5151
@@ -121,7 +121,7 @@ async def get(
121121
resource_group: str,
122122
registration_name: str,
123123
product_name: str,
124-
**kwargs
124+
**kwargs: Any
125125
) -> "_models.Product":
126126
"""Returns the specified product.
127127
@@ -184,7 +184,7 @@ async def list_details(
184184
resource_group: str,
185185
registration_name: str,
186186
product_name: str,
187-
**kwargs
187+
**kwargs: Any
188188
) -> "_models.ExtendedProduct":
189189
"""Returns the extended properties of a product.
190190
@@ -248,7 +248,7 @@ async def get_products(
248248
registration_name: str,
249249
product_name: str,
250250
device_configuration: Optional["_models.DeviceConfiguration"] = None,
251-
**kwargs
251+
**kwargs: Any
252252
) -> "_models.ProductList":
253253
"""Returns a list of products.
254254
@@ -322,7 +322,7 @@ async def get_product(
322322
registration_name: str,
323323
product_name: str,
324324
device_configuration: Optional["_models.DeviceConfiguration"] = None,
325-
**kwargs
325+
**kwargs: Any
326326
) -> "_models.Product":
327327
"""Returns the specified product.
328328
@@ -396,7 +396,7 @@ async def upload_log(
396396
registration_name: str,
397397
product_name: str,
398398
marketplace_product_log_update: Optional["_models.MarketplaceProductLogUpdate"] = None,
399-
**kwargs
399+
**kwargs: Any
400400
) -> "_models.ProductLog":
401401
"""Returns the specified product.
402402

0 commit comments

Comments
 (0)