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

[ReleasePR redisenterprise] [Hub Generated] Review request for Microsoft.Cache to add version stable/2021-08-01 #3730

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
5 changes: 0 additions & 5 deletions src/redisenterprise/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
Release History
===============

0.1.1
++++++
* Renamed remaining snake_case command output fields to camelCase to be consistent with the REST API.
* Listed the following cluster attribute as null in the command output when the cluster attribute is null: zones.

0.1.0
++++++
* Initial release.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.15.0"
}
7 changes: 4 additions & 3 deletions src/redisenterprise/azext_redisenterprise/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,13 @@

helps['redisenterprise database import'] = """
type: command
short-summary: "Imports a database file to target database."
short-summary: "Imports database files to target database."
examples:
- name: RedisEnterpriseDatabasesImport
text: |-
az redisenterprise database import --cluster-name "cache1" --sas-uri "https://contosostorage.blob.core.w\
indow.net/urltoBlobFile?sasKeyParameters" --resource-group "rg1"
az redisenterprise database import --cluster-name "cache1" --sas-uris "https://contosostorage.blob.core.\
window.net/urltoBlobFile1?sasKeyParameters" "https://contosostorage.blob.core.window.net/urltoBlobFile2?sasKeyParameter\
s" --resource-group "rg1"
"""

helps['redisenterprise database list-keys'] = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def load_arguments(self, _):
c.argument('resource_group_name', resource_group_name_type)
c.argument('cluster_name', options_list=['--cluster-name', '--name', '-n'], type=str, help='The name of the '
'RedisEnterprise cluster.', id_part='name')
c.argument('sas_uri', type=str, help='SAS URI for the target blob to import from')
c.argument('sas_uris', nargs='+', help='SAS URIs for the target blobs to import from')

with self.argument_context('redisenterprise database list-keys') as c:
c.argument('resource_group_name', resource_group_name_type)
Expand Down
32 changes: 13 additions & 19 deletions src/redisenterprise/azext_redisenterprise/generated/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,28 @@
# --------------------------------------------------------------------------
# pylint: disable=too-many-statements
# pylint: disable=too-many-locals
# pylint: disable=line-too-long

from azure.cli.core.commands import CliCommandType


def load_command_table(self, _):

from azext_redisenterprise.generated._client_factory import cf_operation_status

redisenterprise_operation_status = CliCommandType(
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._operations_status_operations#OperationsStatusOperations.{}',
client_factory=cf_operation_status,
)
with self.command_group(
'redisenterprise operation-status', redisenterprise_operation_status, client_factory=cf_operation_status
) as g:
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._operations_status_operations#O'
'perationsStatusOperations.{}',
client_factory=cf_operation_status)
with self.command_group('redisenterprise operation-status', redisenterprise_operation_status,
client_factory=cf_operation_status) as g:
g.custom_show_command('show', 'redisenterprise_operation_status_show')

from azext_redisenterprise.generated._client_factory import cf_redis_enterprise

redisenterprise_redis_enterprise = CliCommandType(
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._redis_enterprise_operations#RedisEnterpriseOperations.{}',
client_factory=cf_redis_enterprise,
)
with self.command_group(
'redisenterprise', redisenterprise_redis_enterprise, client_factory=cf_redis_enterprise
) as g:
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._redis_enterprise_operations#Re'
'disEnterpriseOperations.{}',
client_factory=cf_redis_enterprise)
with self.command_group('redisenterprise', redisenterprise_redis_enterprise,
client_factory=cf_redis_enterprise) as g:
g.custom_command('list', 'redisenterprise_list')
g.custom_show_command('show', 'redisenterprise_show')
g.custom_command('create', 'redisenterprise_create', supports_no_wait=True)
Expand All @@ -44,11 +39,10 @@ def load_command_table(self, _):
g.custom_wait_command('wait', 'redisenterprise_show')

from azext_redisenterprise.generated._client_factory import cf_database

