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] redis/resource-manager #2091

Merged
merged 8 commits into from
Jan 15, 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
44 changes: 43 additions & 1 deletion azure-mgmt-redis/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,55 @@
Release History
===============

6.0.0 (2019-01-15)
++++++++++++++++++

**Note**

- azure-mgmt-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)

**Features**

- Client class can be used as a context manager to keep the underlying HTTP session open for performance
- Model RedisCreateParameters has a new parameter minimum_tls_version
- Model RedisResource has a new parameter minimum_tls_version
- Model RedisUpdateParameters has a new parameter minimum_tls_version
- Added operation PatchSchedulesOperations.list_by_redis_resource
- Added operation RedisOperations.list_upgrade_notifications
- Added operation RedisOperations.check_name_availability

**General Breaking changes**

This version uses a next-generation code generator that *might* introduce breaking changes.

- Model signatures now use only keyword-argument syntax. All positional arguments must be re-written as keyword-arguments.
To keep auto-completion in most cases, models are now generated for Python 2 and Python 3. Python 3 uses the "*" syntax for keyword-only arguments.
- Enum types now use the "str" mixin (class AzureEnum(str, Enum)) to improve the behavior when unrecognized enum values are encountered.
While this is not a breaking change, the distinctions are important, and are documented here:
https://docs.python.org/3/library/enum.html#others
At a glance:

- "is" should not be used at all.
- "format" will return the string value, where "%s" string formatting will return `NameOfEnum.stringvalue`. Format syntax should be prefered.

- New Long Running Operation:

- Return type changes from `msrestazure.azure_operation.AzureOperationPoller` to `msrest.polling.LROPoller`. External API is the same.
- Return type is now **always** a `msrest.polling.LROPoller`, regardless of the optional parameters used.
- The behavior has changed when using `raw=True`. Instead of returning the initial call result as `ClientRawResponse`,
without polling, now this returns an LROPoller. After polling, the final resource will be returned as a `ClientRawResponse`.
- New `polling` parameter. The default behavior is `Polling=True` which will poll using ARM algorithm. When `Polling=False`,
the response of the initial call will be returned without polling.
- `polling` parameter accepts instances of subclasses of `msrest.polling.PollingMethod`.
- `add_done_callback` will no longer raise if called after polling is finished, but will instead execute the callback right away.

5.0.0 (2018-02-08)
++++++++++++++++++

**Disclaimer**

Several model (like RedisCreateParameters) have positional arguments shuffled, due to constraints
in our code generator. This is not breaking if you use keyword arguments. If you are using
in our code generator. This is not breaking if you use keyword arguments. If you are using
positional arguments, we strongly suggest to use keyword only arguments for Model creation, since
next version 6.0.0 will use keyword only arguments for models.

Expand Down
3 changes: 3 additions & 0 deletions azure-mgmt-redis/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

83 changes: 61 additions & 22 deletions azure-mgmt-redis/azure/mgmt/redis/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,68 @@
# regenerated.
# --------------------------------------------------------------------------

