Skip to content

Commit

Permalink
[AutoPR] mariadb/resource-manager (#3980)
Browse files Browse the repository at this point in the history
* Generated from 17ec7c2490ebb4fbbd1b3f459afb8fd3b7ff6f74 (#3951)

typo: mariadb/resource-manager/Microsoft.DBforMariaDB

- allowd -> allowed
- Trim trailing spaces

* [AutoPR mariadb/resource-manager] Update MariaDB default API version to 2018-06-01 (#4460)

* Generated from 6dc88857bdcf5ba185555564f857c9d389297e44

Update MariaDB default API version to 2018-06-01

* Packaging update of azure-mgmt-rdbms

* Packaging update of azure-mgmt-rdbms

* RDBMS 1.7.0
  • Loading branch information
AutorestCI authored and lmazuel committed Mar 2, 2019
1 parent 2beb99d commit 26eb888
Show file tree
Hide file tree
Showing 26 changed files with 383 additions and 29 deletions.
12 changes: 12 additions & 0 deletions azure-mgmt-rdbms/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Release History
===============

1.7.0 (2019-03-01)
++++++++++++++++++

**Features (MariaDB only)**

- Model ServerUpdateParameters has a new parameter replication_role
- Model Server has a new parameter master_server_id
- Model Server has a new parameter replica_capacity
- Model Server has a new parameter replication_role
- Added operation ServersOperations.restart
- Added operation group ReplicasOperations

1.6.0 (2019-02-26)
++++++++++++++++++

Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-rdbms/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from msrestazure import AzureConfiguration
from .version import VERSION
from .operations.servers_operations import ServersOperations
from .operations.replicas_operations import ReplicasOperations
from .operations.firewall_rules_operations import FirewallRulesOperations
from .operations.virtual_network_rules_operations import VirtualNetworkRulesOperations
from .operations.databases_operations import DatabasesOperations
Expand Down Expand Up @@ -67,6 +68,8 @@ class MariaDBManagementClient(SDKClient):
:ivar servers: Servers operations
:vartype servers: azure.mgmt.rdbms.mariadb.operations.ServersOperations
:ivar replicas: Replicas operations
:vartype replicas: azure.mgmt.rdbms.mariadb.operations.ReplicasOperations
:ivar firewall_rules: FirewallRules operations
:vartype firewall_rules: azure.mgmt.rdbms.mariadb.operations.FirewallRulesOperations
:ivar virtual_network_rules: VirtualNetworkRules operations
Expand Down Expand Up @@ -102,12 +105,14 @@ def __init__(
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.api_version = '2018-06-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)

self.servers = ServersOperations(
self._client, self.config, self._serialize, self._deserialize)
self.replicas = ReplicasOperations(
self._client, self.config, self._serialize, self._deserialize)
self.firewall_rules = FirewallRulesOperations(
self._client, self.config, self._serialize, self._deserialize)
self.virtual_network_rules = VirtualNetworkRulesOperations(
Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
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 .server_properties_for_replica_py3 import ServerPropertiesForReplica
from .sku_py3 import Sku
from .server_py3 import Server
from .server_for_create_py3 import ServerForCreate
Expand All @@ -42,6 +43,7 @@
from .server_properties_for_default_create import ServerPropertiesForDefaultCreate
from .server_properties_for_restore import ServerPropertiesForRestore
from .server_properties_for_geo_restore import ServerPropertiesForGeoRestore
from .server_properties_for_replica import ServerPropertiesForReplica
from .sku import Sku
from .server import Server
from .server_for_create import ServerForCreate
Expand Down Expand Up @@ -85,6 +87,7 @@
'ServerPropertiesForDefaultCreate',
'ServerPropertiesForRestore',
'ServerPropertiesForGeoRestore',
'ServerPropertiesForReplica',
'Sku',
'Server',
'ServerForCreate',
Expand Down
14 changes: 14 additions & 0 deletions azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ class Server(TrackedResource):
:type earliest_restore_date: datetime
:param storage_profile: Storage profile of a server.
:type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile
:param replication_role: The replication role of the server.
:type replication_role: str
:param master_server_id: The master server id of a replica server.
:type master_server_id: str
:param replica_capacity: The maximum number of replicas that a master
server can have.
:type replica_capacity: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'replica_capacity': {'minimum': 0},
}

_attribute_map = {
Expand All @@ -77,6 +85,9 @@ class Server(TrackedResource):
'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
'replication_role': {'key': 'properties.replicationRole', 'type': 'str'},
'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'},
'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'},
}

def __init__(self, **kwargs):
Expand All @@ -89,3 +100,6 @@ def __init__(self, **kwargs):
self.fully_qualified_domain_name = kwargs.get('fully_qualified_domain_name', None)
self.earliest_restore_date = kwargs.get('earliest_restore_date', None)
self.storage_profile = kwargs.get('storage_profile', None)
self.replication_role = kwargs.get('replication_role', None)
self.master_server_id = kwargs.get('master_server_id', None)
self.replica_capacity = kwargs.get('replica_capacity', None)
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ServerPropertiesForCreate(Model):
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ServerPropertiesForDefaultCreate,
ServerPropertiesForRestore, ServerPropertiesForGeoRestore
ServerPropertiesForRestore, ServerPropertiesForGeoRestore,
ServerPropertiesForReplica
All required parameters must be populated in order to send to Azure.
Expand Down Expand Up @@ -45,7 +46,7 @@ class ServerPropertiesForCreate(Model):
}

_subtype_map = {
'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'}
'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'}
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ class ServerPropertiesForCreate(Model):
You probably want to use the sub-classes and not this class directly. Known
sub-classes are: ServerPropertiesForDefaultCreate,
ServerPropertiesForRestore, ServerPropertiesForGeoRestore
ServerPropertiesForRestore, ServerPropertiesForGeoRestore,
ServerPropertiesForReplica
All required parameters must be populated in order to send to Azure.
Expand Down Expand Up @@ -45,7 +46,7 @@ class ServerPropertiesForCreate(Model):
}

