Skip to content

Commit

Permalink
[AutoRelease] t2-rdbms-2021-06-03-12642 (#19065)
Browse files Browse the repository at this point in the history
* CodeGen from PR 14608 in Azure/azure-rest-api-specs
Mariadb t2 config (#14608)

* sql t2 readme config

* readme config

* Update readme.python.md

* conflient resolve

* mariadb readme config

* readme.python config

* track1 del

Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>

* version,CHANGELOG

* test

* test config

* changelog config

* _version confgi

* version

* Update CHANGELOG.md

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
Co-authored-by: PythonSdkPipelines <PythonSdkPipelines>
Co-authored-by: Zed <601306339@qq.com>
  • Loading branch information
4 people authored Jun 8, 2021
1 parent f24a2a6 commit 0dec745
Show file tree
Hide file tree
Showing 53 changed files with 811 additions and 5,716 deletions.
4 changes: 4 additions & 0 deletions sdk/rdbms/azure-mgmt-rdbms/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release History

## 8.1.0 (2021-06-08)

- New models and operations for mariadb

## 8.1.0b4 (2021-04-29)

**Features**
Expand Down
13 changes: 8 additions & 5 deletions sdk/rdbms/azure-mgmt-rdbms/_meta.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"autorest": "3.3.0",
"use": "@autorest/python@5.6.6",
"commit": "62e437e7b686c6f4fbc3e7f8b34749899932c221",
"autorest": "3.4.2",
"use": [
"@autorest/python@5.8.0",
"@autorest/modelerfour@4.19.2"
],
"commit": "5b141b3de81d3a38ee2406e1a9db5a9ecd08ff7d",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/postgresql/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",
"readme": "specification/postgresql/resource-manager/readme.md"
"autorest_command": "autorest specification/mariadb/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.2 --version=3.4.2",
"readme": "specification/mariadb/resource-manager/readme.md"
}
2 changes: 1 addition & 1 deletion sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "8.1.0b4"
VERSION = "8.1.0"
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
# --------------------------------------------------------------------------

from ._maria_db_management_client import MariaDBManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['MariaDBManagementClient']

try:
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 MariaDBManagementClientConfiguration(Configuration):
"""Configuration for MariaDBManagementClient.
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 MariaDBManagementClientConfiguration
from .operations import ServersOperations
Expand Down Expand Up @@ -167,6 +168,24 @@ def __init__(
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
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', min_length=1),
}
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
167 changes: 167 additions & 0 deletions sdk/rdbms/azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/_metadata.json

Large diffs are not rendered by default.

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 = "8.1.0"
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 MariaDBManagementClientConfiguration(Configuration):
"""Configuration for MariaDBManagementClient.
Expand Down
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 @@ -164,6 +165,23 @@ def __init__(
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
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', min_length=1),
}
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 @@ -46,7 +46,7 @@ async def get(
resource_group_name: str,
server_name: str,
advisor_name: str,
**kwargs
**kwargs: Any
) -> "_models.Advisor":
"""Get a recommendation action advisor.
Expand Down Expand Up @@ -107,7 +107,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.AdvisorsResultList"]:
"""List recommendation action advisors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
async def execute(
self,
name_availability_request: "_models.NameAvailabilityRequest",
**kwargs
**kwargs: Any
) -> "_models.NameAvailability":
"""Check the availability of name for resource.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
configuration_name: str,
parameters: "_models.Configuration",
**kwargs
**kwargs: Any
) -> Optional["_models.Configuration"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Configuration"]]
error_map = {
Expand Down Expand Up @@ -106,7 +106,7 @@ async def begin_create_or_update(
server_name: str,
configuration_name: str,
parameters: "_models.Configuration",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.Configuration"]:
"""Updates a configuration of a server.
Expand All @@ -120,8 +120,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.Configuration
: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: True for ARMPolling, False for no polling, or a
polling object for 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 Configuration or the result of cls(response)
Expand Down Expand Up @@ -181,7 +181,7 @@ async def get(
resource_group_name: str,
server_name: str,
configuration_name: str,
**kwargs
**kwargs: Any
) -> "_models.Configuration":
"""Gets information about a configuration of server.
Expand Down Expand Up @@ -242,7 +242,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.ConfigurationListResult"]:
"""List all the configurations in a given server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
database_name: str,
parameters: "_models.Database",
**kwargs
**kwargs: Any
) -> Optional["_models.Database"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.Database"]]
error_map = {
Expand Down Expand Up @@ -109,7 +109,7 @@ async def begin_create_or_update(
server_name: str,
database_name: str,
parameters: "_models.Database",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.Database"]:
"""Creates a new database or updates an existing database.
Expand All @@ -123,8 +123,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.Database
: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: True for ARMPolling, False for no polling, or a
polling object for 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 Database or the result of cls(response)
Expand Down Expand Up @@ -184,7 +184,7 @@ async def _delete_initial(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
Expand Down Expand Up @@ -230,7 +230,7 @@ async def begin_delete(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes a database.
Expand All @@ -242,8 +242,8 @@ async def begin_delete(
:type database_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: True for ARMPolling, False for no polling, or a
polling object for 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 None or the result of cls(response)
Expand Down Expand Up @@ -299,7 +299,7 @@ async def get(
resource_group_name: str,
server_name: str,
database_name: str,
**kwargs
**kwargs: Any
) -> "_models.Database":
"""Gets information about a database.
Expand Down Expand Up @@ -360,7 +360,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.DatabaseListResult"]:
"""List all the databases in a given server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async def _create_or_update_initial(
server_name: str,
firewall_rule_name: str,
parameters: "_models.FirewallRule",
**kwargs
**kwargs: Any
) -> Optional["_models.FirewallRule"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.FirewallRule"]]
error_map = {
Expand Down Expand Up @@ -109,7 +109,7 @@ async def begin_create_or_update(
server_name: str,
firewall_rule_name: str,
parameters: "_models.FirewallRule",
**kwargs
**kwargs: Any
) -> AsyncLROPoller["_models.FirewallRule"]:
"""Creates a new firewall rule or updates an existing firewall rule.
Expand All @@ -123,8 +123,8 @@ async def begin_create_or_update(
:type parameters: ~azure.mgmt.rdbms.mariadb.models.FirewallRule
: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: True for ARMPolling, False for no polling, or a
polling object for 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 FirewallRule or the result of cls(response)
Expand Down Expand Up @@ -184,7 +184,7 @@ async def _delete_initial(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> None:
cls = kwargs.pop('cls', None) # type: ClsType[None]
error_map = {
Expand Down Expand Up @@ -230,7 +230,7 @@ async def begin_delete(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> AsyncLROPoller[None]:
"""Deletes a server firewall rule.
Expand All @@ -242,8 +242,8 @@ async def begin_delete(
:type firewall_rule_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: True for ARMPolling, False for no polling, or a
polling object for 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 None or the result of cls(response)
Expand Down Expand Up @@ -299,7 +299,7 @@ async def get(
resource_group_name: str,
server_name: str,
firewall_rule_name: str,
**kwargs
**kwargs: Any
) -> "_models.FirewallRule":
"""Gets information about a server firewall rule.
Expand Down Expand Up @@ -360,7 +360,7 @@ def list_by_server(
self,
resource_group_name: str,
server_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.FirewallRuleListResult"]:
"""List all the firewall rules in a given server.
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_name: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PerformanceTierListResult"]:
"""List all the performance tiers at specified location in a given subscription.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ async def get(
self,
location_name: str,
operation_id: str,
**kwargs
**kwargs: Any
) -> "_models.RecommendedActionSessionsOperationStatus":
"""Recommendation action session operation status.
Expand Down
Loading

0 comments on commit 0dec745

Please sign in to comment.