Skip to content

[AutoPR servicebus/resource-manager] Service Bus: moved VNet and IpFilter rules from 2018-preview to 2017 API version #3626

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

Merged
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
3 changes: 3 additions & 0 deletions azure-mgmt-servicebus/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
include *.rst
include azure/__init__.py
include azure/mgmt/__init__.py

12 changes: 12 additions & 0 deletions azure-mgmt-servicebus/azure/mgmt/servicebus/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
from .eventhub_py3 import Eventhub
from .arm_disaster_recovery_py3 import ArmDisasterRecovery
from .migration_config_properties_py3 import MigrationConfigProperties
from .ip_filter_rule_py3 import IpFilterRule
from .virtual_network_rule_py3 import VirtualNetworkRule
except (SyntaxError, ImportError):
from .tracked_resource import TrackedResource
from .resource import Resource
Expand Down Expand Up @@ -73,9 +75,13 @@
from .eventhub import Eventhub
from .arm_disaster_recovery import ArmDisasterRecovery
from .migration_config_properties import MigrationConfigProperties
from .ip_filter_rule import IpFilterRule
from .virtual_network_rule import VirtualNetworkRule
from .operation_paged import OperationPaged
from .sb_namespace_paged import SBNamespacePaged
from .sb_authorization_rule_paged import SBAuthorizationRulePaged
from .ip_filter_rule_paged import IpFilterRulePaged
from .virtual_network_rule_paged import VirtualNetworkRulePaged
from .arm_disaster_recovery_paged import ArmDisasterRecoveryPaged
from .migration_config_properties_paged import MigrationConfigPropertiesPaged
from .sb_queue_paged import SBQueuePaged
Expand All @@ -95,6 +101,7 @@
EncodingCaptureDescription,
ProvisioningStateDR,
RoleDisasterRecovery,
IPAction,
)

__all__ = [
Expand Down Expand Up @@ -129,9 +136,13 @@
'Eventhub',
'ArmDisasterRecovery',
'MigrationConfigProperties',
'IpFilterRule',
'VirtualNetworkRule',
'OperationPaged',
'SBNamespacePaged',
'SBAuthorizationRulePaged',
'IpFilterRulePaged',
'VirtualNetworkRulePaged',
'ArmDisasterRecoveryPaged',
'MigrationConfigPropertiesPaged',
'SBQueuePaged',
Expand All @@ -150,4 +161,5 @@
'EncodingCaptureDescription',
'ProvisioningStateDR',
'RoleDisasterRecovery',
'IPAction',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 IpFilterRule(Resource):
"""Single item in a List or Get IpFilterRules operation.

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 ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Accept',
'Reject'
:type action: str or ~azure.mgmt.servicebus.models.IPAction
:param filter_name: IP Filter name
:type filter_name: str
"""

_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'},
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
'action': {'key': 'properties.action', 'type': 'str'},
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
}

def __init__(self, **kwargs):
super(IpFilterRule, self).__init__(**kwargs)
self.ip_mask = kwargs.get('ip_mask', None)
self.action = kwargs.get('action', None)
self.filter_name = kwargs.get('filter_name', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class IpFilterRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`IpFilterRule <azure.mgmt.servicebus.models.IpFilterRule>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[IpFilterRule]'}
}

def __init__(self, *args, **kwargs):

super(IpFilterRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# 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 IpFilterRule(Resource):
"""Single item in a List or Get IpFilterRules operation.

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 ip_mask: IP Mask
:type ip_mask: str
:param action: The IP Filter Action. Possible values include: 'Accept',
'Reject'
:type action: str or ~azure.mgmt.servicebus.models.IPAction
:param filter_name: IP Filter name
:type filter_name: str
"""

_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'},
'ip_mask': {'key': 'properties.ipMask', 'type': 'str'},
'action': {'key': 'properties.action', 'type': 'str'},
'filter_name': {'key': 'properties.filterName', 'type': 'str'},
}

def __init__(self, *, ip_mask: str=None, action=None, filter_name: str=None, **kwargs) -> None:
super(IpFilterRule, self).__init__(**kwargs)
self.ip_mask = ip_mask
self.action = action
self.filter_name = filter_name
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ class RoleDisasterRecovery(str, Enum):
primary = "Primary"
primary_not_replicating = "PrimaryNotReplicating"
secondary = "Secondary"


class IPAction(str, Enum):

accept = "Accept"
reject = "Reject"
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 VirtualNetworkRule(Resource):
"""Single item in a List or Get VirtualNetworkRules operation.

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 virtual_network_subnet_id: Resource ID of Virtual Network Subnet
:type virtual_network_subnet_id: str
"""

_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'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
}

def __init__(self, **kwargs):
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = kwargs.get('virtual_network_subnet_id', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# 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.paging import Paged


class VirtualNetworkRulePaged(Paged):
"""
A paging container for iterating over a list of :class:`VirtualNetworkRule <azure.mgmt.servicebus.models.VirtualNetworkRule>` object
"""

_attribute_map = {
'next_link': {'key': 'nextLink', 'type': 'str'},
'current_page': {'key': 'value', 'type': '[VirtualNetworkRule]'}
}

def __init__(self, *args, **kwargs):

super(VirtualNetworkRulePaged, self).__init__(*args, **kwargs)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 VirtualNetworkRule(Resource):
"""Single item in a List or Get VirtualNetworkRules operation.

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 virtual_network_subnet_id: Resource ID of Virtual Network Subnet
:type virtual_network_subnet_id: str
"""

_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'},
'virtual_network_subnet_id': {'key': 'properties.virtualNetworkSubnetId', 'type': 'str'},
}

def __init__(self, *, virtual_network_subnet_id: str=None, **kwargs) -> None:
super(VirtualNetworkRule, self).__init__(**kwargs)
self.virtual_network_subnet_id = virtual_network_subnet_id
Loading