_subtype_map = {
'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore'}
'create_mode': {'Default': 'ServerPropertiesForDefaultCreate', 'PointInTimeRestore': 'ServerPropertiesForRestore', 'GeoRestore': 'ServerPropertiesForGeoRestore', 'Replica': 'ServerPropertiesForReplica'}
}

def __init__(self, *, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 .server_properties_for_create import ServerPropertiesForCreate


class ServerPropertiesForReplica(ServerPropertiesForCreate):
"""The properties to create a new replica.
All required parameters must be populated in order to send to Azure.
:param version: Server version. Possible values include: '5.6', '5.7'
:type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion
:param ssl_enforcement: Enable ssl enforcement or not when connect to
server. Possible values include: 'Enabled', 'Disabled'
:type ssl_enforcement: str or
~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum
:param storage_profile: Storage profile of a server.
:type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile
:param create_mode: Required. Constant filled by server.
:type create_mode: str
:param source_server_id: Required. The master server id to create replica
from.
:type source_server_id: str
"""

_validation = {
'create_mode': {'required': True},
'source_server_id': {'required': True},
}

_attribute_map = {
'version': {'key': 'version', 'type': 'str'},
'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'},
'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'},
'create_mode': {'key': 'createMode', 'type': 'str'},
'source_server_id': {'key': 'sourceServerId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(ServerPropertiesForReplica, self).__init__(**kwargs)
self.source_server_id = kwargs.get('source_server_id', None)
self.create_mode = 'Replica'
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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 .server_properties_for_create_py3 import ServerPropertiesForCreate


class ServerPropertiesForReplica(ServerPropertiesForCreate):
"""The properties to create a new replica.
All required parameters must be populated in order to send to Azure.
:param version: Server version. Possible values include: '5.6', '5.7'
:type version: str or ~azure.mgmt.rdbms.mariadb.models.ServerVersion
:param ssl_enforcement: Enable ssl enforcement or not when connect to
server. Possible values include: 'Enabled', 'Disabled'
:type ssl_enforcement: str or
~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum
:param storage_profile: Storage profile of a server.
:type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile
:param create_mode: Required. Constant filled by server.
:type create_mode: str
:param source_server_id: Required. The master server id to create replica
from.
:type source_server_id: str
"""

_validation = {
'create_mode': {'required': True},
'source_server_id': {'required': True},
}

_attribute_map = {
'version': {'key': 'version', 'type': 'str'},
'ssl_enforcement': {'key': 'sslEnforcement', 'type': 'SslEnforcementEnum'},
'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'},
'create_mode': {'key': 'createMode', 'type': 'str'},
'source_server_id': {'key': 'sourceServerId', 'type': 'str'},
}

def __init__(self, *, source_server_id: str, version=None, ssl_enforcement=None, storage_profile=None, **kwargs) -> None:
super(ServerPropertiesForReplica, self).__init__(version=version, ssl_enforcement=ssl_enforcement, storage_profile=storage_profile, **kwargs)
self.source_server_id = source_server_id
self.create_mode = 'Replica'
16 changes: 15 additions & 1 deletion azure-mgmt-rdbms/azure/mgmt/rdbms/mariadb/models/server_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,21 @@ class Server(TrackedResource):
:type earliest_restore_date: datetime
:param storage_profile: Storage profile of a server.
:type storage_profile: ~azure.mgmt.rdbms.mariadb.models.StorageProfile
:param replication_role: The replication role of the server.
:type replication_role: str
:param master_server_id: The master server id of a replica server.
:type master_server_id: str
:param replica_capacity: The maximum number of replicas that a master
server can have.
:type replica_capacity: int
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
'location': {'required': True},
'replica_capacity': {'minimum': 0},
}

