Hello community,

here is the log from the commit of package azure-cli-rdbms for openSUSE:Factory 
checked in at 2019-05-22 11:01:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-rdbms (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-rdbms.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-rdbms"

Wed May 22 11:01:33 2019 rev:5 rq:696852 version:0.3.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-rdbms/azure-cli-rdbms.changes  
2018-10-15 10:47:11.247149969 +0200
+++ 
/work/SRC/openSUSE:Factory/.azure-cli-rdbms.new.5148/azure-cli-rdbms.changes    
    2019-05-22 11:01:37.870683762 +0200
@@ -1,0 +2,17 @@
+Tue Apr 16 15:57:33 UTC 2019 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 0.3.7
+  + For detailed information about changes see the
+    HISTORY.txt file provided with this package
+- Bump minimum version for Python Azure SDK namespace
+  packages to 3.0.0 in BuildRequires and Requires
+- Remove python3-devel package from BuildRequires
+- Remove unzip package from BuildRequires
+- Run fdupes to hardlink duplicate files
+  + Add fdupes to BuildRequires
+  + Add %fdupes invocation to %install
+- Update %description from setup.py
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-rdbms-0.3.1.tar.gz

New:
----
  azure-cli-rdbms-0.3.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ azure-cli-rdbms.spec ++++++
--- /var/tmp/diff_new_pack.nGzVCd/_old  2019-05-22 11:01:39.306682939 +0200
+++ /var/tmp/diff_new_pack.nGzVCd/_new  2019-05-22 11:01:39.358682910 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package azure-cli-rdbms
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-rdbms
-Version:        0.3.1
+Version:        0.3.7
 Release:        0
 Summary:        Microsoft Azure CLI 'MySQL and PostgreSQL' Command Module
 License:        MIT
@@ -27,15 +27,14 @@
 Source1:        LICENSE.txt
 BuildRequires:  azure-cli-command-modules-nspkg
 BuildRequires:  azure-cli-nspkg
-BuildRequires:  python3-azure-nspkg
-BuildRequires:  python3-devel
+BuildRequires:  fdupes
+BuildRequires:  python3-azure-nspkg >= 3.0.0
 BuildRequires:  python3-setuptools
-BuildRequires:  unzip
 Requires:       azure-cli-command-modules-nspkg
 Requires:       azure-cli-core
 Requires:       azure-cli-nspkg
-Requires:       python3-azure-mgmt-rdbms >= 1.2.0
-Requires:       python3-azure-nspkg
+Requires:       python3-azure-mgmt-rdbms >= 1.5.0
+Requires:       python3-azure-nspkg >= 3.0.0
 Requires:       python3-six
 Conflicts:      azure-cli < 2.0.0
 
@@ -44,7 +43,7 @@
 %description
 Microsoft Azure CLI 'MySQL and PostgreSQL' Command Module
 This package is for the 'rdbms' module.
-i.e. 'az mysql' and 'az postgres'
+i.e. 'az mariadb', 'az mysql' and 'az postgres'
 
 This package is for the RDBMS module.
 i.e. 'az mysql'
@@ -59,6 +58,7 @@
 
 %install
 python3 setup.py install --root=%{buildroot} --prefix=%{_prefix} 
--install-lib=%{python3_sitelib}
+%python_expand %fdupes %{buildroot}%{$python_sitelib}
 rm -rf %{buildroot}%{python3_sitelib}/azure/cli/command_modules/__init__.*
 rm -rf %{buildroot}%{python3_sitelib}/azure/cli/command_modules/__pycache__
 rm -rf %{buildroot}%{python3_sitelib}/azure/cli/__init__.*

++++++ azure-cli-rdbms-0.3.1.tar.gz -> azure-cli-rdbms-0.3.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-rdbms-0.3.1/HISTORY.rst 
new/azure-cli-rdbms-0.3.7/HISTORY.rst
--- old/azure-cli-rdbms-0.3.1/HISTORY.rst       2018-08-23 01:07:57.000000000 
+0200
+++ new/azure-cli-rdbms-0.3.7/HISTORY.rst       2019-02-12 03:05:13.000000000 
+0100
@@ -2,6 +2,29 @@
 
 Release History
 ===============
+0.3.7
++++++
+* Improve help message and command parameters
+
+0.3.6
++++++
+* Minor fixes
+
+0.3.5
++++++
+* Add mariadb vnet commands
+
+0.3.4
++++++
+* Add mysql replica commands
+
+0.3.3
++++++
+* Minor fixes
+
+0.3.2
++++++
+* Add support for MariaDB service
 
 0.3.1
 +++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-rdbms-0.3.1/PKG-INFO 
new/azure-cli-rdbms-0.3.7/PKG-INFO
--- old/azure-cli-rdbms-0.3.1/PKG-INFO  2018-08-23 01:09:49.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/PKG-INFO  2019-02-12 03:05:35.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-cli-rdbms
-Version: 0.3.1
+Version: 0.3.7
 Summary: Microsoft Azure Command-Line Tools MySQL and PostgreSQL Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -9,7 +9,7 @@
 Description: Microsoft Azure CLI 'MySQL and PostgreSQL' Command Module
         =========================================================
         This package is for the 'rdbms' module.
-        i.e. 'az mysql' and 'az postgres'
+        i.e. 'az mariadb', 'az mysql' and 'az postgres'
         
         
         
@@ -17,6 +17,29 @@
         
         Release History
         ===============
+        0.3.7
+        +++++
+        * Improve help message and command parameters
+        
+        0.3.6
+        +++++
+        * Minor fixes
+        
+        0.3.5
+        +++++
+        * Add mariadb vnet commands
+        
+        0.3.4
+        +++++
+        * Add mysql replica commands
+        
+        0.3.3
+        +++++
+        * Minor fixes
+        
+        0.3.2
+        +++++
+        * Add support for MariaDB service
         
         0.3.1
         +++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-rdbms-0.3.1/README.rst 
new/azure-cli-rdbms-0.3.7/README.rst
--- old/azure-cli-rdbms-0.3.1/README.rst        2018-08-23 01:07:57.000000000 
+0200
+++ new/azure-cli-rdbms-0.3.7/README.rst        2019-02-12 03:05:13.000000000 
+0100
@@ -1,5 +1,5 @@
 Microsoft Azure CLI 'MySQL and PostgreSQL' Command Module
 =========================================================
 This package is for the 'rdbms' module.
-i.e. 'az mysql' and 'az postgres'
+i.e. 'az mariadb', 'az mysql' and 'az postgres'
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_client_factory.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_client_factory.py
--- 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_client_factory.py    
    2018-08-23 01:07:57.000000000 +0200
+++ 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_client_factory.py    
    2019-02-12 03:05:13.000000000 +0100
@@ -14,6 +14,35 @@
 CLIENT_SECRET = 'AZURE_CLIENT_SECRET'
 
 
+def get_mariadb_management_client(cli_ctx, **_):
+    from os import getenv
+    from azure.mgmt.rdbms.mariadb import MariaDBManagementClient
+
+    # Allow overriding resource manager URI using environment variable
+    # for testing purposes. Subscription id is also determined by environment
+    # variable.
+    rm_uri_override = getenv(RM_URI_OVERRIDE)
+    if rm_uri_override:
+        client_id = getenv(CLIENT_ID)
+        if client_id:
+            from azure.common.credentials import ServicePrincipalCredentials
+            credentials = ServicePrincipalCredentials(
+                client_id=client_id,
+                secret=getenv(CLIENT_SECRET),
+                tenant=getenv(TENANT_ID))
+        else:
+            from msrest.authentication import Authentication    # pylint: 
disable=import-error
+            credentials = Authentication()
+
+        return MariaDBManagementClient(
+            subscription_id=getenv(SUB_ID_OVERRIDE),
+            base_url=rm_uri_override,
+            credentials=credentials)
+    else:
+        # Normal production scenario.
+        return get_mgmt_service_client(cli_ctx, MariaDBManagementClient)
+
+
 def get_mysql_management_client(cli_ctx, **_):
     from os import getenv
     from azure.mgmt.rdbms.mysql import MySQLManagementClient
@@ -72,6 +101,10 @@
         return get_mgmt_service_client(cli_ctx, PostgreSQLManagementClient)
 
 
+def cf_mariadb_servers(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).servers
+
+
 def cf_mysql_servers(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).servers
 
@@ -80,6 +113,10 @@
     return get_postgresql_management_client(cli_ctx).servers
 
 
+def cf_mariadb_firewall_rules(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).firewall_rules
+
+
 def cf_mysql_firewall_rules(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).firewall_rules
 
@@ -88,6 +125,10 @@
     return get_postgresql_management_client(cli_ctx).firewall_rules
 
 
+def cf_mariadb_config(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).configurations
+
+
 def cf_mysql_config(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).configurations
 
@@ -96,6 +137,10 @@
     return get_postgresql_management_client(cli_ctx).configurations
 
 
+def cf_mariadb_log(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).log_files
+
+
 def cf_mysql_log(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).log_files
 
@@ -104,6 +149,10 @@
     return get_postgresql_management_client(cli_ctx).log_files
 
 
+def cf_mariadb_db(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).databases
+
+
 def cf_mysql_db(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).databases
 
@@ -112,9 +161,17 @@
     return get_postgresql_management_client(cli_ctx).databases
 
 
+def cf_mariadb_virtual_network_rules_operations(cli_ctx, _):
+    return get_mariadb_management_client(cli_ctx).virtual_network_rules
+
+
 def cf_mysql_virtual_network_rules_operations(cli_ctx, _):
     return get_mysql_management_client(cli_ctx).virtual_network_rules
 
 
 def cf_postgres_virtual_network_rules_operations(cli_ctx, _):
     return get_postgresql_management_client(cli_ctx).virtual_network_rules
+
+
+def cf_mysql_replica(cli_ctx, _):
+    return get_mysql_management_client(cli_ctx).replicas
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_help.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_help.py
--- old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_help.py  
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_help.py  
2019-02-12 03:05:13.000000000 +0100
@@ -22,23 +22,22 @@
                 type: command
                 short-summary: Create a server.
                 examples:
-                    - name: Create a {0} server with only required paramaters 
in North Europe.
-                      text: az {1} server create -l northeurope -g testgroup 
-n testsvr -u username -p password
-                    - name: Create a {0} server with a Standard performance 
tier and 2 vcore in North Europe.
+                    - name: Create a {0} server in North Europe with sku 
GP_Gen5_2 (General Purpose, Gen 5 hardware, 2 vCores).
                       text: az {1} server create -l northeurope -g testgroup 
-n testsvr -u username -p password \\
-                            --sku-name GP_Gen4_2
+                            --sku-name GP_Gen5_2
                     - name: Create a {0} server with all paramaters set.
                       text: az {1} server create -l northeurope -g testgroup 
-n testsvr -u username -p password \\
-                            --sku-name B_Gen4_2 --ssl-enforcement Disabled \\
+                            --sku-name B_Gen5_1 --ssl-enforcement Disabled \\
+                            --backup-retention 10 --geo-redundant-backup 
Enabled
                             --storage-size 51200 --tags "key=value" --version 
{{server-version}}
                 """.format(server_type, command_group)
     helps['{} server restore'.format(command_group)] = """
                 type: command
                 short-summary: Restore a server from backup.
                 examples:
-                    - name: Restore 'testsvr' as 'testsvrnew'.
+                    - name: Restore 'testsvr' to a specific point-in-time as a 
new server 'testsvrnew'.
                       text: az {0} server restore -g testgroup -n testsvrnew 
--source-server testsvr --restore-point-in-time "2017-06-15T13:10:00Z"
-                    - name: Restore 'testsvr2' to 'testsvrnew', where 
'testsvrnew' is in a different resource group than the backup.
+                    - name: Restore 'testsvr2' to 'testsvrnew', where 
'testsvrnew' is in a different resource group from 'testsvr2'.
                       text: |
                         az {0} server restore -g testgroup -n testsvrnew \\
                             -s 
"/subscriptions/${{SubID}}/resourceGroups/${{ResourceGroup}}/providers/Microsoft.DBfor{1}/servers/testsvr2"
 \\
@@ -46,22 +45,53 @@
                 """.format(command_group, server_type)
     helps['{} server georestore'.format(command_group)] = """
                 type: command
-                short-summary: Georestore a server from backup.
+                short-summary: Geo-restore a server from backup.
                 examples:
-                    - name: Georestore 'testsvr' as 'testsvrnew' where 
'testsvrnew' is in same resource group as 'testsvr'.
+                    - name: Geo-restore 'testsvr' into a new server 
'testsvrnew' located in West US 2.
                       text: az {0} server georestore -g testgroup -n 
testsvrnew --source-server testsvr -l westus2
-                    - name: Georestore 'testsvr2' to 'testsvrnew', where 
'testsvrnew' is in the different resource group as the original server.
+                    - name: Geo-restore 'testsvr' into a new server 
'testsvrnew' located in West US 2 with sku GP_Gen5_2.
+                      text: az {0} server georestore -g testgroup -n 
testsvrnew --source-server testsvr -l westus2 --sku-name GP_Gen5_2
+                    - name: Geo-restore 'testsvr2' into a new server 
'testsvrnew', where 'testsvrnew' is in a different resource group from 
'testsvr2'.
                       text: |
                         az {0} server georestore -g testgroup -n testsvrnew \\
-                            -s 
"/subscriptions/${{SubID}}/resourceGroups/${{ResourceGroup}}/providers/Microsoft.DBfor{1}/servers/testsvr2"
-                            -l westus2 --sku-name GP_Gen5_2
+                            -s 
"/subscriptions/${{SubID}}/resourceGroups/${{ResourceGroup}}/providers/Microsoft.DBfor{1}/servers/testsvr2"
 \\
+                            -l westus2
                 """.format(command_group, server_type)
+    helps['mysql server replica'] = """
+                type: group
+                short-summary: Manage read replicas.
+                """
+    helps['mysql server replica create'] = """
+                type: command
+                short-summary: Create a read replica for a server.
+                examples:
+                    - name: Create a read replica 'testreplsvr' for 'testsvr'.
+                      text: az mysql server replica create -n testreplsvr -g 
testgroup -s testsvr
+                    - name: Create a read replica 'testreplsvr' for 
'testsvr2', where 'testreplsvr' is in a different resource group.
+                      text: |
+                        az mysql server replica create -n testreplsvr -g 
testgroup \\
+                            -s 
"/subscriptions/${SubID}/resourceGroups/${ResourceGroup}/providers/Microsoft.DBforMySQL/servers/testsvr2"
+                """
+    helps['mysql server replica stop'] = """
+                type: command
+                short-summary: Stop replication to a read replica and make it 
a read/write server.
+                examples:
+                    - name: Stop replication to 'testreplsvr' and make it a 
read/write server.
+                      text: az mysql server replica stop -g testgroup -n 
testreplsvr
+                """
+    helps['mysql server replica list'] = """
+                type: command
+                short-summary: List all read replicas for a given server.
+                examples:
+                    - name: List all read replicas for master server 'testsvr'.
+                      text: az mysql server replica list -g testgroup -s 
testsvr
+                """
     helps['{} server update'.format(command_group)] = """
                 type: command
                 short-summary: Update a server.
                 examples:
                     - name: Update a server's sku.
-                      text: az {0} server update -g testgroup -n testsvrnew 
--sku-name GP_Gen4_4
+                      text: az {0} server update -g testgroup -n testsvrnew 
--sku-name GP_Gen5_4
                     - name: Update a server's tags.
                       text: az {0} server update -g testgroup -n testsvrnew 
--tags "k1=v1" "k2=v2"
                 """.format(command_group)
@@ -72,7 +102,10 @@
     helps['{} server delete'.format(command_group)] = """
                 type: command
                 short-summary: Delete a server.
-                """
+                examples:
+                    - name: Delete a server.
+                      text: az {0} server delete -g testgroup -n testsvr
+                """.format(command_group)
     helps['{} server show'.format(command_group)] = """
                 type: command
                 short-summary: Get the details of a server.
@@ -94,17 +127,19 @@
                 type: command
                 short-summary: Create a new firewall rule for a server.
                 examples:
-                    - name: Create a firewall rule allowing all connections 
from all IP addresses.
-                      text: az {} server firewall-rule create -g testgroup -s 
testsvr -n allowall --start-ip-address 0.0.0.0 --end-ip-address 255.255.255.255
+                    - name: Create a firewall rule allowing connections from a 
specific IP address.
+                      text: az {0} server firewall-rule create -g testgroup -s 
testsvr -n allowip --start-ip-address 107.46.14.221 --end-ip-address 
107.46.14.221
+                    - name: Create a firewall rule allowing connections from 
an IP address range.
+                      text: az {0} server firewall-rule create -g testgroup -s 
testsvr -n allowiprange --start-ip-address 107.46.14.0 --end-ip-address 
107.46.14.221
                 """.format(command_group)
     helps['{} server firewall-rule update'.format(command_group)] = """
                 type: command
                 short-summary: Update a firewall rule.
                 examples:
                     - name: Update a firewall rule's start IP address.
-                      text: az {0} server firewall-rule update -g testgroup -s 
testsvr -n allowall --start-ip-address 0.0.0.1
+                      text: az {0} server firewall-rule update -g testgroup -s 
testsvr -n allowiprange --start-ip-address 107.46.14.1
                     - name: Update a firewall rule's start and end IP address.
-                      text: az {0} server firewall-rule update -g testgroup -s 
testsvr -n allowall --start-ip-address 0.0.0.1 --end-ip-address 255.255.255.254
+                      text: az {0} server firewall-rule update -g testgroup -s 
testsvr -n allowiprange --start-ip-address 107.46.14.2 --end-ip-address 
107.46.14.218
                 """.format(command_group)
     helps['{} server firewall-rule delete'.format(command_group)] = """
                 type: command
@@ -118,6 +153,7 @@
                 type: command
                 short-summary: List all firewall rules for a server.
                 """
+
     helps['{} server vnet-rule'.format(command_group)] = """
                 type: group
                 short-summary: Manage a server's virtual network rules.
@@ -135,6 +171,7 @@
                     - name: Create a vnet rule by providing the vnet and 
subnet name. The subnet id is created by taking the resource group name and 
subscription id of the server.
                       text: az {} server vnet-rule create -g testgroup -s 
testsvr -n vnetRuleName --subnet subnetName --vnet-name vnetName
                 """.format(server_type, command_group, command_group)
+
     helps['{} server configuration'.format(command_group)] = """
                 type: group
                 short-summary: Manage configuration values for a server.
@@ -214,5 +251,6 @@
                 """.format(command_group)
 
 
+add_helps("mariadb", "MariaDB")
 add_helps("mysql", "MySQL")
 add_helps("postgres", "PostgreSQL")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_params.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_params.py
--- old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/_params.py        
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/_params.py        
2019-02-12 03:05:13.000000000 +0100
@@ -16,38 +16,41 @@
 def load_arguments(self, _):    # pylint: disable=too-many-statements
 
     server_completers = {
+        'mariadb': 
get_resource_name_completion_list('Microsoft.DBForMariaDB/servers'),
         'mysql': 
get_resource_name_completion_list('Microsoft.DBForMySQL/servers'),
         'postgres': 
get_resource_name_completion_list('Microsoft.DBForPostgreSQL/servers')
     }
 
     def _complex_params(command_group):
         with self.argument_context('{} server create'.format(command_group)) 
as c:
-            c.argument('sku_name', options_list=['--sku-name'], required=True, 
help='The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, 
GP_Gen5_8.')
-
-            c.argument('backup_retention', type=int, 
options_list=['--backup-retention'], help='The number of days a backup is 
retained.')
-            c.argument('geo_redundant_backup', 
options_list=['--geo-redundant-backup'], help='Enable Geo-redundant or not for 
server backup.')
-            c.argument('storage_mb', options_list=['--storage-size'], 
type=int, help='The max storage size of the server. Unit is megabytes.')
-
+            c.argument('sku_name', options_list=['--sku-name'], required=True, 
help='The name of the sku. Follows the convention {pricing tier}_{compute 
generation}_{vCores} in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16. ')
             c.argument('administrator_login', required=True, 
arg_group='Authentication')
-            c.argument('administrator_login_password', 
arg_group='Authentication')
+            c.argument('administrator_login_password', required=True, 
arg_group='Authentication')
+
+            c.argument('backup_retention', type=int, 
options_list=['--backup-retention'], help='The number of days a backup is 
retained. Range of 7 to 35 days. Default is 7 days.')
+            c.argument('geo_redundant_backup', 
arg_type=get_enum_type(['Enabled', 'Disabled']), 
options_list=['--geo-redundant-backup'], help='Enable or disable geo-redundant 
backups. Default value is Disabled. Not supported in Basic pricing tier.')
+            c.argument('storage_mb', options_list=['--storage-size'], 
type=int, help='The storage capacity of the server (unit is megabytes). Minimum 
5120 and increases in 1024 increments. Default is 51200.')
 
             c.argument('location', arg_type=get_location_type(self.cli_ctx), 
required=False)
-            c.argument('version', help='Server version')
+            c.argument('version', help='Server major version.')
 
         with self.argument_context('{} server update'.format(command_group)) 
as c:
             c.ignore('family', 'capacity', 'tier')
-            c.argument('sku_name', options_list=['--sku-name'], help='The name 
of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.')
+            c.argument('sku_name', options_list=['--sku-name'], help='The name 
of the sku. Follows the convention {pricing tier}_{compute generation}_{vCores} 
in shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.')
 
         with self.argument_context('{} server restore'. format(command_group)) 
as c:
-            c.argument('source_server', options_list=['--source-server', 
'-s'], help='The name or ID of the source server to restore from.')
+            c.argument('source_server', options_list=['--source-server', 
'-s'], help='The name or resource ID of the source server to restore from.')
             c.argument('restore_point_in_time', help='The point in time to 
restore from (ISO8601 format), e.g., 2017-04-26T02:10:00+08:00')
 
         with self.argument_context('{} server georestore'. 
format(command_group)) as c:
             c.argument('location', arg_type=get_location_type(self.cli_ctx), 
required=True)
-            c.argument('sku_name', options_list=['--sku-name'], 
required=False, help='The name of the sku, typically, tier + family + cores, 
e.g. B_Gen4_1, GP_Gen5_8.')
+            c.argument('sku_name', options_list=['--sku-name'], 
required=False, help='The name of the sku. Defaults to sku of the source 
server. Follows the convention {pricing tier}_{compute generation}_{vCores} in 
shorthand. Examples: B_Gen5_1, GP_Gen5_4, MO_Gen5_16.')
             c.argument('source_server', options_list=['--source-server', 
'-s'], required=True, help='The name or ID of the source server to restore 
from.')
-            c.argument('backup_retention', 
options_list=['--backup-retention'], type=int, help='The max days of retention, 
unit is days.')
-            c.argument('geo_redundant_backup', 
options_list=['--geo-redundant-backup'], help='Enable Geo-redundant or not for 
server backup.')
+            c.argument('backup_retention', 
options_list=['--backup-retention'], type=int, help='The number of days a 
backup is retained. Range of 7 to 35 days. Default is 7 days.')
+            c.argument('geo_redundant_backup', 
options_list=['--geo-redundant-backup'], help='Enable or disable geo-redundant 
backups. Default value is Disabled. Not supported in Basic pricing tier.')
+
+        with self.argument_context('mysql server replica') as c:
+            c.argument('source_server', options_list=['--source-server', 
'-s'], help='The name or resource ID of the master server to the create replica 
for.')
 
         with self.argument_context('{} server configuration 
set'.format(command_group)) as c:
             c.argument('value', help='Value of the configuration. If not 
provided, configuration value will be set to default.', 
validator=configuration_value_validator)
@@ -56,59 +59,63 @@
         with self.argument_context('{} server wait'.format(command_group)) as 
c:
             c.ignore('created', 'deleted', 'updated')
 
+    _complex_params('mariadb')
     _complex_params('mysql')
     _complex_params('postgres')
 
-    for scope in ['mysql', 'postgres']:
+    for scope in ['mariadb', 'mysql', 'postgres']:
         with self.argument_context(scope) as c:
             c.argument('name', options_list=['--sku-name'], required=True)
-            c.argument('server_name', completer=server_completers[scope], 
options_list=['--server-name', '-s'], help='Name of the server.')
+            c.argument('server_name', completer=server_completers[scope], 
options_list=['--server-name', '-s'], help='Name of the server. The name can 
contain only lowercase letters, numbers, and the hyphen (-) character. Minimum 
3 characters and maximum 63 characters.')
 
-    for scope in ['mysql server', 'postgres server']:
+    for scope in ['mariadb server', 'mysql server', 'postgres server']:
         with self.argument_context(scope) as c:
             c.ignore('family', 'capacity', 'tier')
 
-            c.argument('server_name', options_list=['--name', '-n'], 
id_part='name', help='Name of the server.')
-            c.argument('administrator_login', options_list=['--admin-user', 
'-u'])
-            c.argument('administrator_login_password', 
options_list=['--admin-password', '-p'], help='The password of the 
administrator login.')
-            c.argument('ssl_enforcement', arg_type=get_enum_type(['Enabled', 
'Disabled']), options_list=['--ssl-enforcement'], help='Enable ssl enforcement 
or not when connect to server.')
+            c.argument('server_name', options_list=['--name', '-n'], 
id_part='name', help='Name of the server. The name can contain only lowercase 
letters, numbers, and the hyphen (-) character. Minimum 3 characters and 
maximum 63 characters.')
+            c.argument('administrator_login', options_list=['--admin-user', 
'-u'], help='Administrator username for the server. Once set, it cannot be 
changed.')
+            c.argument('administrator_login_password', 
options_list=['--admin-password', '-p'], help='The password of the 
administrator. Minimum 8 characters and maximum 128 characters. Password must 
contain characters from three of the following categories: English uppercase 
letters, English lowercase letters, numbers, and non-alphanumeric characters.')
+            c.argument('ssl_enforcement', arg_type=get_enum_type(['Enabled', 
'Disabled']), options_list=['--ssl-enforcement'], help='Enable or disable ssl 
enforcement for connections to server. Default is Enabled.')
             c.argument('tier', arg_type=get_enum_type(['Basic', 
'GeneralPurpose', 'MemoryOptimized']), options_list=['--performance-tier'], 
help='The performance tier of the server.')
             c.argument('capacity', options_list=['--vcore'], type=int, 
help='Number of vcore.')
             c.argument('family', options_list=['--family'], 
arg_type=get_enum_type(['Gen4', 'Gen5']), help='Hardware generation.')
-            c.argument('storage_mb', options_list=['--storage-size'], 
type=int, help='The max storage size of the server. Unit is megabytes.')
-            c.argument('backup_retention_days', 
options_list=['--backup-retention'], type=int, help='The number of days a 
backup is retained.')
+            c.argument('storage_mb', options_list=['--storage-size'], 
type=int, help='The storage capacity of the server (unit is megabytes). Minimum 
5120 and increases in 1024 increments. Default is 51200.')
+            c.argument('backup_retention_days', 
options_list=['--backup-retention'], type=int, help='The number of days a 
backup is retained. Range of 7 to 35 days. Default is 7 days.')
             c.argument('tags', tags_type)
 
-    for scope in ['mysql server-logs', 'postgres server-logs']:
+    for scope in ['mariadb server-logs', 'mysql server-logs', 'postgres 
server-logs']:
         with self.argument_context(scope) as c:
             c.argument('file_name', options_list=['--name', '-n'], nargs='+', 
help='Space-separated list of log filenames on the server to download.')
             c.argument('max_file_size', type=int, help='The file size 
limitation to filter files.')
             c.argument('file_last_written', type=int, help='Integer in hours 
to indicate file last modify time, default value is 72.')
             c.argument('filename_contains', help='The pattern that file name 
should match.')
 
-    for scope in ['mysql db', 'postgres db']:
+    for scope in ['mariadb db', 'mysql db', 'postgres db']:
         with self.argument_context(scope) as c:
             c.argument('database_name', options_list=['--name', '-n'])
 
-    for scope in ['mysql server firewall-rule', 'postgres server 
firewall-rule']:
+    for scope in ['mariadb server firewall-rule', 'mysql server 
firewall-rule', 'postgres server firewall-rule']:
         with self.argument_context(scope) as c:
             c.argument('server_name', options_list=['--server-name', '-s'])
             c.argument('firewall_rule_name', options_list=['--name', '-n'], 
id_part='child_name_1', help='The name of the firewall rule.')
             c.argument('start_ip_address', 
options_list=['--start-ip-address'], help='The start IP address of the firewall 
rule. Must be IPv4 format. Use value \'0.0.0.0\' to represent all 
Azure-internal IP addresses.')
             c.argument('end_ip_address', options_list=['--end-ip-address'], 
help='The end IP address of the firewall rule. Must be IPv4 format. Use value 
\'0.0.0.0\' to represent all Azure-internal IP addresses.')
 
-    for scope in ['mysql server vnet-rule', 'postgres server vnet-rule']:
+    for scope in ['mariadb server vnet-rule', 'mysql server vnet-rule', 
'postgres server vnet-rule']:
         with self.argument_context(scope) as c:
             c.argument('server_name', options_list=['--server-name', '-s'])
             c.argument('virtual_network_rule_name', options_list=['--name', 
'-n'], id_part='child_name_1', help='The name of the vnet rule.')
             c.argument('virtual_network_subnet_id', options_list=['--subnet'], 
help='Name or ID of the subnet that allows access to an Azure Postgres Server. 
If subnet name is provided, --vnet-name must be provided.')
             c.argument('ignore_missing_vnet_service_endpoint', 
options_list=['--ignore-missing-endpoint', '-i'], help='Create vnet rule before 
virtual network has vnet service endpoint enabled', 
arg_type=get_three_state_flag())
 
-    for scope in ['postgres server vnet-rule create', 'postgres server 
vnet-rule update', 'mysql server vnet-rule create', 'mysql server vnet-rule 
update']:
+    for scope in ['mariadb server vnet-rule create', 'mariadb server vnet-rule 
update', 'postgres server vnet-rule create', 'postgres server vnet-rule 
update', 'mysql server vnet-rule create', 'mysql server vnet-rule update']:
         with self.argument_context(scope) as c:
             c.extra('vnet_name', options_list=['--vnet-name'], help='The 
virtual network name', validator=validate_subnet)
 
-    for scope in ['mysql server configuration', 'postgres server 
configuration']:
+    for scope in ['mariadb server configuration', 'mysql server 
configuration', 'postgres server configuration']:
         with self.argument_context(scope) as c:
             c.argument('server_name', options_list=['--server-name', '-s'])
             c.argument('configuration_name', id_part='child_name_1', 
options_list=['--name', '-n'])
+
+    with self.argument_context('mysql server replica list') as c:
+        c.argument('server_name', options_list=['--server-name', '-s'], 
help='Name of the master server.')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/commands.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/commands.py
--- old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/commands.py       
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/commands.py       
2019-02-12 03:05:13.000000000 +0100
@@ -6,12 +6,19 @@
 from azure.cli.core.commands import CliCommandType
 
 from azure.cli.command_modules.rdbms._client_factory import (
+    cf_mariadb_servers,
+    cf_mariadb_db,
+    cf_mariadb_firewall_rules,
+    cf_mariadb_virtual_network_rules_operations,
+    cf_mariadb_config,
+    cf_mariadb_log,
     cf_mysql_servers,
     cf_mysql_db,
     cf_mysql_firewall_rules,
     cf_mysql_virtual_network_rules_operations,
     cf_mysql_config,
     cf_mysql_log,
+    cf_mysql_replica,
     cf_postgres_servers,
     cf_postgres_db,
     cf_postgres_firewall_rules,
@@ -25,6 +32,11 @@
 
     rdbms_custom = 
CliCommandType(operations_tmpl='azure.cli.command_modules.rdbms.custom#{}')
 
+    mariadb_servers_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.servers_operations#ServersOperations.{}',
+        client_factory=cf_mariadb_servers
+    )
+
     mysql_servers_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.servers_operations#ServersOperations.{}',
         client_factory=cf_mysql_servers
@@ -35,6 +47,16 @@
         client_factory=cf_postgres_servers
     )
 
+    mysql_replica_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mysql.operations.replicas_operations#ReplicasOperations.{}',
+        client_factory=cf_mysql_replica
+    )
+
+    mariadb_firewall_rule_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.firewall_rules_operations#FirewallRulesOperations.{}',
+        client_factory=cf_mariadb_firewall_rules
+    )
+
     mysql_firewall_rule_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.firewall_rules_operations#FirewallRulesOperations.{}',
         client_factory=cf_mysql_firewall_rules
@@ -45,6 +67,11 @@
         client_factory=cf_postgres_firewall_rules
     )
 
+    mariadb_vnet_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.virtual_network_rules_operations#VirtualNetworkRulesOperations.{}',
+        client_factory=cf_mariadb_virtual_network_rules_operations
+    )
+
     mysql_vnet_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.virtual_network_rules_operations#VirtualNetworkRulesOperations.{}',
         client_factory=cf_mysql_virtual_network_rules_operations
@@ -55,6 +82,11 @@
         client_factory=cf_postgres_virtual_network_rules_operations
     )
 
+    mariadb_config_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.configurations_operations#ConfigurationsOperations.{}',
+        client_factory=cf_mariadb_config
+    )
+
     mysql_config_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.configurations_operations#ConfigurationsOperations.{}',
         client_factory=cf_mysql_config
@@ -65,6 +97,11 @@
         client_factory=cf_postgres_config
     )
 
+    mariadb_log_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.log_files_operations#LogFilesOperations.{}',
+        client_factory=cf_mariadb_log
+    )
+
     mysql_log_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.log_files_operations#LogFilesOperations.{}',
         client_factory=cf_mysql_log
@@ -75,6 +112,11 @@
         client_factory=cf_postgres_log
     )
 
+    mariadb_db_sdk = CliCommandType(
+        
operations_tmpl='azure.mgmt.rdbms.mariadb.operations.databases_operations#DatabasesOperations.{}',
+        client_factory=cf_mariadb_db
+    )
+
     mysql_db_sdk = CliCommandType(
         
operations_tmpl='azure.mgmt.rdbms.mysql.operations.databases_operations#DatabasesOperations.{}',
         client_factory=cf_mysql_db
@@ -85,6 +127,19 @@
         client_factory=cf_postgres_db
     )
 
+    with self.command_group('mariadb server', mariadb_servers_sdk, 
client_factory=cf_mariadb_servers) as g:
+        g.custom_command('create', '_server_create')
+        g.custom_command('restore', '_server_restore', supports_no_wait=True)
+        g.custom_command('georestore', '_server_georestore', 
supports_no_wait=True)
+        g.command('delete', 'delete', confirmation=True)
+        g.show_command('show', 'get')
+        g.custom_command('list', '_server_list_custom_func')
+        g.generic_update_command('update',
+                                 getter_name='_server_update_get', 
getter_type=rdbms_custom,
+                                 setter_name='_server_update_set', 
setter_type=rdbms_custom, setter_arg_name='parameters',
+                                 custom_func_name='_server_update_custom_func')
+        g.custom_wait_command('wait', '_server_mariadb_get')
+
     with self.command_group('mysql server', mysql_servers_sdk, 
client_factory=cf_mysql_servers) as g:
         g.custom_command('create', '_server_create')
         g.custom_command('restore', '_server_restore', supports_no_wait=True)
@@ -111,6 +166,23 @@
                                  custom_func_name='_server_update_custom_func')
         g.custom_wait_command('wait', '_server_postgresql_get')
 
+    with self.command_group('mysql server replica', mysql_replica_sdk) as g:
+        g.command('list', 'list_by_server')
+
+    with self.command_group('mysql server replica', mysql_servers_sdk, 
client_factory=cf_mysql_servers) as g:
+        g.custom_command('create', '_replica_create', supports_no_wait=True)
+        g.custom_command('stop', '_replica_stop', confirmation=True)
+
+    with self.command_group('mariadb server firewall-rule', 
mariadb_firewall_rule_sdk) as g:
+        g.command('create', 'create_or_update')
+        g.command('delete', 'delete', confirmation=True)
+        g.show_command('show', 'get')
+        g.command('list', 'list_by_server')
+        g.generic_update_command('update',
+                                 getter_name='_firewall_rule_custom_getter', 
getter_type=rdbms_custom,
+                                 setter_name='_firewall_rule_custom_setter', 
setter_type=rdbms_custom, setter_arg_name='parameters',
+                                 
custom_func_name='_firewall_rule_update_custom_func')
+
     with self.command_group('mysql server firewall-rule', 
mysql_firewall_rule_sdk) as g:
         g.command('create', 'create_or_update')
         g.command('delete', 'delete', confirmation=True)
@@ -131,6 +203,13 @@
                                  setter_name='_firewall_rule_custom_setter', 
setter_type=rdbms_custom, setter_arg_name='parameters',
                                  
custom_func_name='_firewall_rule_update_custom_func')
 
+    with self.command_group('mariadb server vnet-rule', mariadb_vnet_sdk) as g:
+        g.command('create', 'create_or_update')
+        g.command('delete', 'delete')
+        g.show_command('show', 'get')
+        g.command('list', 'list_by_server')
+        g.generic_update_command('update')
+
     with self.command_group('mysql server vnet-rule', mysql_vnet_sdk) as g:
         g.command('create', 'create_or_update')
         g.command('delete', 'delete')
@@ -145,6 +224,11 @@
         g.command('list', 'list_by_server')
         g.generic_update_command('update')
 
+    with self.command_group('mariadb server configuration', 
mariadb_config_sdk) as g:
+        g.command('set', 'create_or_update')
+        g.show_command('show', 'get')
+        g.command('list', 'list_by_server')
+
     with self.command_group('mysql server configuration', mysql_config_sdk) as 
g:
         g.command('set', 'create_or_update')
         g.show_command('show', 'get')
@@ -155,6 +239,10 @@
         g.show_command('show', 'get')
         g.command('list', 'list_by_server')
 
+    with self.command_group('mariadb server-logs', mariadb_log_sdk, 
client_factory=cf_mariadb_log) as g:
+        g.custom_command('list', '_list_log_files_with_filter')
+        g.custom_command('download', '_download_log_files')
+
     with self.command_group('mysql server-logs', mysql_log_sdk, 
client_factory=cf_mysql_log) as g:
         g.custom_command('list', '_list_log_files_with_filter')
         g.custom_command('download', '_download_log_files')
@@ -163,6 +251,12 @@
         g.custom_command('list', '_list_log_files_with_filter')
         g.custom_command('download', '_download_log_files')
 
+    with self.command_group('mariadb db', mariadb_db_sdk) as g:
+        g.command('create', 'create_or_update')
+        g.command('delete', 'delete', confirmation=True)
+        g.show_command('show', 'get')
+        g.command('list', 'list_by_server')
+
     with self.command_group('mysql db', mysql_db_sdk) as g:
         g.command('create', 'create_or_update')
         g.command('delete', 'delete', confirmation=True)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/custom.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/custom.py
--- old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/custom.py 
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/custom.py 
2019-02-12 03:05:13.000000000 +0100
@@ -5,11 +5,13 @@
 
 # pylint: disable=unused-argument, line-too-long
 
+from msrestazure.azure_exceptions import CloudError
 from msrestazure.tools import resource_id, is_valid_resource_id, 
parse_resource_id  # pylint: disable=import-error
 from azure.cli.core.commands.client_factory import get_subscription_id
-from azure.cli.core.util import sdk_no_wait
-from azure.mgmt.rdbms.mysql.operations.servers_operations import 
ServersOperations
-from ._client_factory import get_mysql_management_client, 
get_postgresql_management_client
+from azure.cli.core.util import CLIError, sdk_no_wait
+from azure.mgmt.rdbms.mysql.operations.servers_operations import 
ServersOperations as MySqlServersOperations
+from azure.mgmt.rdbms.mariadb.operations.servers_operations import 
ServersOperations as MariaDBServersOperations
+from ._client_factory import get_mariadb_management_client, 
get_mysql_management_client, get_postgresql_management_client
 
 SKU_TIER_MAP = {'Basic': 'b', 'GeneralPurpose': 'gp', 'MemoryOptimized': 'mo'}
 
@@ -17,9 +19,14 @@
 def _server_create(cmd, client, resource_group_name, server_name, sku_name, 
no_wait=False,
                    location=None, administrator_login=None, 
administrator_login_password=None, backup_retention=None,
                    geo_redundant_backup=None, ssl_enforcement=None, 
storage_mb=None, tags=None, version=None):
-    provider = 'Microsoft.DBForMySQL' if isinstance(client, ServersOperations) 
else 'Microsoft.DBforPostgreSQL'
+    provider = 'Microsoft.DBforPostgreSQL'
+    if isinstance(client, MySqlServersOperations):
+        provider = 'Microsoft.DBforMySQL'
+    elif isinstance(client, MariaDBServersOperations):
+        provider = 'Microsoft.DBforMariaDB'
+
     parameters = None
-    if provider == 'Microsoft.DBForMySQL':
+    if provider == 'Microsoft.DBforMySQL':
         from azure.mgmt.rdbms import mysql
         parameters = mysql.models.ServerForCreate(
             sku=mysql.models.Sku(name=sku_name),
@@ -49,6 +56,21 @@
                     storage_mb=storage_mb)),
             location=location,
             tags=tags)
+    elif provider == 'Microsoft.DBforMariaDB':
+        from azure.mgmt.rdbms import mariadb
+        parameters = mariadb.models.ServerForCreate(
+            sku=mariadb.models.Sku(name=sku_name),
+            properties=mariadb.models.ServerPropertiesForDefaultCreate(
+                administrator_login=administrator_login,
+                administrator_login_password=administrator_login_password,
+                version=version,
+                ssl_enforcement=ssl_enforcement,
+                storage_profile=mariadb.models.StorageProfile(
+                    backup_retention_days=backup_retention,
+                    geo_redundant_backup=geo_redundant_backup,
+                    storage_mb=storage_mb)),
+            location=location,
+            tags=tags)
 
     return client.create(resource_group_name, server_name, parameters)
 
@@ -57,7 +79,12 @@
 # The parameter list should be the same as that in factory to use the 
ParametersContext
 # arguments and validators
 def _server_restore(cmd, client, resource_group_name, server_name, 
source_server, restore_point_in_time, no_wait=False):
-    provider = 'Microsoft.DBForMySQL' if isinstance(client, ServersOperations) 
else 'Microsoft.DBforPostgreSQL'
+    provider = 'Microsoft.DBforPostgreSQL'
+    if isinstance(client, MySqlServersOperations):
+        provider = 'Microsoft.DBforMySQL'
+    elif isinstance(client, MariaDBServersOperations):
+        provider = 'Microsoft.DBforMariaDB'
+
     parameters = None
     if not is_valid_resource_id(source_server):
         if len(source_server.split('/')) == 1:
@@ -70,7 +97,7 @@
         else:
             raise ValueError('The provided source-server {} is 
invalid.'.format(source_server))
 
-    if provider == 'Microsoft.DBForMySQL':
+    if provider == 'Microsoft.DBforMySQL':
         from azure.mgmt.rdbms import mysql
         parameters = mysql.models.ServerForCreate(
             properties=mysql.models.ServerPropertiesForRestore(
@@ -84,6 +111,13 @@
                 source_server_id=source_server,
                 restore_point_in_time=restore_point_in_time),
             location=None)
+    elif provider == 'Microsoft.DBforMariaDB':
+        from azure.mgmt.rdbms import mariadb
+        parameters = mariadb.models.ServerForCreate(
+            properties=mariadb.models.ServerPropertiesForRestore(
+                source_server_id=source_server,
+                restore_point_in_time=restore_point_in_time),
+            location=None)
 
     parameters.properties.source_server_id = source_server
     parameters.properties.restore_point_in_time = restore_point_in_time
@@ -105,7 +139,12 @@
 # auguments and validators
 def _server_georestore(cmd, client, resource_group_name, server_name, 
sku_name, location, source_server,
                        backup_retention=None, geo_redundant_backup=None, 
no_wait=False, **kwargs):
-    provider = 'Microsoft.DBForMySQL' if isinstance(client, ServersOperations) 
else 'Microsoft.DBforPostgreSQL'
+    provider = 'Microsoft.DBforPostgreSQL'
+    if isinstance(client, MySqlServersOperations):
+        provider = 'Microsoft.DBforMySQL'
+    elif isinstance(client, MariaDBServersOperations):
+        provider = 'Microsoft.DBforMariaDB'
+
     parameters = None
 
     if not is_valid_resource_id(source_server):
@@ -118,7 +157,7 @@
         else:
             raise ValueError('The provided source-server {} is 
invalid.'.format(source_server))
 
-    if provider == 'Microsoft.DBForMySQL':
+    if provider == 'Microsoft.DBforMySQL':
         from azure.mgmt.rdbms import mysql
         parameters = mysql.models.ServerForCreate(
             sku=mysql.models.Sku(name=sku_name),
@@ -138,6 +177,16 @@
                     geo_redundant_backup=geo_redundant_backup),
                 source_server_id=source_server),
             location=location)
+    elif provider == 'Microsoft.DBforMariaDB':
+        from azure.mgmt.rdbms import mariadb
+        parameters = mariadb.models.ServerForCreate(
+            sku=mariadb.models.Sku(name=sku_name),
+            properties=mariadb.models.ServerPropertiesForGeoRestore(
+                storage_profile=mariadb.models.StorageProfile(
+                    backup_retention_days=backup_retention,
+                    geo_redundant_backup=geo_redundant_backup),
+                source_server_id=source_server),
+            location=location)
 
     parameters.properties.source_server_id = source_server
 
@@ -152,6 +201,56 @@
     return sdk_no_wait(no_wait, client.create, resource_group_name, 
server_name, parameters)
 
 
+# Custom functions for server replica, will add PostgreSQL part after backend 
ready in future
+def _replica_create(cmd, client, resource_group_name, server_name, 
source_server, no_wait=False, **kwargs):
+    provider = 'Microsoft.DBForMySQL' if isinstance(client, 
MySqlServersOperations) else 'Microsoft.DBforPostgreSQL'
+    # set source server id
+    if not is_valid_resource_id(source_server):
+        if len(source_server.split('/')) == 1:
+            source_server = 
resource_id(subscription=get_subscription_id(cmd.cli_ctx),
+                                        resource_group=resource_group_name,
+                                        namespace=provider,
+                                        type='servers',
+                                        name=source_server)
+        else:
+            raise CLIError('The provided source-server {} is 
invalid.'.format(source_server))
+
+    source_server_id_parts = parse_resource_id(source_server)
+    try:
+        source_server_object = 
client.get(source_server_id_parts['resource_group'], 
source_server_id_parts['name'])
+    except CloudError as e:
+        raise CLIError('Unable to get source server: {}.'.format(str(e)))
+
+    parameters = None
+    if provider == 'Microsoft.DBForMySQL':
+        from azure.mgmt.rdbms import mysql
+        parameters = mysql.models.ServerForCreate(
+            sku=mysql.models.Sku(name=source_server_object.sku.name),
+            
properties=mysql.models.ServerPropertiesForReplica(source_server_id=source_server),
+            location=source_server_object.location)
+
+    return sdk_no_wait(no_wait, client.create, resource_group_name, 
server_name, parameters)
+
+
+def _replica_stop(client, resource_group_name, server_name):
+    try:
+        server_object = client.get(resource_group_name, server_name)
+    except Exception as e:
+        raise CLIError('Unable to get server: {}.'.format(str(e)))
+
+    if server_object.replication_role.lower() != "replica":
+        raise CLIError('Server {} is not a replica 
server.'.format(server_name))
+
+    from importlib import import_module
+    server_module_path = server_object.__module__
+    module = import_module(server_module_path.replace('server', 
'server_update_parameters'))
+    ServerUpdateParameters = getattr(module, 'ServerUpdateParameters')
+
+    params = ServerUpdateParameters(replication_role='None')
+
+    return client.update(resource_group_name, server_name, params)
+
+
 def _server_update_custom_func(instance,
                                sku_name=None,
                                storage_mb=None,
@@ -189,6 +288,11 @@
     return params
 
 
+def _server_mariadb_get(cmd, resource_group_name, server_name):
+    client = get_mariadb_management_client(cmd.cli_ctx)
+    return client.servers.get(resource_group_name, server_name)
+
+
 def _server_mysql_get(cmd, resource_group_name, server_name):
     client = get_mysql_management_client(cmd.cli_ctx)
     return client.servers.get(resource_group_name, server_name)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/validators.py 
new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/validators.py
--- old/azure-cli-rdbms-0.3.1/azure/cli/command_modules/rdbms/validators.py     
2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure/cli/command_modules/rdbms/validators.py     
2019-02-12 03:05:13.000000000 +0100
@@ -13,8 +13,8 @@
 def get_combined_validator(validators):
     def _final_validator_impl(cmd, namespace):
         # do additional creation validation
-        verb = cmd.name.rsplit(' ', 1)[1]
-        if verb == 'create':
+        verbs = cmd.name.rsplit(' ', 2)
+        if verbs[1] == 'server' and verbs[2] == 'create':
             password_validator(namespace)
             get_default_location_from_resource_group(cmd, namespace)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure_cli_rdbms.egg-info/PKG-INFO 
new/azure-cli-rdbms-0.3.7/azure_cli_rdbms.egg-info/PKG-INFO
--- old/azure-cli-rdbms-0.3.1/azure_cli_rdbms.egg-info/PKG-INFO 2018-08-23 
01:09:49.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure_cli_rdbms.egg-info/PKG-INFO 2019-02-12 
03:05:35.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-cli-rdbms
-Version: 0.3.1
+Version: 0.3.7
 Summary: Microsoft Azure Command-Line Tools MySQL and PostgreSQL Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -9,7 +9,7 @@
 Description: Microsoft Azure CLI 'MySQL and PostgreSQL' Command Module
         =========================================================
         This package is for the 'rdbms' module.
-        i.e. 'az mysql' and 'az postgres'
+        i.e. 'az mariadb', 'az mysql' and 'az postgres'
         
         
         
@@ -17,6 +17,29 @@
         
         Release History
         ===============
+        0.3.7
+        +++++
+        * Improve help message and command parameters
+        
+        0.3.6
+        +++++
+        * Minor fixes
+        
+        0.3.5
+        +++++
+        * Add mariadb vnet commands
+        
+        0.3.4
+        +++++
+        * Add mysql replica commands
+        
+        0.3.3
+        +++++
+        * Minor fixes
+        
+        0.3.2
+        +++++
+        * Add support for MariaDB service
         
         0.3.1
         +++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-rdbms-0.3.1/azure_cli_rdbms.egg-info/requires.txt 
new/azure-cli-rdbms-0.3.7/azure_cli_rdbms.egg-info/requires.txt
--- old/azure-cli-rdbms-0.3.1/azure_cli_rdbms.egg-info/requires.txt     
2018-08-23 01:09:49.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/azure_cli_rdbms.egg-info/requires.txt     
2019-02-12 03:05:35.000000000 +0100
@@ -1,3 +1,3 @@
 azure-cli-core
-azure-mgmt-rdbms==1.2.0
+azure-mgmt-rdbms==1.5.0
 six
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-rdbms-0.3.1/setup.py 
new/azure-cli-rdbms-0.3.7/setup.py
--- old/azure-cli-rdbms-0.3.1/setup.py  2018-08-23 01:07:57.000000000 +0200
+++ new/azure-cli-rdbms-0.3.7/setup.py  2019-02-12 03:05:13.000000000 +0100
@@ -12,7 +12,7 @@
     logger.warn("Wheel is not available, disabling bdist_wheel hook")
     cmdclass = {}
 
-VERSION = "0.3.1"
+VERSION = "0.3.7"
 CLASSIFIERS = [
     'Development Status :: 4 - Beta',
     'Intended Audience :: Developers',
@@ -29,7 +29,7 @@
 
 DEPENDENCIES = [
     'azure-cli-core',
-    'azure-mgmt-rdbms==1.2.0',
+    'azure-mgmt-rdbms==1.5.0',
     'six'
 ]
 


Reply via email to