Skip to content
Closed
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
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,5 @@ class DayOfWeek(Enum):
friday = "Friday"
saturday = "Saturday"
sunday = "Sunday"
everyday = "Everyday"
weekend = "Weekend"
2 changes: 1 addition & 1 deletion azure-mgmt-redis/azure/mgmt/redis/models/schedule_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class ScheduleEntry(Model):

:param day_of_week: Day of week when cache can be patched. Possible
values include: 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday',
'Saturday', 'Sunday'
'Saturday', 'Sunday', 'Everyday', 'Weekend'
:type day_of_week: str or :class:`DayOfWeek
<azure.mgmt.redis.models.DayOfWeek>`
:param start_hour_utc: Start hour after which cache patching can start.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ def __init__(self, client, config, serializer, deserializer):
self.config = config

def create_or_update(
self, resource_group_name, name, parameters, custom_headers=None, raw=False, **operation_config):
self, resource_group_name, name, schedule_entries, custom_headers=None, raw=False, **operation_config):
"""Create or replace the patching schedule for redis cache.

:param resource_group_name: The name of the resource group.
:type resource_group_name: str
:param name: The name of the redis cache.
:type name: str
:param parameters: Parameters to set patch schedules for redis cache.
:type parameters: :class:`RedisPatchSchedule
<azure.mgmt.redis.models.RedisPatchSchedule>`
:param schedule_entries: List of patch schedules for redis cache.
:type schedule_entries: list of :class:`ScheduleEntry
<azure.mgmt.redis.models.ScheduleEntry>`
:param dict custom_headers: headers that will be added to the request
:param bool raw: returns the direct response alongside the
deserialized response
Expand All @@ -53,7 +53,10 @@ def create_or_update(
<azure.mgmt.redis.models.RedisPatchSchedule>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.RedisPatchSchedule(schedule_entries=schedule_entries)

# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default'
path_format_arguments = {
Expand Down Expand Up @@ -117,6 +120,7 @@ def delete(
:rtype: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default'
Expand Down Expand Up @@ -171,6 +175,7 @@ def get(
<azure.mgmt.redis.models.RedisPatchSchedule>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/patchSchedules/default'
Expand Down
11 changes: 11 additions & 0 deletions azure-mgmt-redis/azure/mgmt/redis/operations/redis_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def create(
<azure.mgmt.redis.models.RedisResource>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}'
Expand Down Expand Up @@ -146,6 +147,7 @@ def update(
<azure.mgmt.redis.models.RedisResource>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}'
Expand Down Expand Up @@ -233,6 +235,7 @@ def delete(
instance that returns None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}'
Expand Down Expand Up @@ -309,6 +312,7 @@ def get(
:rtype: :class:`RedisResource <azure.mgmt.redis.models.RedisResource>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}'
Expand Down Expand Up @@ -366,6 +370,7 @@ def list_by_resource_group(
overrides<msrest:optionsforoperations>`.
:rtype: :class:`RedisResourcePaged
<azure.mgmt.redis.models.RedisResourcePaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def internal_paging(next_link=None, raw=False):

Expand Down Expand Up @@ -429,6 +434,7 @@ def list(
overrides<msrest:optionsforoperations>`.
:rtype: :class:`RedisResourcePaged
<azure.mgmt.redis.models.RedisResourcePaged>`
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
def internal_paging(next_link=None, raw=False):

Expand Down Expand Up @@ -498,6 +504,7 @@ def list_keys(
<azure.mgmt.redis.models.RedisAccessKeys>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/listKeys'
Expand Down Expand Up @@ -564,6 +571,7 @@ def regenerate_key(
<azure.mgmt.redis.models.RedisAccessKeys>`
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.RedisRegenerateKeyParameters(key_type=key_type)

Expand Down Expand Up @@ -639,6 +647,7 @@ def force_reboot(
:rtype: None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.RedisRebootParameters(reboot_type=reboot_type, shard_id=shard_id)

Expand Down Expand Up @@ -702,6 +711,7 @@ def import_data(
instance that returns None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
parameters = models.ImportRDBParameters(format=format, files=files)

Expand Down Expand Up @@ -787,6 +797,7 @@ def export_data(
instance that returns None
:rtype: :class:`ClientRawResponse<msrest.pipeline.ClientRawResponse>`
if raw=true
:raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`
"""
# Construct URL
url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cache/Redis/{name}/export'
Expand Down