Skip to content

Commit

Permalink
[AutoPR] mariadb/resource-manager (#3332)
Browse files Browse the repository at this point in the history
* [AutoPR mariadb/resource-manager] Add mariadb swagger spec (#3257)

* Generated from d76559bb32dbc6be98d3f9cc774377be21694188

Add mariadb swagger spec

* Generated from 74e04a40cc63c0e6634cce5256bc660b8986132e

Fix readme and set properties

* Packaging update of azure-mgmt-rdbms

* Update version.py
  • Loading branch information
AutorestCI authored and lmazuel committed Sep 13, 2018
1 parent f9a85de commit 5691267
Show file tree
Hide file tree
Showing 70 changed files with 5,163 additions and 9 deletions.
10 changes: 3 additions & 7 deletions azure-mgmt-rdbms/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is the Microsoft Azure RDBMS Management Client Library.
Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.
Expand Down Expand Up @@ -36,12 +36,8 @@ If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
Usage
=====

For code examples, see `PostgreSQL
<https://docs.microsoft.com/python/api/overview/azure/postgresql>`__
on docs.microsoft.com.

For code examples, see `MySQL
<https://docs.microsoft.com/python/api/overview/azure/mysql>`__
For code examples, see `RDBMS Management
<https://docs.microsoft.com/python/api/overview/azure/>`__
on docs.microsoft.com.


Expand Down
18 changes: 18 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# 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.
# --------------------------------------------------------------------------

from .maria_db_management_client import MariaDBManagementClient
from .version import VERSION

__all__ = ['MariaDBManagementClient']

__version__ = VERSION

Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# 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.
# --------------------------------------------------------------------------

from msrest.service_client import SDKClient
from msrest import Serializer, Deserializer
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.servers_operations import ServersOperations
from .operations.firewall_rules_operations import FirewallRulesOperations
from .operations.databases_operations import DatabasesOperations
from .operations.configurations_operations import ConfigurationsOperations
from .operations.log_files_operations import LogFilesOperations
from .operations.location_based_performance_tier_operations import LocationBasedPerformanceTierOperations
from .operations.check_name_availability_operations import CheckNameAvailabilityOperations
from .operations.server_security_alert_policies_operations import ServerSecurityAlertPoliciesOperations
from .operations.operations import Operations
from . import models


class MariaDBManagementClientConfiguration(AzureConfiguration):
"""Configuration for MariaDBManagementClient
Note that all parameters used to create this instance are saved as instance
attributes.
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription ID that identifies an Azure
subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

if credentials is None:
raise ValueError("Parameter 'credentials' must not be None.")
if subscription_id is None:
raise ValueError("Parameter 'subscription_id' must not be None.")
if not base_url:
base_url = 'https://management.azure.com'

super(MariaDBManagementClientConfiguration, self).__init__(base_url)

self.add_user_agent('azure-mgmt-rdbms/{}'.format(VERSION))
self.add_user_agent('Azure-SDK-For-Python')

self.credentials = credentials
self.subscription_id = subscription_id


class MariaDBManagementClient(SDKClient):
"""MariaDB Client
:ivar config: Configuration for client.
:vartype config: MariaDBManagementClientConfiguration
:ivar servers: Servers operations
:vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations
:ivar databases: Databases operations
:vartype databases: azure.mgmt.rdbms.mariadb.operations.DatabasesOperations
:ivar configurations: Configurations operations
:vartype configurations: azure.mgmt.rdbms.mariadb.operations.ConfigurationsOperations
:ivar log_files: LogFiles operations
:vartype log_files: azure.mgmt.rdbms.mariadb.operations.LogFilesOperations
:ivar location_based_performance_tier: LocationBasedPerformanceTier operations
:vartype location_based_performance_tier: azure.mgmt.rdbms.mariadb.operations.LocationBasedPerformanceTierOperations
:ivar check_name_availability: CheckNameAvailability operations
:vartype check_name_availability: azure.mgmt.rdbms.mariadb.operations.CheckNameAvailabilityOperations
:ivar server_security_alert_policies: ServerSecurityAlertPolicies operations
:vartype server_security_alert_policies: azure.mgmt.rdbms.mariadb.operations.ServerSecurityAlertPoliciesOperations
:ivar operations: Operations operations
:vartype operations: azure.mgmt.rdbms.mariadb.operations.Operations
:param credentials: Credentials needed for the client to connect to Azure.
:type credentials: :mod:`A msrestazure Credentials
object<msrestazure.azure_active_directory>`
:param subscription_id: The subscription ID that identifies an Azure
subscription.
:type subscription_id: str
:param str base_url: Service URL
"""

def __init__(
self, credentials, subscription_id, base_url=None):

self.config = MariaDBManagementClientConfiguration(credentials, subscription_id, base_url)
super(MariaDBManagementClient, self).__init__(self.config.credentials, self.config)

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self.api_version = '2018-06-01-preview'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.servers = ServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.firewall_rules = FirewallRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.databases = DatabasesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.configurations = ConfigurationsOperations(
self._client, self.config, self._serialize, self._deserialize)
self.log_files = LogFilesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.location_based_performance_tier = LocationBasedPerformanceTierOperations(
self._client, self.config, self._serialize, self._deserialize)
self.check_name_availability = CheckNameAvailabilityOperations(
self._client, self.config, self._serialize, self._deserialize)
self.server_security_alert_policies = ServerSecurityAlertPoliciesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self.config, self._serialize, self._deserialize)
113 changes: 113 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# 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.
# --------------------------------------------------------------------------

try:
from .proxy_resource_py3 import ProxyResource
from .tracked_resource_py3 import TrackedResource
from .storage_profile_py3 import StorageProfile
from .server_properties_for_create_py3 import ServerPropertiesForCreate
from .server_properties_for_default_create_py3 import ServerPropertiesForDefaultCreate
from .server_properties_for_restore_py3 import ServerPropertiesForRestore
from .server_properties_for_geo_restore_py3 import ServerPropertiesForGeoRestore
from .sku_py3 import Sku
from .server_py3 import Server
from .server_for_create_py3 import ServerForCreate
from .server_update_parameters_py3 import ServerUpdateParameters
from .firewall_rule_py3 import FirewallRule
from .database_py3 import Database
from .configuration_py3 import Configuration
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .operation_list_result_py3 import OperationListResult
from .log_file_py3 import LogFile
from .performance_tier_service_level_objectives_py3 import PerformanceTierServiceLevelObjectives
from .performance_tier_properties_py3 import PerformanceTierProperties
from .name_availability_request_py3 import NameAvailabilityRequest
from .name_availability_py3 import NameAvailability
from .server_security_alert_policy_py3 import ServerSecurityAlertPolicy
except (SyntaxError, ImportError):
from .proxy_resource import ProxyResource
from .tracked_resource import TrackedResource
from .storage_profile import StorageProfile
from .server_properties_for_create import ServerPropertiesForCreate
from .server_properties_for_default_create import ServerPropertiesForDefaultCreate
from .server_properties_for_restore import ServerPropertiesForRestore
from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore
from .sku import Sku
from .server import Server
from .server_for_create import ServerForCreate
from .server_update_parameters import ServerUpdateParameters
from .firewall_rule import FirewallRule
from .database import Database
from .configuration import Configuration
from .operation_display import OperationDisplay
from .operation import Operation
from .operation_list_result import OperationListResult
from .log_file import LogFile
from .performance_tier_service_level_objectives import PerformanceTierServiceLevelObjectives
from .performance_tier_properties import PerformanceTierProperties
from .name_availability_request import NameAvailabilityRequest
from .name_availability import NameAvailability
from .server_security_alert_policy import ServerSecurityAlertPolicy
from .server_paged import ServerPaged
from .firewall_rule_paged import FirewallRulePaged
from .database_paged import DatabasePaged
from .configuration_paged import ConfigurationPaged
from .log_file_paged import LogFilePaged
from .performance_tier_properties_paged import PerformanceTierPropertiesPaged
from .maria_db_management_client_enums import (
ServerVersion,
SslEnforcementEnum,
ServerState,
GeoRedundantBackup,
SkuTier,
OperationOrigin,
ServerSecurityAlertPolicyState,
)

__all__ = [
'ProxyResource',
'TrackedResource',
'StorageProfile',
'ServerPropertiesForCreate',
'ServerPropertiesForDefaultCreate',
'ServerPropertiesForRestore',
'ServerPropertiesForGeoRestore',
'Sku',
'Server',
'ServerForCreate',
'ServerUpdateParameters',
'FirewallRule',
'Database',
'Configuration',
'OperationDisplay',
'Operation',
'OperationListResult',
'LogFile',
'PerformanceTierServiceLevelObjectives',
'PerformanceTierProperties',
'NameAvailabilityRequest',
'NameAvailability',
'ServerSecurityAlertPolicy',
'ServerPaged',
'FirewallRulePaged',
'DatabasePaged',
'ConfigurationPaged',
'LogFilePaged',
'PerformanceTierPropertiesPaged',
'ServerVersion',
'SslEnforcementEnum',
'ServerState',
'GeoRedundantBackup',
'SkuTier',
'OperationOrigin',
'ServerSecurityAlertPolicyState',
]
70 changes: 70 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/configuration.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 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.
# --------------------------------------------------------------------------

from .proxy_resource import ProxyResource


class Configuration(ProxyResource):
"""Represents a Configuration.
Variables are only populated by the server, and will be ignored when
sending a request.
:ivar id: Resource ID
:vartype id: str
:ivar name: Resource name.
:vartype name: str
:ivar type: Resource type.
:vartype type: str
:param value: Value of the configuration.
:type value: str
:ivar description: Description of the configuration.
:vartype description: str
:ivar default_value: Default value of the configuration.
:vartype default_value: str
:ivar data_type: Data type of the configuration.
:vartype data_type: str
:ivar allowed_values: Allowed values of the configuration.
:vartype allowed_values: str
:param source: Source of the configuration.
:type source: str
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'description': {'readonly': True},
'default_value': {'readonly': True},
'data_type': {'readonly': True},
'allowed_values': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'value': {'key': 'properties.value', 'type': 'str'},
'description': {'key': 'properties.description', 'type': 'str'},
'default_value': {'key': 'properties.defaultValue', 'type': 'str'},
'data_type': {'key': 'properties.dataType', 'type': 'str'},
'allowed_values': {'key': 'properties.allowedValues', 'type': 'str'},
'source': {'key': 'properties.source', 'type': 'str'},
}

def __init__(self, **kwargs):
super(Configuration, self).__init__(**kwargs)
self.value = kwargs.get('value', None)
self.description = None
self.default_value = None
self.data_type = None
self.allowed_values = None
self.source = kwargs.get('source', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.
# --------------------------------------------------------------------------

from msrest.paging import Paged


class ConfigurationPaged(Paged):
"""
A paging container for iterating over a list of :class:`Configuration <azure.mgmt.rdbms.mariadb.models.Configuration>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[Configuration]'}
}

def __init__(self, *args, **kwargs):

super(ConfigurationPaged, self).__init__(*args, **kwargs)
Loading

0 comments on commit 5691267

Please sign in to comment.