Hello community,

here is the log from the commit of package azure-cli-servicebus for 
openSUSE:Factory checked in at 2019-10-31 18:17:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/azure-cli-servicebus (Old)
 and      /work/SRC/openSUSE:Factory/.azure-cli-servicebus.new.2990 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "azure-cli-servicebus"

Thu Oct 31 18:17:21 2019 rev:5 rq:742723 version:0.3.6

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/azure-cli-servicebus/azure-cli-servicebus.changes    
    2019-06-05 11:45:29.459005948 +0200
+++ 
/work/SRC/openSUSE:Factory/.azure-cli-servicebus.new.2990/azure-cli-servicebus.changes
      2019-10-31 18:17:26.470146283 +0100
@@ -1,0 +2,8 @@
+Thu Oct 24 12:12:12 UTC 2019 - John Paul Adrian Glaubitz 
<[email protected]>
+
+- New upstream release
+  + Version 0.3.6
+  + For detailed information about changes see the
+    HISTORY.txt file provided with this package
+
+-------------------------------------------------------------------

Old:
----
  azure-cli-servicebus-0.3.3.tar.gz

New:
----
  azure-cli-servicebus-0.3.6.tar.gz

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

Other differences:
------------------
++++++ azure-cli-servicebus.spec ++++++
--- /var/tmp/diff_new_pack.pymfem/_old  2019-10-31 18:17:27.766147625 +0100
+++ /var/tmp/diff_new_pack.pymfem/_new  2019-10-31 18:17:27.770147630 +0100
@@ -17,7 +17,7 @@
 
 
 Name:           azure-cli-servicebus
-Version:        0.3.3
+Version:        0.3.6
 Release:        0
 Summary:        Microsoft Azure CLI 'servicebus' Command Module
 License:        MIT
@@ -33,7 +33,7 @@
 Requires:       azure-cli-command-modules-nspkg
 Requires:       azure-cli-core
 Requires:       azure-cli-nspkg
-Requires:       python3-azure-mgmt-servicebus >= 0.5.3
+Requires:       python3-azure-mgmt-servicebus >= 0.6.0
 Requires:       python3-azure-nspkg >= 3.0.0
 Requires:       python3-six
 Conflicts:      azure-cli < 2.0.0

++++++ azure-cli-servicebus-0.3.3.tar.gz -> azure-cli-servicebus-0.3.6.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-servicebus-0.3.3/HISTORY.rst 
new/azure-cli-servicebus-0.3.6/HISTORY.rst
--- old/azure-cli-servicebus-0.3.3/HISTORY.rst  2019-01-25 20:43:41.000000000 
+0100
+++ new/azure-cli-servicebus-0.3.6/HISTORY.rst  2019-06-13 23:17:47.000000000 
+0200
@@ -2,6 +2,21 @@
 
 Release History
 ===============
+
+0.3.6
++++++
+* Fix for #9319 - az servicebus topic create --max-size
+
+0.3.5
++++++
+* namespace: Added network-rule commands.
+* namespace create/update: Added --default-action argument for network rules.
+* topic create/update: fixed the command for parameter --max-size to support 
10, 20, 40 and 80GB values with premium sku
+
+0.3.4
++++++
+* Minor fixes
+
 0.3.3
 +++++
 * Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-servicebus-0.3.3/PKG-INFO 
new/azure-cli-servicebus-0.3.6/PKG-INFO
--- old/azure-cli-servicebus-0.3.3/PKG-INFO     2019-01-25 20:44:07.000000000 
+0100
+++ new/azure-cli-servicebus-0.3.6/PKG-INFO     2019-06-13 23:18:14.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-cli-servicebus
-Version: 0.3.3
+Version: 0.3.6
 Summary: Microsoft Azure Command-Line Tools Service Bus Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -19,6 +19,21 @@
         
         Release History
         ===============
