Skip to content
Draft
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
10 changes: 0 additions & 10 deletions src/azure-cli/azure/cli/command_modules/cosmosdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------

from knack.events import EVENT_INVOKER_PRE_PARSE_ARGS

from azure.cli.core import AzCommandsLoader

from azure.cli.command_modules.cosmosdb._help import helps # pylint: disable=unused-import


def _documentdb_deprecate(_, args):
if args[0] == 'documentdb':
from azure.cli.core.util import CLIError
raise CLIError('All documentdb commands have been renamed to cosmosdb')


class CosmosDbCommandsLoader(AzCommandsLoader):

def __init__(self, cli_ctx=None):
Expand All @@ -27,8 +19,6 @@ def __init__(self, cli_ctx=None):
operations_tmpl='azure.cli.command_modules.cosmosdb.custom#{}',
client_factory=cf_cosmosdb_document)

cli_ctx.register_event(EVENT_INVOKER_PRE_PARSE_ARGS, _documentdb_deprecate)

super().__init__(cli_ctx=cli_ctx,
resource_type=ResourceType.MGMT_COSMOSDB,
custom_command_type=cosmosdb_custom,
Expand Down
Loading