Skip to content

Commit 357584a

Browse files
Azure CLI BotSDKAutoYan Zhang (WICRESOFT NORTH AMERICA LTD)
authored
[AutoRelease] t2-managedservices-2021-04-22-08436(wave4) (Azure#18224)
* CodeGen from PR 14064 in Azure/azure-rest-api-specs managedservices t2 onfig (Azure#14064) Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> * version,CHANGELOG * test * modify version Co-authored-by: SDKAuto <sdkautomation@microsoft.com> Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com> Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
1 parent ebc130f commit 357584a

22 files changed

+534
-529
lines changed

sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Release History
22

3+
## 6.0.0 (2021-04-22)
4+
5+
**Features**
6+
7+
- Added operation group MarketplaceRegistrationDefinitionsWithoutScopeOperations
8+
39
## 6.0.0b1 (2020-12-07)
410

511
This is beta preview version.

sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"autorest": "3.3.0",
3+
"use": "@autorest/python@5.6.6",
4+
"commit": "528c0cffd4de3d4acdf451a1ea5f7cf6f3cb790c",
5+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
6+
"autorest_command": "autorest specification/managedservices/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.6 --version=3.3.0",
7+
"readme": "specification/managedservices/resource-manager/readme.md"
8+
}

sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/_managed_services_client.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
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 ManagedServicesClientConfiguration
2122
from .operations import RegistrationDefinitionsOperations
2223
from .operations import RegistrationAssignmentsOperations
2324
from .operations import MarketplaceRegistrationDefinitionsOperations
25+
from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
2426
from .operations import Operations
2527
from . import models
2628

@@ -34,6 +36,8 @@ class ManagedServicesClient(object):
3436
:vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations
3537
:ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations
3638
:vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations
39+
:ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations
40+
:vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations
3741
:ivar operations: Operations operations
3842
:vartype operations: azure.mgmt.managedservices.operations.Operations
3943
:param credential: Credential needed for the client to connect to Azure.
@@ -65,9 +69,26 @@ def __init__(
6569
self._client, self._config, self._serialize, self._deserialize)
6670
self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations(
6771
self._client, self._config, self._serialize, self._deserialize)
72+
self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations(
73+
self._client, self._config, self._serialize, self._deserialize)
6874
self.operations = Operations(
6975
self._client, self._config, self._serialize, self._deserialize)
7076

77+
def _send_request(self, http_request, **kwargs):
78+
# type: (HttpRequest, Any) -> HttpResponse
79+
"""Runs the network request through the client's chained policies.
80+
81+
:param http_request: The network request you want to make. Required.
82+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
83+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
84+
:return: The response of your network call. Does not do error handling on your response.
85+
:rtype: ~azure.core.pipeline.transport.HttpResponse
86+
"""
87+
http_request.url = self._client.format_url(http_request.url)
88+
stream = kwargs.pop("stream", True)
89+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
90+
return pipeline_response.http_response
91+
7192
def close(self):
7293
# type: () -> None
7394
self._client.close()
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"chosen_version": "2020-02-01-preview",
3+
"total_api_version_list": ["2020-02-01-preview"],
4+
"client": {
5+
"name": "ManagedServicesClient",
6+
"filename": "_managed_services_client",
7+
"description": "Specification for ManagedServices.",
8+
"base_url": "\u0027https://management.azure.com\u0027",
9+
"custom_base_url": null,
10+
"azure_arm": true,
11+
"has_lro_operations": true,
12+
"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\": [\"ManagedServicesClientConfiguration\"]}}, \"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\": [\"ManagedServicesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
15+
},
16+
"global_parameters": {
17+
"sync": {
18+
"credential": {
19+
"signature": "credential, # type: \"TokenCredential\"",
20+
"description": "Credential needed for the client to connect to Azure.",
21+
"docstring_type": "~azure.core.credentials.TokenCredential",
22+
"required": true
23+
}
24+
},
25+
"async": {
26+
"credential": {
27+
"signature": "credential: \"AsyncTokenCredential\",",
28+
"description": "Credential needed for the client to connect to Azure.",
29+
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
30+
"required": true
31+
}
32+
},
33+
"constant": {
34+
},
35+
"call": "credential",
36+
"service_client_specific": {
37+
"sync": {
38+
"api_version": {
39+
"signature": "api_version=None, # type: Optional[str]",
40+
"description": "API version to use if no profile is provided, or if missing in profile.",
41+
"docstring_type": "str",
42+
"required": false
43+
},
44+
"base_url": {
45+
"signature": "base_url=None, # type: Optional[str]",
46+
"description": "Service URL",
47+
"docstring_type": "str",
48+
"required": false
49+
},
50+
"profile": {
51+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
52+
"description": "A profile definition, from KnownProfiles to dict.",
53+
"docstring_type": "azure.profiles.KnownProfiles",
54+
"required": false
55+
}
56+
},
57+
"async": {
58+
"api_version": {
59+
"signature": "api_version: Optional[str] = None,",
60+
"description": "API version to use if no profile is provided, or if missing in profile.",
61+
"docstring_type": "str",
62+
"required": false
63+
},
64+
"base_url": {
65+
"signature": "base_url: Optional[str] = None,",
66+
"description": "Service URL",
67+
"docstring_type": "str",
68+
"required": false
69+
},
70+
"profile": {
71+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
72+
"description": "A profile definition, from KnownProfiles to dict.",
73+
"docstring_type": "azure.profiles.KnownProfiles",
74+
"required": false
75+
}
76+
}
77+
}
78+
},
79+
"config": {
80+
"credential": true,
81+
"credential_scopes": ["https://management.azure.com/.default"],
82+
"credential_default_policy_type": "BearerTokenCredentialPolicy",
83+
"credential_default_policy_type_has_async_version": true,
84+
"credential_key_header_name": null,
85+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
86+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
87+
},
88+
"operation_groups": {
89+
"registration_definitions": "RegistrationDefinitionsOperations",
90+
"registration_assignments": "RegistrationAssignmentsOperations",
91+
"marketplace_registration_definitions": "MarketplaceRegistrationDefinitionsOperations",
92+
"marketplace_registration_definitions_without_scope": "MarketplaceRegistrationDefinitionsWithoutScopeOperations",
93+
"operations": "Operations"
94+
}
95+
}

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

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