redisenterprise_database = CliCommandType(
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._databases_operations#DatabasesOperations.{}',
client_factory=cf_database,
)
operations_tmpl='azext_redisenterprise.vendored_sdks.redisenterprise.operations._databases_operations#Databases'
'Operations.{}',
client_factory=cf_database)
with self.command_group('redisenterprise database', redisenterprise_database, client_factory=cf_database) as g:
g.custom_command('list', 'redisenterprise_database_list')
g.custom_show_command('show', 'redisenterprise_database_show')
Expand Down
6 changes: 2 additions & 4 deletions src/redisenterprise/azext_redisenterprise/generated/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def redisenterprise_create(client,
parameters['sku'] = {}
parameters['sku']['name'] = sku
parameters['sku']['capacity'] = capacity
parameters['zones'] = zones
parameters['minimum_tls_version'] = minimum_tls_version
return sdk_no_wait(no_wait,
client.begin_create,
Expand All @@ -70,7 +69,6 @@ def redisenterprise_update(client,
parameters['sku'] = {}
parameters['sku']['name'] = sku
parameters['sku']['capacity'] = capacity
parameters['tags'] = tags
parameters['minimum_tls_version'] = minimum_tls_version
return sdk_no_wait(no_wait,
client.begin_update,
Expand Down Expand Up @@ -177,10 +175,10 @@ def redisenterprise_database_export(client,
def redisenterprise_database_import(client,
resource_group_name,
cluster_name,
sas_uri,
sas_uris,
no_wait=False):
parameters = {}
parameters['sas_uri'] = sas_uri
parameters['sas_uris'] = sas_uris
return sdk_no_wait(no_wait,
client.begin_import_method,
resource_group_name=resource_group_name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
# pylint: disable=unused-argument


from .. import try_manual
Expand Down Expand Up @@ -87,7 +86,8 @@ def step_database_import(test, rg, checks=None):
checks = []
test.cmd('az redisenterprise database import '
'--cluster-name "cache1" '
'--sas-uri "https://contosostorage.blob.core.window.net/urltoBlobFile?sasKeyParameters" '
'--sas-uris "https://contosostorage.blob.core.window.net/urltoBlobFile1?sasKeyParameters" '
'"https://contosostorage.blob.core.window.net/urltoBlobFile2?sasKeyParameters" '
'--resource-group "{rg}"',
checks=checks)

Expand Down Expand Up @@ -209,3 +209,4 @@ def step_delete(test, rg, checks=None):
'--cluster-name "cache1" '
'--resource-group "{rg}"',
checks=checks)

Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class Redisenterprisescenario1Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario1Test, self).__init__(*args, **kwargs)


@ResourceGroupPreparer(name_prefix='clitestredisenterprise_rg1'[:7], key='rg', parameter_name='rg')
def test_redisenterprise_scenario1(self, rg):
call_scenario1(self, rg)
Expand Down Expand Up @@ -111,8 +112,10 @@ class Redisenterprisescenario2Test(ScenarioTest):
def __init__(self, *args, **kwargs):
super(Redisenterprisescenario2Test, self).__init__(*args, **kwargs)


@ResourceGroupPreparer(name_prefix='clitestredisenterprise_rg1'[:7], key='rg', parameter_name='rg')
def test_redisenterprise_scenario2(self, rg):
call_scenario2(self, rg)
calc_coverage(__file__)
raise_if()

Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
# --------------------------------------------------------------------------

from ._redis_enterprise_management_client import RedisEnterpriseManagementClient
from ._version import VERSION

__version__ = VERSION
__all__ = ['RedisEnterpriseManagementClient']

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from ._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from typing import Any

from azure.core.credentials import TokenCredential

VERSION = "unknown"

class RedisEnterpriseManagementClientConfiguration(Configuration):
"""Configuration for RedisEnterpriseManagementClient.
Expand Down Expand Up @@ -48,9 +47,9 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-08-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-redisenterprise/{}'.format(VERSION))
kwargs.setdefault('sdk_moniker', 'redisenterprisemanagementclient/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ class RedisEnterpriseManagementClient(object):
"""REST API for managing Redis Enterprise resources in Azure.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.redisenterprise.operations.Operations
:vartype operations: redis_enterprise_management_client.operations.Operations
:ivar operations_status: OperationsStatusOperations operations
:vartype operations_status: azure.mgmt.redisenterprise.operations.OperationsStatusOperations
:vartype operations_status: redis_enterprise_management_client.operations.OperationsStatusOperations
:ivar redis_enterprise: RedisEnterpriseOperations operations
:vartype redis_enterprise: azure.mgmt.redisenterprise.operations.RedisEnterpriseOperations
:vartype redis_enterprise: redis_enterprise_management_client.operations.RedisEnterpriseOperations
:ivar databases: DatabasesOperations operations
:vartype databases: azure.mgmt.redisenterprise.operations.DatabasesOperations
:vartype databases: redis_enterprise_management_client.operations.DatabasesOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
:vartype private_endpoint_connections: azure.mgmt.redisenterprise.operations.PrivateEndpointConnectionsOperations
:vartype private_endpoint_connections: redis_enterprise_management_client.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.redisenterprise.operations.PrivateLinkResourcesOperations
:vartype private_link_resources: redis_enterprise_management_client.operations.PrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials.TokenCredential
:param subscription_id: The ID of the target subscription.
Expand All @@ -65,7 +65,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.operations = Operations(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMHttpLoggingPolicy

from .._version import VERSION

if TYPE_CHECKING:
# pylint: disable=unused-import,ungrouped-imports
from azure.core.credentials_async import AsyncTokenCredential

VERSION = "unknown"

class RedisEnterpriseManagementClientConfiguration(Configuration):
"""Configuration for RedisEnterpriseManagementClient.
Expand Down Expand Up @@ -45,9 +44,9 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2021-03-01"
self.api_version = "2021-08-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-redisenterprise/{}'.format(VERSION))
kwargs.setdefault('sdk_moniker', 'redisenterprisemanagementclient/{}'.format(VERSION))
self._configure(**kwargs)

def _configure(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ class RedisEnterpriseManagementClient(object):
"""REST API for managing Redis Enterprise resources in Azure.

:ivar operations: Operations operations
:vartype operations: azure.mgmt.redisenterprise.aio.operations.Operations
:vartype operations: redis_enterprise_management_client.aio.operations.Operations
:ivar operations_status: OperationsStatusOperations operations
:vartype operations_status: azure.mgmt.redisenterprise.aio.operations.OperationsStatusOperations
:vartype operations_status: redis_enterprise_management_client.aio.operations.OperationsStatusOperations
:ivar redis_enterprise: RedisEnterpriseOperations operations
:vartype redis_enterprise: azure.mgmt.redisenterprise.aio.operations.RedisEnterpriseOperations
:vartype redis_enterprise: redis_enterprise_management_client.aio.operations.RedisEnterpriseOperations
:ivar databases: DatabasesOperations operations
:vartype databases: azure.mgmt.redisenterprise.aio.operations.DatabasesOperations
:vartype databases: redis_enterprise_management_client.aio.operations.DatabasesOperations
:ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations
:vartype private_endpoint_connections: azure.mgmt.redisenterprise.aio.operations.PrivateEndpointConnectionsOperations
:vartype private_endpoint_connections: redis_enterprise_management_client.aio.operations.PrivateEndpointConnectionsOperations
:ivar private_link_resources: PrivateLinkResourcesOperations operations
:vartype private_link_resources: azure.mgmt.redisenterprise.aio.operations.PrivateLinkResourcesOperations
:vartype private_link_resources: redis_enterprise_management_client.aio.operations.PrivateLinkResourcesOperations
:param credential: Credential needed for the client to connect to Azure.
:type credential: ~azure.core.credentials_async.AsyncTokenCredential
:param subscription_id: The ID of the target subscription.
Expand All @@ -62,7 +62,6 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.operations = Operations(
Expand Down
Loading