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
@@ -1,4 +1,3 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.15.0"
}
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
2 changes: 0 additions & 2 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
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 @@ -209,3 +208,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 @@ -50,7 +49,7 @@ def __init__(
self.subscription_id = subscription_id
self.api_version = "2021-03-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 @@ -47,7 +46,7 @@ def __init__(
self.subscription_id = subscription_id
self.api_version = "2021-03-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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class DatabasesOperations:
instantiates it for you and attaches it as an attribute.

:ivar models: Alias to model classes used in this operation group.
:type models: ~azure.mgmt.redisenterprise.models
:type models: ~redis_enterprise_management_client.models
:param client: Client for service requests.
:param config: Configuration of service client.
:param serializer: An object model serializer.
Expand Down Expand Up @@ -57,7 +57,7 @@ def list_by_cluster(
:type cluster_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: An iterator like instance of either DatabaseList or the result of cls(response)
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.redisenterprise.models.DatabaseList]
:rtype: ~azure.core.async_paging.AsyncItemPaged[~redis_enterprise_management_client.models.DatabaseList]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DatabaseList"]
Expand Down Expand Up @@ -195,15 +195,15 @@ async def begin_create(
:param database_name: The name of the database.
:type database_name: str
:param parameters: Parameters supplied to the create or update database operation.
:type parameters: ~azure.mgmt.redisenterprise.models.Database
:type parameters: ~redis_enterprise_management_client.models.Database
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Database or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.redisenterprise.models.Database]
:rtype: ~azure.core.polling.AsyncLROPoller[~redis_enterprise_management_client.models.Database]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -329,15 +329,15 @@ async def begin_update(
:param database_name: The name of the database.
:type database_name: str
:param parameters: Parameters supplied to the create or update database operation.
:type parameters: ~azure.mgmt.redisenterprise.models.DatabaseUpdate
:type parameters: ~redis_enterprise_management_client.models.DatabaseUpdate
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Database or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.redisenterprise.models.Database]
:rtype: ~azure.core.polling.AsyncLROPoller[~redis_enterprise_management_client.models.Database]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -405,7 +405,7 @@ async def get(
:type database_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: Database, or the result of cls(response)
:rtype: ~azure.mgmt.redisenterprise.models.Database
:rtype: ~redis_enterprise_management_client.models.Database
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Database"]
Expand Down Expand Up @@ -584,7 +584,7 @@ async def list_keys(
:type database_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:return: AccessKeys, or the result of cls(response)
:rtype: ~azure.mgmt.redisenterprise.models.AccessKeys
:rtype: ~redis_enterprise_management_client.models.AccessKeys
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.AccessKeys"]
Expand Down Expand Up @@ -705,15 +705,15 @@ async def begin_regenerate_key(
:param database_name: The name of the database.
:type database_name: str
:param parameters: Specifies which key to regenerate.
:type parameters: ~azure.mgmt.redisenterprise.models.RegenerateKeyParameters
:type parameters: ~redis_enterprise_management_client.models.RegenerateKeyParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either AccessKeys or the result of cls(response)
:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.redisenterprise.models.AccessKeys]
:rtype: ~azure.core.polling.AsyncLROPoller[~redis_enterprise_management_client.models.AccessKeys]
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
Expand Down Expand Up @@ -834,7 +834,7 @@ async def begin_import_method(
:param database_name: The name of the database.
:type database_name: str
:param parameters: Storage information for importing into the cluster.
:type parameters: ~azure.mgmt.redisenterprise.models.ImportClusterParameters
:type parameters: ~redis_enterprise_management_client.models.ImportClusterParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
Expand Down Expand Up @@ -960,7 +960,7 @@ async def begin_export(
:param database_name: The name of the database.
:type database_name: str
:param parameters: Storage information for exporting into the cluster.
:type parameters: ~azure.mgmt.redisenterprise.models.ExportClusterParameters
:type parameters: ~redis_enterprise_management_client.models.ExportClusterParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
Expand Down
Loading