Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoRelease] t2-managedservices-2021-04-22-08436(wave4) #18224

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions sdk/managedservices/azure-mgmt-managedservices/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Release History

## 6.0.0 (2021-04-22)

**Features**

- Added operation group MarketplaceRegistrationDefinitionsWithoutScopeOperations

## 6.0.0b1 (2020-12-07)

This is beta preview version.
Expand Down
1 change: 1 addition & 0 deletions sdk/managedservices/azure-mgmt-managedservices/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
Expand Down
8 changes: 8 additions & 0 deletions sdk/managedservices/azure-mgmt-managedservices/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.3.0",
"use": "@autorest/[email protected]",
"commit": "528c0cffd4de3d4acdf451a1ea5f7cf6f3cb790c",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"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/[email protected] --version=3.3.0",
"readme": "specification/managedservices/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
from typing import Any, Optional

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

from ._configuration import ManagedServicesClientConfiguration
from .operations import RegistrationDefinitionsOperations
from .operations import RegistrationAssignmentsOperations
from .operations import MarketplaceRegistrationDefinitionsOperations
from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
from .operations import Operations
from . import models

Expand All @@ -34,6 +36,8 @@ class ManagedServicesClient(object):
:vartype registration_assignments: azure.mgmt.managedservices.operations.RegistrationAssignmentsOperations
:ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations
:vartype marketplace_registration_definitions: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsOperations
:ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations
:vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.managedservices.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
Expand Down Expand Up @@ -65,9 +69,26 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
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
"""
http_request.url = self._client.format_url(http_request.url)
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
@@ -0,0 +1,95 @@
{
"chosen_version": "2020-02-01-preview",
"total_api_version_list": ["2020-02-01-preview"],
"client": {
"name": "ManagedServicesClient",
"filename": "_managed_services_client",
"description": "Specification for ManagedServices.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"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\": [\"ManagedServicesClientConfiguration\"]}}, \"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\": [\"ManagedServicesClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
}
},
"constant": {
},
"call": "credential",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"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\"]}}}",
"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\"]}}}"
},
"operation_groups": {
"registration_definitions": "RegistrationDefinitionsOperations",
"registration_assignments": "RegistrationAssignmentsOperations",
"marketplace_registration_definitions": "MarketplaceRegistrationDefinitionsOperations",
"marketplace_registration_definitions_without_scope": "MarketplaceRegistrationDefinitionsWithoutScopeOperations",
"operations": "Operations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "6.0.0b1"

VERSION = "6.0.0"
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 All @@ -19,6 +20,7 @@
from .operations import RegistrationDefinitionsOperations
from .operations import RegistrationAssignmentsOperations
from .operations import MarketplaceRegistrationDefinitionsOperations
from .operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
from .operations import Operations
from .. import models

Expand All @@ -32,6 +34,8 @@ class ManagedServicesClient(object):
:vartype registration_assignments: azure.mgmt.managedservices.aio.operations.RegistrationAssignmentsOperations
:ivar marketplace_registration_definitions: MarketplaceRegistrationDefinitionsOperations operations
:vartype marketplace_registration_definitions: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsOperations
:ivar marketplace_registration_definitions_without_scope: MarketplaceRegistrationDefinitionsWithoutScopeOperations operations
:vartype marketplace_registration_definitions_without_scope: azure.mgmt.managedservices.aio.operations.MarketplaceRegistrationDefinitionsWithoutScopeOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.managedservices.aio.operations.Operations
:param credential: Credential needed for the client to connect to Azure.
Expand Down Expand Up @@ -62,9 +66,25 @@ def __init__(
self._client, self._config, self._serialize, self._deserialize)
self.marketplace_registration_definitions = MarketplaceRegistrationDefinitionsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.marketplace_registration_definitions_without_scope = MarketplaceRegistrationDefinitionsWithoutScopeOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
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
"""
http_request.url = self._client.format_url(http_request.url)
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 @@ -9,11 +9,13 @@
from ._registration_definitions_operations import RegistrationDefinitionsOperations
from ._registration_assignments_operations import RegistrationAssignmentsOperations
from ._marketplace_registration_definitions_operations import MarketplaceRegistrationDefinitionsOperations
from ._marketplace_registration_definitions_without_scope_operations import MarketplaceRegistrationDefinitionsWithoutScopeOperations
from ._operations import Operations

__all__ = [
'RegistrationDefinitionsOperations',
'RegistrationAssignmentsOperations',
'MarketplaceRegistrationDefinitionsOperations',
'MarketplaceRegistrationDefinitionsWithoutScopeOperations',
'Operations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand All @@ -127,7 +127,7 @@ async def get(

:param scope: Scope of the resource.
:type scope: str
:param marketplace_identifier: Market place identifer. Expected Formats -
:param marketplace_identifier: Market place identifier. Expected Formats -
{publisher}.{product[-preview]}.{planName}.{version} or
{publisher}.{product[-preview]}.{planName} or {publisher}.{product[-preview]} or {publisher}).
:type marketplace_identifier: str
Expand Down Expand Up @@ -166,7 +166,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.ErrorResponse, response)
error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('MarketplaceRegistrationDefinition', pipeline_response)
Expand Down
Loading