Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR] servicebus/resource-manager #3633

Merged
merged 12 commits into from
Apr 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions azure-mgmt-servicebus/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@
Release History
===============

0.6.0 (2019-04-09)
++++++++++++++++++

**Features**

- Added operation NamespacesOperations.get_network_rule_set
- Added operation NamespacesOperations.migrate
- Added operation NamespacesOperations.create_or_update_network_rule_set

0.5.4 (2019-02-15)
++++++++++++++++++

**Features**

- Added operation NamespacesOperations.migrate

0.5.3 (2018-10-29)
++++++++++++++++++

Expand Down
1 change: 1 addition & 0 deletions azure-mgmt-servicebus/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
recursive-include tests *.py *.yaml
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py
Expand Down
19 changes: 0 additions & 19 deletions azure-mgmt-servicebus/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,6 @@ For the older Azure Service Management (ASM) libraries, see
For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Compatibility
=============

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this package.

You can check the version using pip:

.. code:: shell

pip freeze

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:

.. code:: shell

pip uninstall azure


Usage
=====

Expand Down
21 changes: 21 additions & 0 deletions azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from .sb_sku_py3 import SBSku
from .sb_namespace_py3 import SBNamespace
from .sb_namespace_update_parameters_py3 import SBNamespaceUpdateParameters
from .sb_namespace_migrate_py3 import SBNamespaceMigrate
from .sb_authorization_rule_py3 import SBAuthorizationRule
from .authorization_rule_properties_py3 import AuthorizationRuleProperties
from .access_keys_py3 import AccessKeys
Expand All @@ -41,13 +42,18 @@
from .eventhub_py3 import Eventhub
from .arm_disaster_recovery_py3 import ArmDisasterRecovery
from .migration_config_properties_py3 import MigrationConfigProperties
from .subnet_py3 import Subnet
from .nw_rule_set_ip_rules_py3 import NWRuleSetIpRules
from .nw_rule_set_virtual_network_rules_py3 import NWRuleSetVirtualNetworkRules
from .network_rule_set_py3 import NetworkRuleSet
except (SyntaxError, ImportError):
from .tracked_resource import TrackedResource
from .resource import Resource
from .resource_namespace_patch import ResourceNamespacePatch
from .sb_sku import SBSku
from .sb_namespace import SBNamespace
from .sb_namespace_update_parameters import SBNamespaceUpdateParameters
from .sb_namespace_migrate import SBNamespaceMigrate
from .sb_authorization_rule import SBAuthorizationRule
from .authorization_rule_properties import AuthorizationRuleProperties
from .access_keys import AccessKeys
Expand All @@ -73,6 +79,10 @@
from .eventhub import Eventhub
from .arm_disaster_recovery import ArmDisasterRecovery
from .migration_config_properties import MigrationConfigProperties
from .subnet import Subnet
from .nw_rule_set_ip_rules import NWRuleSetIpRules
from .nw_rule_set_virtual_network_rules import NWRuleSetVirtualNetworkRules
from .network_rule_set import NetworkRuleSet
from .operation_paged import OperationPaged
from .sb_namespace_paged import SBNamespacePaged
from .sb_authorization_rule_paged import SBAuthorizationRulePaged
Expand All @@ -87,6 +97,7 @@
from .service_bus_management_client_enums import (
SkuName,
SkuTier,
NameSpaceType,
AccessRights,
KeyType,
EntityStatus,
Expand All @@ -95,6 +106,8 @@
EncodingCaptureDescription,
ProvisioningStateDR,
RoleDisasterRecovery,
NetworkRuleIPAction,
DefaultAction,
)

__all__ = [
Expand All @@ -104,6 +117,7 @@
'SBSku',
'SBNamespace',
'SBNamespaceUpdateParameters',
'SBNamespaceMigrate',
'SBAuthorizationRule',
'AuthorizationRuleProperties',
'AccessKeys',
Expand All @@ -129,6 +143,10 @@
'Eventhub',
'ArmDisasterRecovery',
'MigrationConfigProperties',
'Subnet',
'NWRuleSetIpRules',
'NWRuleSetVirtualNetworkRules',
'NetworkRuleSet',
'OperationPaged',
'SBNamespacePaged',
'SBAuthorizationRulePaged',
Expand All @@ -142,6 +160,7 @@
'EventhubPaged',
'SkuName',
'SkuTier',
'NameSpaceType',
'AccessRights',
'KeyType',
'EntityStatus',
Expand All @@ -150,4 +169,6 @@
'EncodingCaptureDescription',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'NetworkRuleIPAction',
'DefaultAction',
]
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class ArmDisasterRecovery(Resource):
be replicated.
:vartype pending_replication_operations_count: long
:param partner_namespace: ARM Id of the Primary/Secondary eventhub
namespace name, which is part of GEO DR pairning
namespace name, which is part of GEO DR pairing
:type partner_namespace: str
:param alternate_name: Primary/Secondary eventhub namespace name, which is
part of GEO DR pairning
part of GEO DR pairing
:type alternate_name: str
:ivar role: role of namespace in GEO DR - possible values 'Primary' or
'PrimaryNotReplicating' or 'Secondary'. Possible values include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ class ArmDisasterRecovery(Resource):
be replicated.
:vartype pending_replication_operations_count: long
:param partner_namespace: ARM Id of the Primary/Secondary eventhub
namespace name, which is part of GEO DR pairning
namespace name, which is part of GEO DR pairing
:type partner_namespace: str
:param alternate_name: Primary/Secondary eventhub namespace name, which is
part of GEO DR pairning
part of GEO DR pairing
:type alternate_name: str
:ivar role: role of namespace in GEO DR - possible values 'Primary' or
'PrimaryNotReplicating' or 'Secondary'. Possible values include:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CheckNameAvailability(Model):