_attribute_map = {
Expand All @@ -77,9 +85,12 @@ class Server(TrackedResource):
'fully_qualified_domain_name': {'key': 'properties.fullyQualifiedDomainName', 'type': 'str'},
'earliest_restore_date': {'key': 'properties.earliestRestoreDate', 'type': 'iso-8601'},
'storage_profile': {'key': 'properties.storageProfile', 'type': 'StorageProfile'},
'replication_role': {'key': 'properties.replicationRole', 'type': 'str'},
'master_server_id': {'key': 'properties.masterServerId', 'type': 'str'},
'replica_capacity': {'key': 'properties.replicaCapacity', 'type': 'int'},
}

def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, **kwargs) -> None:
def __init__(self, *, location: str, tags=None, sku=None, administrator_login: str=None, version=None, ssl_enforcement=None, user_visible_state=None, fully_qualified_domain_name: str=None, earliest_restore_date=None, storage_profile=None, replication_role: str=None, master_server_id: str=None, replica_capacity: int=None, **kwargs) -> None:
super(Server, self).__init__(location=location, tags=tags, **kwargs)
self.sku = sku
self.administrator_login = administrator_login
Expand All @@ -89,3 +100,6 @@ def __init__(self, *, location: str, tags=None, sku=None, administrator_login: s
self.fully_qualified_domain_name = fully_qualified_domain_name
self.earliest_restore_date = earliest_restore_date
self.storage_profile = storage_profile
self.replication_role = replication_role
self.master_server_id = master_server_id
self.replica_capacity = replica_capacity
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class ServerUpdateParameters(Model):
server. Possible values include: 'Enabled', 'Disabled'
:type ssl_enforcement: str or
~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum
:param replication_role: The replication role of the server.
:type replication_role: str
:param tags: Application-specific metadata in the form of key-value pairs.
:type tags: dict[str, str]
"""
Expand All @@ -39,6 +41,7 @@ class ServerUpdateParameters(Model):
'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'str'},
'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'},
'replication_role': {'key': 'properties.replicationRole', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

Expand All @@ -49,4 +52,5 @@ def __init__(self, **kwargs):
self.administrator_login_password = kwargs.get('administrator_login_password', None)
self.version = kwargs.get('version', None)
self.ssl_enforcement = kwargs.get('ssl_enforcement', None)
self.replication_role = kwargs.get('replication_role', None)
self.tags = kwargs.get('tags', None)
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ class ServerUpdateParameters(Model):
server. Possible values include: 'Enabled', 'Disabled'
:type ssl_enforcement: str or
~azure.mgmt.rdbms.mariadb.models.SslEnforcementEnum
:param replication_role: The replication role of the server.
:type replication_role: str
:param tags: Application-specific metadata in the form of key-value pairs.
:type tags: dict[str, str]
"""
Expand All @@ -39,14 +41,16 @@ class ServerUpdateParameters(Model):
'administrator_login_password': {'key': 'properties.administratorLoginPassword', 'type': 'str'},
'version': {'key': 'properties.version', 'type': 'str'},
'ssl_enforcement': {'key': 'properties.sslEnforcement', 'type': 'SslEnforcementEnum'},
'replication_role': {'key': 'properties.replicationRole', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
}

def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, tags=None, **kwargs) -> None:
def __init__(self, *, sku=None, storage_profile=None, administrator_login_password: str=None, version=None, ssl_enforcement=None, replication_role: str=None, tags=None, **kwargs) -> None:
super(ServerUpdateParameters, self).__init__(**kwargs)
self.sku = sku
self.storage_profile = storage_profile
self.administrator_login_password = administrator_login_password
self.version = version
self.ssl_enforcement = ssl_enforcement
self.replication_role = replication_role
self.tags = tags
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# --------------------------------------------------------------------------

from .servers_operations import ServersOperations
from .replicas_operations import ReplicasOperations
from .firewall_rules_operations import FirewallRulesOperations
from .virtual_network_rules_operations import VirtualNetworkRulesOperations
from .databases_operations import DatabasesOperations
Expand All @@ -22,6 +23,7 @@

__all__ = [
'ServersOperations',
'ReplicasOperations',
'FirewallRulesOperations',
'VirtualNetworkRulesOperations',
'DatabasesOperations',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class CheckNameAvailabilityOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
:ivar api_version: The API version to use for the request. Constant value: "2018-06-01-preview".
:ivar api_version: The API version to use for the request. Constant value: "2018-06-01".
"""

models = models
Expand All @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
self.api_version = "2018-06-01-preview"
self.api_version = "2018-06-01"

self.config = config

Expand Down
Loading

0 comments on commit 26eb888

Please sign in to comment.