Hello community,

here is the log from the commit of package azure-cli-cosmosdb for 
openSUSE:Factory checked in at 2018-05-13 16:01:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-cosmosdb (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-cosmosdb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-cosmosdb"

Sun May 13 16:01:58 2018 rev:3 rq:600045 version:0.1.20

Changes:
--------
--- /work/SRC/openSUSE:Factory/azure-cli-cosmosdb/azure-cli-cosmosdb.changes    
2018-02-14 09:30:41.481503394 +0100
+++ 
/work/SRC/openSUSE:Factory/.azure-cli-cosmosdb.new/azure-cli-cosmosdb.changes   
    2018-05-13 16:01:58.421098890 +0200
@@ -1,0 +2,8 @@
+Wed Apr 18 11:42:56 UTC 2018 - adrian.glaub...@suse.com
+
+- New upstream release
+  + Version 0.1.20
+- Move LICENSE.txt from %doc to %license section
+- Update Requires from setup.py
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-cosmosdb-0.1.17.tar.gz

New:
----
  azure-cli-cosmosdb-0.1.20.tar.gz

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

Other differences:
------------------
++++++ azure-cli-cosmosdb.spec ++++++
--- /var/tmp/diff_new_pack.APA5lm/_old  2018-05-13 16:01:58.941079918 +0200
+++ /var/tmp/diff_new_pack.APA5lm/_new  2018-05-13 16:01:58.945079772 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-cosmosdb
-Version:        0.1.17
+Version:        0.1.20
 Release:        0
 Summary:        Microsoft Azure CLI 'cosmosdb' Command Module
 License:        MIT
@@ -34,8 +34,9 @@
 Requires:       azure-cli-command-modules-nspkg
 Requires:       azure-cli-core
 Requires:       azure-cli-nspkg
-Requires:       python3-azure-mgmt-cosmosdb >= 0.2.1
+Requires:       python3-azure-mgmt-cosmosdb >= 0.3.1
 Requires:       python3-azure-nspkg
+Requires:       python3-pydocumentdb >= 2.0.1
 Conflicts:      azure-cli < 2.0.0
 
 BuildArch:      noarch
@@ -64,7 +65,8 @@
 
 %files
 %defattr(-,root,root,-)
-%doc HISTORY.rst LICENSE.txt README.rst
+%doc HISTORY.rst README.rst
+%license LICENSE.txt
 %{python3_sitelib}/azure/cli/command_modules/cosmosdb
 %{python3_sitelib}/azure_cli_cosmosdb-*.egg-info
 

++++++ azure-cli-cosmosdb-0.1.17.tar.gz -> azure-cli-cosmosdb-0.1.20.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-cosmosdb-0.1.17/HISTORY.rst 
new/azure-cli-cosmosdb-0.1.20/HISTORY.rst
--- old/azure-cli-cosmosdb-0.1.17/HISTORY.rst   2018-01-26 17:12:23.000000000 
+0100
+++ new/azure-cli-cosmosdb-0.1.20/HISTORY.rst   2018-04-06 19:33:13.000000000 
+0200
@@ -3,6 +3,19 @@
 Release History
 ===============
 
+0.1.20
+++++++
+* Minor fixes
+* `sdist` is now compatible with wheel 0.31.0
+
+0.1.19
+++++++
+* Added support for setting capabilities and minor fixes.
+
+0.1.18
+++++++
+* Minor fixes
+
 0.1.17
 ++++++
 * Fix parameter description for failover policies.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-cosmosdb-0.1.17/PKG-INFO 
new/azure-cli-cosmosdb-0.1.20/PKG-INFO
--- old/azure-cli-cosmosdb-0.1.17/PKG-INFO      2018-01-26 17:12:50.000000000 
+0100
+++ new/azure-cli-cosmosdb-0.1.20/PKG-INFO      2018-04-06 19:33:24.000000000 
+0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: azure-cli-cosmosdb
-Version: 0.1.17
+Version: 0.1.20
 Summary: Microsoft Azure Command-Line Tools Cosmos DB Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: azpy...@microsoft.com
 License: MIT
+Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'cosmosdb' Command Module
         =============================================
         
@@ -20,6 +21,19 @@
         Release History
         ===============
         
+        0.1.20
+        ++++++
+        * Minor fixes
+        * `sdist` is now compatible with wheel 0.31.0
+        
+        0.1.19
+        ++++++
+        * Added support for setting capabilities and minor fixes.
+        
+        0.1.18
+        ++++++
+        * Minor fixes
+        
         0.1.17
         ++++++
         * Fix parameter description for failover policies.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_client_factory.py
 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_client_factory.py
--- 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_client_factory.py
 2018-01-26 17:12:23.000000000 +0100
+++ 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_client_factory.py
 2018-04-06 19:33:13.000000000 +0200
@@ -34,15 +34,6 @@
     client.default_headers['User-Agent'] = ' '.join(agents)
 
 
-def _get_url_connection(url_collection, account_name):
-    if url_collection:
-        return url_collection
-    elif account_name:
-        return 'https://{}.documents.azure.com:443'.format(account_name)
-
-    return None
-
-
 def cf_cosmosdb_document(cli_ctx, kwargs):
     from pydocumentdb import document_client
     service_type = document_client.DocumentClient
@@ -59,7 +50,9 @@
             keys = 
cf_cosmosdb(cli_ctx).database_accounts.list_keys(resource_group, name)
             key = keys.primary_master_key
 
-        url_connection = _get_url_connection(url_connection, name)
+        if name and resource_group and not url_connection:
+            database_account = 
cf_cosmosdb(cli_ctx).database_accounts.get(resource_group, name)
+            url_connection = database_account.document_endpoint
 
         if not key and not url_connection:
             raise CLIError(NO_CREDENTIALS_ERROR_MESSAGE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_params.py 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_params.py
--- old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_params.py 
2018-01-26 17:12:23.000000000 +0100
+++ new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_params.py 
2018-04-06 19:33:13.000000000 +0200
@@ -7,11 +7,11 @@
 from argcomplete.completers import FilesCompleter
 
 from azure.cli.core.commands.parameters import (
-    get_resource_name_completion_list, name_type, get_enum_type, 
get_three_state_flag)
+    get_resource_name_completion_list, name_type, get_enum_type, 
get_three_state_flag, tags_type)
 from azure.cli.core.util import shell_safe_json_parse
 
 from azure.cli.command_modules.cosmosdb._validators import (
-    validate_locations, validate_ip_range_filter, validate_failover_policies)
+    validate_locations, validate_ip_range_filter, validate_failover_policies, 
validate_capabilities)
 
 
 def load_arguments(self, _):