+        
+        0.3.6
+        +++++
+        * Fix for #9319 - az servicebus topic create --max-size
+        
+        0.3.5
+        +++++
+        * namespace: Added network-rule commands.
+        * namespace create/update: Added --default-action argument for network 
rules.
+        * topic create/update: fixed the command for parameter --max-size to 
support 10, 20, 40 and 80GB values with premium sku
+        
+        0.3.4
+        +++++
+        * Minor fixes
+        
         0.3.3
         +++++
         * Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/__init__.py 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/__init__.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/__init__.py 
    2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/__init__.py 
    2019-06-13 23:17:47.000000000 +0200
@@ -15,9 +15,10 @@
     def __init__(self, cli_ctx=None):
         from azure.cli.core import ModExtensionSuppress
         from azure.cli.core.commands import CliCommandType
+        from azure.cli.core.profiles import ResourceType
         servicebus_custom = 
CliCommandType(operations_tmpl='azure.cli.command_modules.servicebus.custom#{}')
         super(ServicebusCommandsLoader, self).__init__(cli_ctx=cli_ctx, 
custom_command_type=servicebus_custom,
-                                                       
min_profile='2017-03-10-profile',
+                                                       
resource_type=ResourceType.MGMT_SERVICEBUS,
                                                        
suppress_extension=ModExtensionSuppress(__name__, 'servicebus', '0.0.1',
                                                                                
                reason='These commands are now in the CLI.',
                                                                                
                recommend_remove=True))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_help.py 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_help.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_help.py    
    2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_help.py    
    2019-06-13 23:17:47.000000000 +0200
@@ -27,6 +27,10 @@
     type: group
     short-summary: Manage Azure Authorization Rule connection strings for 
Namespace
 """
+helps['servicebus namespace network-rule'] = """
+    type: group
+    short-summary: Manage Azure ServiceBus networkruleSet for namespace
+"""
 
 helps['servicebus queue'] = """
     type: group
@@ -568,3 +572,31 @@
         - name:  Disable Service Bus Migration of Standard to Premium namespace
           text: az servicebus migration abort --resource-group myresourcegroup 