9-
VERSION = "6.0.0b1"
10-
9+
VERSION = "6.0.0"

sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/_managed_services_client.py

Lines changed: 20 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

@@ -19,6 +20,7 @@
1920
from .operations import RegistrationDefinitionsOperations
2021
from .operations import RegistrationAssignmentsOperations
2122
from .operations import MarketplaceRegistrationDefinitionsOperations
23+
from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
2224
from .operations import Operations
2325
from .. import models
2426

@@ -32,6 +34,8 @@ class ManagedServicesClient(object):
3234
:vartype registration_assignments: azure.mgmt.managedservices.aio.operations.RegistrationAssignmentsOperations
3335
:ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations
3436
:vartype marketplace_registration_definitions: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsOperations
37+
:ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations
38+
:vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations
3539
:ivar operations: Operations operations
3640
:vartype operations: azure.mgmt.managedservices.aio.operations.Operations
3741
:param credential: Credential needed for the client to connect to Azure.
@@ -62,9 +66,25 @@ def __init__(
6266
self._client, self._config, self._serialize, self._deserialize)
6367
self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations(
6468
self._client, self._config, self._serialize, self._deserialize)
69+
self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations(
70+
self._client, self._config, self._serialize, self._deserialize)
6571
self.operations = Operations(
6672
self._client, self._config, self._serialize, self._deserialize)
6773

74+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
75+
"""Runs the network request through the client's chained policies.
76+
77+
:param http_request: The network request you want to make. Required.
78+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
79+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
80+
:return: The response of your network call. Does not do error handling on your response.
81+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
82+
"""
83+
http_request.url = self._client.format_url(http_request.url)
84+
stream = kwargs.pop("stream", True)
85+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
86+
return pipeline_response.http_response
87+
6888
async def close(self) -> None:
6989
await self._client.close()
7090

sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
from ._registration_definitions_operations import RegistrationDefinitionsOperations
1010
from ._registration_assignments_operations import RegistrationAssignmentsOperations
1111
from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations
12+
from ._marketplace_registration_definitions_without_scope_operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
1213
from ._operations import Operations
1314

1415
__all__ = [
1516
'RegistrationDefinitionsOperations',
1617
'RegistrationAssignmentsOperations',
1718
'MarketplaceRegistrationDefinitionsOperations',
19+
'MarketplaceRegistrationDefinitionsWithoutScopeOperations',
1820
'Operations',
1921
]

sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_operations.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ async def get_next(next_link=None):
106106
response = pipeline_response.http_response
107107

108108
if response.status_code not in [200]:
109-
error = self._deserialize(_models.ErrorResponse, response)
109+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
110110
map_error(status_code=response.status_code, response=response, error_map=error_map)
111111
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
112112

@@ -127,7 +127,7 @@ async def get(
127127
128128
:param scope: Scope of the resource.
129129
:type scope: str
130-
:param marketplace_identifier: Market place identifer. Expected Formats -
130+
:param marketplace_identifier: Market place identifier. Expected Formats -
131131
{publisher}.{product[-preview]}.{planName}.{version} or
132132
{publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
133133
:type marketplace_identifier: str
@@ -166,7 +166,7 @@ async def get(
166166

167167
if response.status_code not in [200]:
168168
map_error(status_code=response.status_code, response=response, error_map=error_map)
169-
error = self._deserialize(_models.ErrorResponse, response)
169+
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
170170
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)
171171

172172
deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response)

0 commit comments

Comments
 (0)