All required parameters must be populated in order to send to Azure.

:param name: Required. The Name to check the namespce name availability
:param name: Required. The Name to check the namespace name availability
and The namespace name can contain only letters, numbers, and hyphens. The
namespace must start with a letter, and it must end with a letter or
number.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class CheckNameAvailability(Model):

All required parameters must be populated in order to send to Azure.

:param name: Required. The Name to check the namespce name availability
:param name: Required. The Name to check the namespace name availability
and The namespace name can contain only letters, numbers, and hyphens. The
namespace must start with a letter, and it must end with a letter or
number.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class ErrorResponse(Model):
"""Error reponse indicates ServiceBus service is not able to process the
"""Error response indicates ServiceBus service is not able to process the
incoming request. The reason is provided in the error message.

:param code: Error code.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


class ErrorResponse(Model):
"""Error reponse indicates ServiceBus service is not able to process the
"""Error response indicates ServiceBus service is not able to process the
incoming request. The reason is provided in the error message.

:param code: Error code.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .resource import Resource


class NetworkRuleSet(Resource):
"""Description of NetworkRuleSet resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param default_action: Default Action for Network Rule Set. Possible
values include: 'Allow', 'Deny'
:type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction
:param virtual_network_rules: List VirtualNetwork Rules
:type virtual_network_rules:
list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules]
:param ip_rules: List of IpRules
:type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'default_action': {'key': 'properties.defaultAction', 'type': 'str'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'},
'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'},
}

def __init__(self, **kwargs):
super(NetworkRuleSet, self).__init__(**kwargs)
self.default_action = kwargs.get('default_action', None)
self.virtual_network_rules = kwargs.get('virtual_network_rules', None)
self.ip_rules = kwargs.get('ip_rules', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from .resource_py3 import Resource


class NetworkRuleSet(Resource):
"""Description of NetworkRuleSet resource.

Variables are only populated by the server, and will be ignored when
sending a request.

:ivar id: Resource Id
:vartype id: str
:ivar name: Resource name
:vartype name: str
:ivar type: Resource type
:vartype type: str
:param default_action: Default Action for Network Rule Set. Possible
values include: 'Allow', 'Deny'
:type default_action: str or ~azure.mgmt.servicebus.models.DefaultAction
:param virtual_network_rules: List VirtualNetwork Rules
:type virtual_network_rules:
list[~azure.mgmt.servicebus.models.NWRuleSetVirtualNetworkRules]
:param ip_rules: List of IpRules
:type ip_rules: list[~azure.mgmt.servicebus.models.NWRuleSetIpRules]
"""

_validation = {
'id': {'readonly': True},
'name': {'readonly': True},
'type': {'readonly': True},
}

_attribute_map = {
'id': {'key': 'id', 'type': 'str'},
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
'default_action': {'key': 'properties.defaultAction', 'type': 'str'},
'virtual_network_rules': {'key': 'properties.virtualNetworkRules', 'type': '[NWRuleSetVirtualNetworkRules]'},
'ip_rules': {'key': 'properties.ipRules', 'type': '[NWRuleSetIpRules]'},
}

def __init__(self, *, default_action=None, virtual_network_rules=None, ip_rules=None, **kwargs) -> None:
super(NetworkRuleSet, self).__init__(**kwargs)
self.default_action = default_action
self.virtual_network_rules = virtual_network_rules
self.ip_rules = ip_rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class NWRuleSetIpRules(Model):
"""Description of NetWorkRuleSet - IpRules resource.

:param ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Allow'.
Default value: "Allow" .
:type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction
"""

_attribute_map = {
'ip_mask': {'key': 'ipMask', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}

def __init__(self, **kwargs):
super(NWRuleSetIpRules, self).__init__(**kwargs)
self.ip_mask = kwargs.get('ip_mask', None)
self.action = kwargs.get('action', "Allow")
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class NWRuleSetIpRules(Model):
"""Description of NetWorkRuleSet - IpRules resource.

:param ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Allow'.
Default value: "Allow" .
:type action: str or ~azure.mgmt.servicebus.models.NetworkRuleIPAction
"""

_attribute_map = {
'ip_mask': {'key': 'ipMask', 'type': 'str'},
'action': {'key': 'action', 'type': 'str'},
}

def __init__(self, *, ip_mask: str=None, action="Allow", **kwargs) -> None:
super(NWRuleSetIpRules, self).__init__(**kwargs)
self.ip_mask = ip_mask
self.action = action
Loading