--name standardnamespace
 """
+
+helps['servicebus namespace network-rule add'] = """
+    type: command
+    short-summary: Add a network rule for a namespace.
+    examples:
+        - name: add a VirtualNetwork rule in NetworkruleSet for a namespace
+          text: az servicebus namespace network-rule add --resource-group 
myresourcegroup --namespace-name mynamespace --subnet {subnetId} 
--ignore-missing-endpoint True
+        - name: add a IP rule in NetworkruleSet for a namespace
+          text: az servicebus namespace network-rule add --resource-group 
myresourcegroup --namespace-name mynamespace --ip-address 10.0.0.0/24 --action 
Allow
+"""
+
+helps['servicebus namespace network-rule list'] = """
+    type: command
+    short-summary: Show properties of Network rule of the given Namespace.
+    examples:
+        - name: Show properties of Network rule of the given Namespace
+          text: az servicebus namespace network-rule list --resource-group 
myresourcegroup --namespace-name mynamespace
+"""
+
+helps['servicebus namespace network-rule remove'] = """
+    type: command
+    short-summary: Remove network rule for a namespace
+    examples:
+        - name: remove VirtualNetwork rule from NetworkruleSet for a namespace
+          text: az servicebus namespace network-rule remove --resource-group 
myresourcegroup --namespace-name mynamespace --subnet {subnetId}
+        - name: remove IP rule from NetworkruleSet for a namespace
+          text: az servicebus namespace network-rule remove --resource-group 
myresourcegroup --namespace-name mynamespace --ip-address 10.0.0.0/24
+"""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_params.py 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_params.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_params.py  
    2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_params.py  
    2019-06-13 23:17:47.000000000 +0200
@@ -29,16 +29,14 @@
 
     with self.argument_context('servicebus namespace') as c:
         c.argument('namespace_name', id_part='name', arg_type=name_type, 
completer=get_resource_name_completion_list('Microsoft.ServiceBus/namespaces'), 
help='Name of Namespace')
+        c.argument('default_action', help='Default action for network rule 
set.')
+        c.argument('tags', arg_type=tags_type)
+        c.argument('sku', arg_type=get_enum_type(SkuName), help='Namespace 
SKU.')
+        c.argument('capacity', type=int, choices=[1, 2, 4], help='Number of 
message units. This property is only applicable to namespaces of Premium SKU', 
validator=validate_premiumsku_capacity)
 
     with self.argument_context('servicebus namespace exists') as c:
         c.argument('name', arg_type=name_type, help='Namespace name. Name can 
contain only letters, numbers, and hyphens. The namespace must start with a 
letter, and it must end with a letter or number.')
 
-    for scope in ['servicebus namespace create', 'servicebus namespace 
update']:
-        with self.argument_context(scope) as c:
-            c.argument('tags', arg_type=tags_type)
-            c.argument('sku', arg_type=get_enum_type(SkuName))
-            c.argument('capacity', type=int, choices=[1, 2, 4], help='Number 
of message units. This property is only applicable to namespaces of Premium 
SKU', validator=validate_premiumsku_capacity)
-
     with self.argument_context('servicebus namespace create') as c:
         c.argument('location', arg_type=get_location_type(self.cli_ctx), 
validator=get_default_location_from_resource_group)
 
@@ -71,7 +69,7 @@
         with self.argument_context('servicebus queue {}'.format(scope)) as c:
             c.argument('queue_name', arg_type=name_type, 
id_part='child_name_1', help='Name of Queue')
             c.argument('lock_duration', validator=_validate_lock_duration, 
help='String ISO 8601 timespan or duration format for duration of a peek-lock; 
that is, the amount of time that the message is locked for other receivers. The 
maximum value for LockDuration is 5 minutes; the default value is 1 minute.')
-            c.argument('max_size_in_megabytes', options_list=['--max-size'], 
type=int, choices=[1024, 2048, 3072, 4096, 5120], help='The maximum size of 
queue in megabytes, which is the size of memory allocated for the queue. 
Default is 1024.')
+            c.argument('max_size_in_megabytes', options_list=['--max-size'], 
type=int, choices=[1024, 2048, 3072, 4096, 5120, 10240, 20480, 40960, 81920], 
help='Maximum size of queue in megabytes, which is the size of the memory 
allocated for the queue. Default is 1024. Max for Standard SKU is 5120 and for 
Premium SKU is 81920')
             c.argument('requires_duplicate_detection', 
options_list=['--enable-duplicate-detection'], arg_type=get_three_state_flag(), 
help='A boolean value indicating if this queue requires duplicate detection.')
             c.argument('requires_session', options_list=['--enable-session'], 
arg_type=get_three_state_flag(), help='A boolean value indicating whether the 
queue supports the concept of sessions.')
             c.argument('default_message_time_to_live', 
validator=_validate_default_message_time_to_live, help='ISO 8601 timespan or 
duration time format for default message to live value. This is the duration 
after which the message expires, starting from when the message is sent to 
Service Bus. This is the default value used when TimeToLive is not set on a 
message itself.')
@@ -117,7 +115,7 @@
         with self.argument_context('servicebus topic {}'.format(scope)) as c:
             c.argument('topic_name', arg_type=name_type, 
id_part='child_name_1', completer=get_topic_command_completion_list, help='Name 
of Topic')
             c.argument('default_message_time_to_live', 
validator=_validate_default_message_time_to_live, help='ISO 8601 or duration 
time format for Default message timespan to live value. This is the duration 
after which the message expires, starting from when the message is sent to 
Service Bus. This is the default value used when TimeToLive is not set on a 
message itself.')
-            c.argument('max_size_in_megabytes', options_list=['--max-size'], 
type=int, choices=[1024, 2048, 3072, 4096, 5120], help='Maximum size of topic 
in megabytes, which is the size of the memory allocated for the topic. Default 
is 1024.')
+            c.argument('max_size_in_megabytes', options_list=['--max-size'], 
type=int, choices=[1024, 2048, 3072, 4096, 5120, 10240, 20480, 40960, 81920], 
help='Maximum size of topic in megabytes, which is the size of the memory 
allocated for the topic. Default is 1024. Max for Standard SKU is 5120 and for 
Premium SKU is 81920')
             c.argument('requires_duplicate_detection', 
options_list=['--enable-duplicate-detection'], arg_type=get_three_state_flag(), 
help='A boolean value indicating if this topic requires duplicate detection.')
             c.argument('duplicate_detection_history_time_window', 
validator=_validate_duplicate_detection_history_time_window, help='ISO 8601 
timespan or duration time format for structure that defines the duration of the 
duplicate detection history. The default value is 10 minutes.')
             c.argument('enable_batched_operations', 
arg_type=get_three_state_flag(), help='Allow server-side batched operations.')
@@ -164,7 +162,7 @@
             c.argument('default_message_time_to_live', 
validator=_validate_default_message_time_to_live, help='ISO 8601 or duration 
time format for Default message timespan to live value. This is the duration 
after which the message expires, starting from when the message is sent to 
Service Bus. This is the default value used when TimeToLive is not set on a 
message itself.')
             c.argument('dead_lettering_on_message_expiration', 
options_list=['--enable-dead-lettering-on-message-expiration'], 
arg_type=get_three_state_flag(), help='A boolean Value that indicates whether a 
subscription has dead letter support when a message expires.')
             c.argument('max_delivery_count', type=int, help='Number of maximum 
deliveries.')
-            c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 
'SendDisabled', 'ReceiveDisabled']))
+            c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 
'SendDisabled', 'ReceiveDisabled']), help='Enumerates the possible values for 
the status of a messaging entity.')
             c.argument('enable_batched_operations', 
arg_type=get_three_state_flag(), help='Allow server-side batched operations.')
             c.argument('auto_delete_on_idle', 
validator=_validate_auto_delete_on_idle, 
options_list=['--auto-delete-on-idle'], help='ISO 8601 timeSpan  or duration 
time format for idle interval after which the topic is automatically deleted. 
The minimum duration is 5 minutes.')
             c.argument('forward_to', help='Queue/Topic name to forward the 
messages')
@@ -246,3 +244,18 @@
     for scope in ['show', 'complete', 'abort']:
         with self.argument_context('servicebus migration {}'.format(scope)) as 
c:
             c.argument('namespace_name', arg_type=name_type, help='Name of 
Standard Namespace')
+
+# Region Namespace NetworkRuleSet
+    with self.argument_context('servicebus namespace network-rule') as c:
+        c.argument('namespace_name', options_list=['--namespace-name'], 
id_part=None, help='Name of the Namespace')
+
+    for scope in ['servicebus namespace network-rule add', 'servicebus 
namespace network-rule remove']:
+        with self.argument_context(scope) as c:
+            c.argument('subnet', arg_group='Virtual Network Rule', 
options_list=['--subnet'], help='Name or ID of subnet. If name is supplied, 
`--vnet-name` must be supplied.')
+            c.argument('ip_mask', arg_group='IP Address Rule', 
options_list=['--ip-address'], help='IPv4 address or CIDR range.')
+            c.argument('namespace_name', options_list=['--namespace-name'], 
id_part=None, help='Name of the Namespace')
+            c.extra('vnet_name', arg_group='Virtual Network Rule', 
options_list=['--vnet-name'], help='Name of the Virtual Network')
+
+    with self.argument_context('servicebus namespace network-rule add') as c:
+        c.argument('ignore_missing_vnet_service_endpoint', arg_group='Virtual 
Network Rule', options_list=['--ignore-missing-endpoint'], 
arg_type=get_three_state_flag(), help='A boolean value that indicates whether 
to ignore missing vnet Service Endpoint')
+        c.argument('action', arg_group='IP Address Rule', 
options_list=['--action'], arg_type=get_enum_type(['Allow']), help='Action of 
the IP rule')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_validators.py
 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_validators.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/_validators.py
  2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/_validators.py
  2019-06-13 23:17:47.000000000 +0200
@@ -91,3 +91,28 @@
 def validate_premiumsku_capacity(namespace):
     if namespace.sku and namespace.sku != 'Premium' and namespace.capacity:
         raise CLIError('--capacity - This property is only applicable to 
namespaces of Premium SKU')
+
+
+# Validates if a subnet id or name have been given by the user. If subnet id 
is given, vnet-name should not be provided.
+def validate_subnet(cmd, namespace):
+    from msrestazure.tools import resource_id, is_valid_resource_id
+    from azure.cli.core.commands.client_factory import get_subscription_id
+
+    subnet = namespace.subnet
+    subnet_is_id = is_valid_resource_id(subnet)
+    vnet = namespace.vnet_name
+
+    if (subnet_is_id and not vnet) or (not subnet and not vnet):
+        pass
+    elif subnet and not subnet_is_id and vnet:
+        namespace.subnet = resource_id(
+            subscription=get_subscription_id(cmd.cli_ctx),
+            resource_group=namespace.resource_group_name,
+            namespace='Microsoft.Network',
+            type='virtualNetworks',
+            name=vnet,
+            child_type_1='subnets',
+            child_name_1=subnet)
+    else:
+        raise CLIError('incorrect usage: [--subnet ID | --subnet NAME 
--vnet-name NAME]')
+    delattr(namespace, 'vnet_name')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/commands.py 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/commands.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/commands.py 
    2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/commands.py 
    2019-06-13 23:17:47.000000000 +0200
@@ -15,40 +15,42 @@
         rules_mgmt_client_factory, disaster_recovery_mgmt_client_factory, 
migration_mgmt_client_factory
 
     sb_namespace_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.namespaces_operations#NamespacesOperations.{}',
+        
operations_tmpl='azure.mgmt.servicebus.operations#NamespacesOperations.{}',
         client_factory=namespaces_mgmt_client_factory
     )
 
     sb_queue_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.queues_operations#QueuesOperations.{}',
+        operations_tmpl='azure.mgmt.servicebus.operations#QueuesOperations.{}',
         client_factory=queues_mgmt_client_factory
     )
 
     sb_topic_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.topics_operations#TopicsOperations.{}',
+        operations_tmpl='azure.mgmt.servicebus.operations#TopicsOperations.{}',
         client_factory=topics_mgmt_client_factory
     )
 
     sb_subscriptions_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.subscriptions_operations#SubscriptionsOperations.{}',
+        
operations_tmpl='azure.mgmt.servicebus.operations#SubscriptionsOperations.{}',
         client_factory=subscriptions_mgmt_client_factory
     )
 
     sb_rule_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.rules_operations#RulesOperations.{}',
+        operations_tmpl='azure.mgmt.servicebus.operations#RulesOperations.{}',
         client_factory=rules_mgmt_client_factory
     )
 
     sb_geodr_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.disaster_recovery_configs_operations#DisasterRecoveryConfigsOperations.{}',
+        
operations_tmpl='azure.mgmt.servicebus.operations#DisasterRecoveryConfigsOperations.{}',
         client_factory=disaster_recovery_mgmt_client_factory
     )
 
     sb_migration_util = CliCommandType(
-        
operations_tmpl='azure.mgmt.servicebus.operations.migration_configs_operations#MigrationConfigsOperations.{}',
+        
operations_tmpl='azure.mgmt.servicebus.operations#MigrationConfigsOperations.{}',
         client_factory=migration_mgmt_client_factory
     )
 
+    from ._validators import validate_subnet
+
 # Namespace Region
     custom_tmpl = 'azure.cli.command_modules.servicebus.custom#{}'
     servicebus_custom = CliCommandType(operations_tmpl=custom_tmpl)
@@ -141,3 +143,9 @@
         g.show_command('show', 'get')
         g.command('complete', 'complete_migration')
         g.command('abort', 'revert')
+
+# NetwrokRuleSet Region
+    with self.command_group('servicebus namespace network-rule', 
sb_namespace_util, client_factory=namespaces_mgmt_client_factory) as g:
+        g.custom_command('add', 'cli_networkrule_createupdate', 
validator=validate_subnet)
+        g.command('list', 'get_network_rule_set')
+        g.custom_command('remove', 'cli_networkrule_delete', 
validator=validate_subnet)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/custom.py 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/custom.py
--- 
old/azure-cli-servicebus-0.3.3/azure/cli/command_modules/servicebus/custom.py   
    2019-01-25 20:43:41.000000000 +0100
+++ 
new/azure-cli-servicebus-0.3.6/azure/cli/command_modules/servicebus/custom.py   
    2019-06-13 23:17:47.000000000 +0200
@@ -13,9 +13,10 @@
 
 # Namespace Region
 def cli_namespace_create(client, resource_group_name, namespace_name, 
location=None, tags=None, sku='Standard',
-                         capacity=None):
+                         capacity=None, default_action=None):
+
     from azure.mgmt.servicebus.models import SBNamespace, SBSku
-    return client.create_or_update(
+    client.create_or_update(
         resource_group_name=resource_group_name,
         namespace_name=namespace_name,
         parameters=SBNamespace(
@@ -26,10 +27,18 @@
                 tier=sku,
                 capacity=capacity)
         )
-    )
+    ).result()
+
+    if default_action:
+        netwrokruleset = client.get_network_rule_set(resource_group_name, 
namespace_name)
+        netwrokruleset.default_action = default_action
+        client.create_or_update_network_rule_set(resource_group_name, 
namespace_name, netwrokruleset)
+
+    return client.get(resource_group_name, namespace_name)
 
 
-def cli_namespace_update(instance, tags=None, sku=None, capacity=None):
+def cli_namespace_update(client, instance, tags=None, sku=None, capacity=None, 
default_action=None):
+    from msrestazure.tools import parse_resource_id
 
     if tags is not None:
         instance.tags = tags
@@ -41,6 +50,12 @@
     if capacity is not None:
         instance.sku.capacity = capacity
 
+    if default_action:
+        resourcegroup = parse_resource_id(instance.id)['resource_group']
+        netwrokruleset = client.get_network_rule_set(resourcegroup, 
instance.name)
+        netwrokruleset.default_action = default_action
+        client.create_or_update_network_rule_set(resourcegroup, instance.name, 
netwrokruleset)
+
     return instance
 
 
@@ -70,7 +85,7 @@
 
 
 # Queue Region
-def cli_sbqueue_create(client, resource_group_name, namespace_name, 
queue_name, lock_duration=None,
+def cli_sbqueue_create(cmd, client, resource_group_name, namespace_name, 
queue_name, lock_duration=None,
                        max_size_in_megabytes=None, 
requires_duplicate_detection=None, requires_session=None,
                        default_message_time_to_live=None, 
dead_lettering_on_message_expiration=None,
                        duplicate_detection_history_time_window=None, 
max_delivery_count=None, status=None,
@@ -79,6 +94,9 @@
 
     from azure.mgmt.servicebus.models import SBQueue
 
+    if max_size_in_megabytes:
+        cli_returnnsdetails(cmd, resource_group_name, namespace_name, 
max_size_in_megabytes)
+
     queue_params = SBQueue(
         lock_duration=return_valid_duration_create(lock_duration),
         max_size_in_megabytes=max_size_in_megabytes,
@@ -162,12 +180,16 @@
 
 
 # Topic Region
-def cli_sbtopic_create(client, resource_group_name, namespace_name, 
topic_name, default_message_time_to_live=None,
+def cli_sbtopic_create(cmd, client, resource_group_name, namespace_name, 
topic_name, default_message_time_to_live=None,
                        max_size_in_megabytes=None, 
requires_duplicate_detection=None,
                        duplicate_detection_history_time_window=None,
                        enable_batched_operations=None, status=None, 
support_ordering=None, auto_delete_on_idle=None,
                        enable_partitioning=None, enable_express=None):
     from azure.mgmt.servicebus.models import SBTopic
+
+    if max_size_in_megabytes:
+        cli_returnnsdetails(cmd, resource_group_name, namespace_name, 
max_size_in_megabytes)
+
     topic_params = SBTopic(
         
default_message_time_to_live=return_valid_duration_create(default_message_time_to_live),
         max_size_in_megabytes=max_size_in_megabytes,
@@ -458,3 +480,64 @@
                 return None
     else:
         return None
+
+
+# NetwrokRuleSet Region
+def cli_networkrule_createupdate(client, resource_group_name, namespace_name, 
subnet=None, ip_mask=None, ignore_missing_vnet_service_endpoint=False, 
action='Allow'):
+    from azure.mgmt.servicebus.models import NWRuleSetVirtualNetworkRules, 
Subnet, NWRuleSetIpRules
+    netwrokruleset = client.get_network_rule_set(resource_group_name, 
namespace_name)
+
+    if netwrokruleset.virtual_network_rules is None:
+        netwrokruleset.virtual_network_rules = []
+
+    if netwrokruleset.ip_rules is None:
+        netwrokruleset.ip_rules = []
+
+    if subnet:
+        
netwrokruleset.virtual_network_rules.append(NWRuleSetVirtualNetworkRules(subnet=Subnet(id=subnet),
+                                                                               
  ignore_missing_vnet_service_endpoint=ignore_missing_vnet_service_endpoint))
+
+    if ip_mask:
+        netwrokruleset.ip_rules.append(NWRuleSetIpRules(ip_mask=ip_mask, 
action=action))
+
+    return client.create_or_update_network_rule_set(resource_group_name, 
namespace_name, netwrokruleset)
+
+
+def cli_networkrule_delete(client, resource_group_name, namespace_name, 
subnet=None, ip_mask=None):
+    from azure.mgmt.servicebus.models import NWRuleSetVirtualNetworkRules, 
NWRuleSetIpRules
+    netwrokruleset = client.get_network_rule_set(resource_group_name, 
namespace_name)
+
+    if subnet:
+        virtualnetworkrule = NWRuleSetVirtualNetworkRules()
+        virtualnetworkrule.subnet = subnet
+
+        for vnetruletodelete in netwrokruleset.virtual_network_rules:
+            if vnetruletodelete.subnet.id.lower() == subnet.lower():
+                virtualnetworkrule.ignore_missing_vnet_service_endpoint = 
vnetruletodelete.ignore_missing_vnet_service_endpoint
+                netwrokruleset.virtual_network_rules.remove(vnetruletodelete)
+                break
+
+    if ip_mask:
+        ipruletodelete = NWRuleSetIpRules()
+        ipruletodelete.ip_mask = ip_mask
+        ipruletodelete.action = "Allow"
+
+        if ipruletodelete in netwrokruleset.ip_rules:
+            netwrokruleset.ip_rules.remove(ipruletodelete)
+
+    return client.create_or_update_network_rule_set(resource_group_name, 
namespace_name, netwrokruleset)
+
+
+def cli_returnnsdetails(cmd, resource_group_name, namespace_name, 
max_size_in_megabytes):
+    from knack.util import CLIError
+    from azure.mgmt.servicebus import ServiceBusManagementClient
+    from azure.cli.core.commands.client_factory import get_mgmt_service_client
+    nsclient = get_mgmt_service_client(cmd.cli_ctx, 
ServiceBusManagementClient).namespaces
+    getnamespace = nsclient.get(resource_group_name=resource_group_name, 
namespace_name=namespace_name)
+    if getnamespace.sku.name == 'Standard' and max_size_in_megabytes not in 
[1024, 2048, 3072, 4096, 5120]:
+        raise CLIError('--max-size on Standard sku namespace only supports 
upto [1024, 2048, 3072, 4096, 5120] GB')
+
+    if getnamespace.sku.name == 'Premium' and max_size_in_megabytes not in 
[1024, 2048, 3072, 4096, 5120, 10240, 20480,
+                                                                            
40960, 81920]:
+        raise CLIError(
+            '--max-size on Premium sku namespace only supports upto [1024, 
2048, 3072, 4096, 5120, 10240, 20480, 40960, 81920] GB')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure_cli_servicebus.egg-info/PKG-INFO 
new/azure-cli-servicebus-0.3.6/azure_cli_servicebus.egg-info/PKG-INFO
--- old/azure-cli-servicebus-0.3.3/azure_cli_servicebus.egg-info/PKG-INFO       
2019-01-25 20:44:07.000000000 +0100
+++ new/azure-cli-servicebus-0.3.6/azure_cli_servicebus.egg-info/PKG-INFO       
2019-06-13 23:18:14.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: azure-cli-servicebus
-Version: 0.3.3
+Version: 0.3.6
 Summary: Microsoft Azure Command-Line Tools Service Bus Command Module
 Home-page: https://github.com/Azure/azure-cli
 Author: Microsoft Corporation
@@ -19,6 +19,21 @@
         
         Release History
         ===============
+        
+        0.3.6
+        +++++
+        * Fix for #9319 - az servicebus topic create --max-size
+        
+        0.3.5
+        +++++
+        * namespace: Added network-rule commands.
+        * namespace create/update: Added --default-action argument for network 
rules.
+        * topic create/update: fixed the command for parameter --max-size to 
support 10, 20, 40 and 80GB values with premium sku
+        
+        0.3.4
+        +++++
+        * Minor fixes
+        
         0.3.3
         +++++
         * Minor fixes
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/azure-cli-servicebus-0.3.3/azure_cli_servicebus.egg-info/requires.txt 
new/azure-cli-servicebus-0.3.6/azure_cli_servicebus.egg-info/requires.txt
--- old/azure-cli-servicebus-0.3.3/azure_cli_servicebus.egg-info/requires.txt   
2019-01-25 20:44:07.000000000 +0100
+++ new/azure-cli-servicebus-0.3.6/azure_cli_servicebus.egg-info/requires.txt   
2019-06-13 23:18:14.000000000 +0200
@@ -1,3 +1,3 @@
 azure-cli-core
 six
-azure-mgmt-servicebus==0.5.3
+azure-mgmt-servicebus==0.6.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/azure-cli-servicebus-0.3.3/setup.py 
new/azure-cli-servicebus-0.3.6/setup.py
--- old/azure-cli-servicebus-0.3.3/setup.py     2019-01-25 20:43:41.000000000 
+0100
+++ new/azure-cli-servicebus-0.3.6/setup.py     2019-06-13 23:17:47.000000000 
+0200
@@ -13,7 +13,7 @@
     logger.warn("Wheel is not available, disabling bdist_wheel hook")
     cmdclass = {}
 
-VERSION = "0.3.3"
+VERSION = "0.3.6"
 
 
 # The full list of classifiers is available at
@@ -35,7 +35,7 @@
 DEPENDENCIES = [
     'azure-cli-core',
     'six',
-    'azure-mgmt-servicebus==0.5.3',
+    'azure-mgmt-servicebus==0.6.0',
 ]
 
 with open('README.rst', 'r', encoding='utf-8') as f:


Reply via email to