@@ -26,19 +26,21 @@
         with self.argument_context(scope) as c:
             c.argument('account_name', completer=None)
             c.ignore('resource_group_location')
-            c.argument('locations', nargs='+', validator=validate_locations, 
help="space separated locations in 'regionName=failoverPriority' format. E.g 
eastus=0 westus=1. Failover priority values are 0 for write regions and greater 
than 0 for read regions. A failover priority value must be unique and less than 
the total number of regions. Default: single region account in the location of 
the specified resource group.")
+            c.argument('locations', nargs='+', validator=validate_locations, 
help="space-separated locations in 'regionName=failoverPriority' format. E.g 
eastus=0 westus=1. Failover priority values are 0 for write regions and greater 
than 0 for read regions. A failover priority value must be unique and less than 
the total number of regions. Default: single region account in the location of 
the specified resource group.")
+            c.argument('tags', arg_type=tags_type)
             c.argument('default_consistency_level', 
arg_type=get_enum_type(DefaultConsistencyLevel), help="default consistency 
level of the Cosmos DB database account")
             c.argument('max_staleness_prefix', type=int, help="when used with 
Bounded Staleness consistency, this value represents the number of stale 
requests tolerated. Accepted range for this value is 1 - 2,147,483,647")
             c.argument('max_interval', type=int, help="when used with Bounded 
Staleness consistency, this value represents the time amount of staleness (in 
seconds) tolerated. Accepted range for this value is 1 - 100")
-            c.argument('ip_range_filter', nargs='+', 
validator=validate_ip_range_filter, help="firewall support. Specifies the set 
of IP addresses or IP address ranges in CIDR form to be included as the allowed 
list of client IPs for a given database account. IP addresses/ranges must be 
comma separated and must not contain any spaces")
+            c.argument('ip_range_filter', nargs='+', 
validator=validate_ip_range_filter, help="firewall support. Specifies the set 
of IP addresses or IP address ranges in CIDR form to be included as the allowed 
list of client IPs for a given database account. IP addresses/ranges must be 
comma-separated and must not contain any spaces")
             c.argument('kind', arg_type=get_enum_type(DatabaseAccountKind), 
help='The type of Cosmos DB database account to create')
             c.argument('enable_automatic_failover', 
arg_type=get_three_state_flag(), help='Enables automatic failover of the write 
region in the rare event that the region is unavailable due to an outage. 
Automatic failover will result in a new write region for the account and is 
chosen based on the failover priorities configured for the account.')
+            c.argument('capabilities', nargs='+', 
validator=validate_capabilities, help='set custom capabilities on the Cosmos DB 
database account.')
 
     with self.argument_context('cosmosdb regenerate-key') as c:
         c.argument('key_kind', arg_type=get_enum_type(KeyKind))
 
     with self.argument_context('cosmosdb failover-priority-change') as c:
-        c.argument('failover_policies', validator=validate_failover_policies, 
help="space separated failover policies in 'regionName=failoverPriority' 
format. E.g eastus=0 westus=1", nargs='+')
+        c.argument('failover_policies', validator=validate_failover_policies, 
help="space-separated failover policies in 'regionName=failoverPriority' 
format. E.g eastus=0 westus=1", nargs='+')
 
     with self.argument_context('cosmosdb collection') as c:
         c.argument('collection_id', options_list=['--collection-name', '-c'], 
help='Collection Name')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_validators.py 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_validators.py
--- 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/_validators.py 
    2018-01-26 17:12:23.000000000 +0100
+++ 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/_validators.py 
    2018-04-06 19:33:13.000000000 +0200
@@ -30,3 +30,13 @@
 def validate_ip_range_filter(ns):
     if ns.ip_range_filter:
         ns.ip_range_filter = ",".join(ns.ip_range_filter)
+
+
+def validate_capabilities(ns):
+    """ Extracts multiple space-separated capabilities """
+    from azure.mgmt.cosmosdb.models.capability import Capability
+    if ns.capabilities is not None:
+        capabilties_list = []
+        for item in ns.capabilities:
+            capabilties_list.append(Capability(name=item))
+        ns.capabilities = capabilties_list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/custom.py 
new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/custom.py
--- old/azure-cli-cosmosdb-0.1.17/azure/cli/command_modules/cosmosdb/custom.py  
2018-01-26 17:12:23.000000000 +0100
+++ new/azure-cli-cosmosdb-0.1.20/azure/cli/command_modules/cosmosdb/custom.py  
2018-04-06 19:33:13.000000000 +0200
@@ -44,14 +44,15 @@
                         resource_group_name,
                         account_name,
                         locations=None,
+                        tags=None,
                         kind=DatabaseAccountKind.global_document_db.value,
                         default_consistency_level=None,
                         max_staleness_prefix=100,
                         max_interval=5,
                         ip_range_filter=None,
-                        enable_automatic_failover=None):
+                        enable_automatic_failover=None,
+                        capabilities=None):
     """Create a new Azure Cosmos DB database account."""
-
     consistency_policy = None
     if default_consistency_level is not None:
         consistency_policy = ConsistencyPolicy(default_consistency_level, 
max_staleness_prefix,
@@ -69,10 +70,12 @@
     params = DatabaseAccountCreateUpdateParameters(
         resource_group_location,
         locations,
+        tags=tags,
         kind=kind,
         consistency_policy=consistency_policy,
         ip_range_filter=ip_range_filter,
-        enable_automatic_failover=enable_automatic_failover)
+        enable_automatic_failover=enable_automatic_failover,
+        capabilities=capabilities)
 
     async_docdb_create = client.create_or_update(resource_group_name, 
account_name, params)
     docdb_account = async_docdb_create.result()
@@ -84,14 +87,48 @@
                         resource_group_name,
                         account_name,
                         locations=None,
+                        tags=None,
                         default_consistency_level=None,
                         max_staleness_prefix=None,
                         max_interval=None,
                         ip_range_filter=None,
-                        enable_automatic_failover=None):
+                        enable_automatic_failover=None,
+                        capabilities=None):
     """Update an existing Azure Cosmos DB database account. """
     existing = client.get(resource_group_name, account_name)
 
+    # Workaround until PATCH support for all properties
+    # pylint: disable=too-many-boolean-expressions
+    if capabilities is not None:
+        if locations or \
+           default_consistency_level is not None or \
+           max_staleness_prefix is not None or \
+           max_interval is not None or \
+           ip_range_filter is not None or \
+           enable_automatic_failover is not None:
+            raise CLIError("Cannot set capabilities and update properties at 
the same time. {0}".format(locations))
+
+        else:
+            async_docdb_create = client.patch(resource_group_name, 
account_name, tags=tags, capabilities=capabilities)
+            docdb_account = async_docdb_create.result()
+            docdb_account = client.get(resource_group_name, account_name)
+            return docdb_account
+
+    # Workaround until PATCH support for all properties
+    # pylint: disable=too-many-boolean-expressions
+    if tags is not None:
+        if not locations and\
+           default_consistency_level is None and\
+           max_staleness_prefix is None and\
+           max_interval is None and\
+           ip_range_filter is None and\
+           enable_automatic_failover is None:
+
+            async_docdb_create = client.patch(resource_group_name, 
account_name, tags=tags, capabilities=capabilities)
+            docdb_account = async_docdb_create.result()
+            docdb_account = client.get(resource_group_name, account_name)
+            return docdb_account
+
     update_consistency_policy = False
     if max_interval is not None or \
        max_staleness_prefix is not None or \
@@ -125,12 +162,18 @@
     if enable_automatic_failover is None:
         enable_automatic_failover = existing.enable_automatic_failover
 
+    if tags is None:
+        tags = existing.tags
+
     params = DatabaseAccountCreateUpdateParameters(
         existing.location,
         locations,
+        tags=tags,
         kind=existing.kind,
         consistency_policy=consistency_policy,
-        ip_range_filter=ip_range_filter)
+        ip_range_filter=ip_range_filter,
+        enable_automatic_failover=enable_automatic_failover,
+        capabilities=existing.capabilities)
 
     async_docdb_create = client.create_or_update(resource_group_name, 
account_name, params)
     docdb_account = async_docdb_create.result()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure_cli_cosmosdb.egg-info/PKG-INFO 
new/azure-cli-cosmosdb-0.1.20/azure_cli_cosmosdb.egg-info/PKG-INFO
--- old/azure-cli-cosmosdb-0.1.17/azure_cli_cosmosdb.egg-info/PKG-INFO  
2018-01-26 17:12:50.000000000 +0100
+++ new/azure-cli-cosmosdb-0.1.20/azure_cli_cosmosdb.egg-info/PKG-INFO  
2018-04-06 19:33:24.000000000 +0200
@@ -1,11 +1,12 @@
 Metadata-Version: 1.1
 Name: azure-cli-cosmosdb
-Version: 0.1.17
+Version: 0.1.20
 Summary: Microsoft Azure Command-Line Tools Cosmos DB Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
 Author-email: azpy...@microsoft.com
 License: MIT
+Description-Content-Type: UNKNOWN
 Description: Microsoft Azure CLI 'cosmosdb' Command Module
         =============================================
         
@@ -20,6 +21,19 @@
         Release History
         ===============
         
+        0.1.20
+        ++++++
+        * Minor fixes
+        * `sdist` is now compatible with wheel 0.31.0
+        
+        0.1.19
+        ++++++
+        * Added support for setting capabilities and minor fixes.
+        
+        0.1.18
+        ++++++
+        * Minor fixes
+        
         0.1.17
         ++++++
         * Fix parameter description for failover policies.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-cosmosdb-0.1.17/azure_cli_cosmosdb.egg-info/requires.txt 
new/azure-cli-cosmosdb-0.1.20/azure_cli_cosmosdb.egg-info/requires.txt
--- old/azure-cli-cosmosdb-0.1.17/azure_cli_cosmosdb.egg-info/requires.txt      
2018-01-26 17:12:50.000000000 +0100
+++ new/azure-cli-cosmosdb-0.1.20/azure_cli_cosmosdb.egg-info/requires.txt      
2018-04-06 19:33:24.000000000 +0200
@@ -1,3 +1,3 @@
-azure-mgmt-cosmosdb==0.2.1
+azure-mgmt-cosmosdb==0.3.1
 azure-cli-core
 pydocumentdb>=2.0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-cosmosdb-0.1.17/setup.py 
new/azure-cli-cosmosdb-0.1.20/setup.py
--- old/azure-cli-cosmosdb-0.1.17/setup.py      2018-01-26 17:12:23.000000000 
+0100
+++ new/azure-cli-cosmosdb-0.1.20/setup.py      2018-04-06 19:33:13.000000000 
+0200
@@ -16,7 +16,7 @@
     cmdclass = {}
 
 
-VERSION = "0.1.17"
+VERSION = "0.1.20"
 # The full list of classifiers is available at
 # https://pypi.python.org/pypi?%3Aaction=list_classifiers
 CLASSIFIERS = [
@@ -34,7 +34,7 @@
 
 DEPENDENCIES = [
 
-    'azure-mgmt-cosmosdb==0.2.1',
+    'azure-mgmt-cosmosdb==0.3.1',
     'azure-cli-core',
     'pydocumentdb>=2.0.1'
 ]


Reply via email to