from .sku import Sku
from .redis_access_keys import RedisAccessKeys
from .redis_linked_server import RedisLinkedServer
from .resource import Resource
from .proxy_resource import ProxyResource
from .tracked_resource import TrackedResource
from .redis_create_parameters import RedisCreateParameters
from .redis_update_parameters import RedisUpdateParameters
from .redis_firewall_rule import RedisFirewallRule
from .redis_firewall_rule_create_parameters import RedisFirewallRuleCreateParameters
from .redis_resource import RedisResource
from .redis_regenerate_key_parameters import RedisRegenerateKeyParameters
from .redis_reboot_parameters import RedisRebootParameters
from .export_rdb_parameters import ExportRDBParameters
from .import_rdb_parameters import ImportRDBParameters
from .schedule_entry import ScheduleEntry
from .redis_patch_schedule import RedisPatchSchedule
from .redis_force_reboot_response import RedisForceRebootResponse
from .redis_linked_server_with_properties import RedisLinkedServerWithProperties
from .redis_linked_server_create_parameters import RedisLinkedServerCreateParameters
from .operation_display import OperationDisplay
from .operation import Operation
try:
from .sku_py3 import Sku
from .redis_access_keys_py3 import RedisAccessKeys
from .redis_linked_server_py3 import RedisLinkedServer
from .resource_py3 import Resource
from .proxy_resource_py3 import ProxyResource
from .tracked_resource_py3 import TrackedResource
from .redis_create_parameters_py3 import RedisCreateParameters
from .redis_update_parameters_py3 import RedisUpdateParameters
from .redis_firewall_rule_py3 import RedisFirewallRule
from .redis_firewall_rule_create_parameters_py3 import RedisFirewallRuleCreateParameters
from .redis_resource_py3 import RedisResource
from .redis_regenerate_key_parameters_py3 import RedisRegenerateKeyParameters
from .redis_reboot_parameters_py3 import RedisRebootParameters
from .export_rdb_parameters_py3 import ExportRDBParameters
from .import_rdb_parameters_py3 import ImportRDBParameters
from .schedule_entry_py3 import ScheduleEntry
from .redis_patch_schedule_py3 import RedisPatchSchedule
from .redis_force_reboot_response_py3 import RedisForceRebootResponse
from .redis_linked_server_with_properties_py3 import RedisLinkedServerWithProperties
from .redis_linked_server_create_parameters_py3 import RedisLinkedServerCreateParameters
from .operation_display_py3 import OperationDisplay
from .operation_py3 import Operation
from .check_name_availability_parameters_py3 import CheckNameAvailabilityParameters
from .upgrade_notification_py3 import UpgradeNotification
from .notification_list_response_py3 import NotificationListResponse
except (SyntaxError, ImportError):
from .sku import Sku
from .redis_access_keys import RedisAccessKeys
from .redis_linked_server import RedisLinkedServer
from .resource import Resource
from .proxy_resource import ProxyResource
from .tracked_resource import TrackedResource
from .redis_create_parameters import RedisCreateParameters
from .redis_update_parameters import RedisUpdateParameters
from .redis_firewall_rule import RedisFirewallRule
from .redis_firewall_rule_create_parameters import RedisFirewallRuleCreateParameters
from .redis_resource import RedisResource
from .redis_regenerate_key_parameters import RedisRegenerateKeyParameters
from .redis_reboot_parameters import RedisRebootParameters
from .export_rdb_parameters import ExportRDBParameters
from .import_rdb_parameters import ImportRDBParameters
from .schedule_entry import ScheduleEntry
from .redis_patch_schedule import RedisPatchSchedule
from .redis_force_reboot_response import RedisForceRebootResponse
from .redis_linked_server_with_properties import RedisLinkedServerWithProperties
from .redis_linked_server_create_parameters import RedisLinkedServerCreateParameters
from .operation_display import OperationDisplay
from .operation import Operation
from .check_name_availability_parameters import CheckNameAvailabilityParameters
from .upgrade_notification import UpgradeNotification
from .notification_list_response import NotificationListResponse
from .operation_paged import OperationPaged
from .redis_resource_paged import RedisResourcePaged
from .redis_firewall_rule_paged import RedisFirewallRulePaged
from .redis_patch_schedule_paged import RedisPatchSchedulePaged
from .redis_linked_server_with_properties_paged import RedisLinkedServerWithPropertiesPaged
from .redis_management_client_enums import (
SkuName,
SkuFamily,
TlsVersion,
ProvisioningState,
RedisKeyType,
RebootType,
DayOfWeek,
Expand Down Expand Up @@ -67,12 +100,18 @@
'RedisLinkedServerCreateParameters',
'OperationDisplay',
'Operation',
'CheckNameAvailabilityParameters',
'UpgradeNotification',
'NotificationListResponse',
'OperationPaged',
'RedisResourcePaged',
'RedisFirewallRulePaged',
'RedisPatchSchedulePaged',
'RedisLinkedServerWithPropertiesPaged',
'SkuName',
'SkuFamily',
'TlsVersion',
'ProvisioningState',
'RedisKeyType',
'RebootType',
'DayOfWeek',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 CheckNameAvailabilityParameters(Model):
"""Parameters body to pass for resource name availability check.

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

:param name: Required. Resource name.
:type name: str
:param type: Required. Resource type. The only legal value of this
property for checking redis cache name availability is
'Microsoft.Cache/redis'.
:type type: str
"""

_validation = {
'name': {'required': True},
'type': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, **kwargs):
super(CheckNameAvailabilityParameters, self).__init__(**kwargs)
self.name = kwargs.get('name', None)
self.type = kwargs.get('type', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# 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 CheckNameAvailabilityParameters(Model):
"""Parameters body to pass for resource name availability check.

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

:param name: Required. Resource name.
:type name: str
:param type: Required. Resource type. The only legal value of this
property for checking redis cache name availability is
'Microsoft.Cache/redis'.
:type type: str
"""

_validation = {
'name': {'required': True},
'type': {'required': True},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'type': {'key': 'type', 'type': 'str'},
}

def __init__(self, *, name: str, type: str, **kwargs) -> None:
super(CheckNameAvailabilityParameters, self).__init__(**kwargs)
self.name = name
self.type = type
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
class ExportRDBParameters(Model):
"""Parameters for Redis export operation.

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

:param format: File format.
:type format: str
:param prefix: Prefix to use for exported files.
:param prefix: Required. Prefix to use for exported files.
:type prefix: str
:param container: Container name to export to.
:param container: Required. Container name to export to.
:type container: str
"""

Expand All @@ -34,8 +36,8 @@ class ExportRDBParameters(Model):
'container': {'key': 'container', 'type': 'str'},
}

def __init__(self, prefix, container, format=None):
super(ExportRDBParameters, self).__init__()
self.format = format
self.prefix = prefix
self.container = container
def __init__(self, **kwargs):
super(ExportRDBParameters, self).__init__(**kwargs)
self.format = kwargs.get('format', None)
self.prefix = kwargs.get('prefix', None)
self.container = kwargs.get('container', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# 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 ExportRDBParameters(Model):
"""Parameters for Redis export operation.

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

:param format: File format.
:type format: str
:param prefix: Required. Prefix to use for exported files.
:type prefix: str
:param container: Required. Container name to export to.
:type container: str
"""

_validation = {
'prefix': {'required': True},
'container': {'required': True},
}

_attribute_map = {
'format': {'key': 'format', 'type': 'str'},
'prefix': {'key': 'prefix', 'type': 'str'},
'container': {'key': 'container', 'type': 'str'},
}

def __init__(self, *, prefix: str, container: str, format: str=None, **kwargs) -> None:
super(ExportRDBParameters, self).__init__(**kwargs)
self.format = format
self.prefix = prefix
self.container = container
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
class ImportRDBParameters(Model):
"""Parameters for Redis import operation.

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

:param format: File format.
:type format: str
:param files: files to import.
:param files: Required. files to import.
:type files: list[str]
"""

Expand All @@ -30,7 +32,7 @@ class ImportRDBParameters(Model):
'files': {'key': 'files', 'type': '[str]'},
}

def __init__(self, files, format=None):
super(ImportRDBParameters, self).__init__()
self.format = format
self.files = files
def __init__(self, **kwargs):
super(ImportRDBParameters, self).__init__(**kwargs)
self.format = kwargs.get('format', None)
self.files = kwargs.get('files', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 ImportRDBParameters(Model):
"""Parameters for Redis import operation.

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

:param format: File format.
:type format: str
:param files: Required. files to import.
:type files: list[str]
"""

_validation = {
'files': {'required': True},
}

_attribute_map = {
'format': {'key': 'format', 'type': 'str'},
'files': {'key': 'files', 'type': '[str]'},
}

def __init__(self, *, files, format: str=None, **kwargs) -> None:
super(ImportRDBParameters, self).__init__(**kwargs)
self.format = format
self.files = files
Loading