-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* EventHub - cli extension * fixed lint errors * Review Comments * fixed lint errors and test recordings * exception handler * Review Comments * lint fixes * Review Comments for Adding Help sub groups and exception fix * added help for geodr authorule and keys * corrected access rights help text
- Loading branch information
1 parent
de8d267
commit e8200a5
Showing
51 changed files
with
7,927 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,5 @@ | |
/src/image-copy/ @tamirkamara | ||
|
||
/src/servicebus/ @v-ajnava | ||
|
||
/src/eventhubs/ @v-ajnava |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
|
||
# pylint: disable=unused-import | ||
# pylint: disable=line-too-long | ||
|
||
from ._help import helps | ||
|
||
|
||
class EventhubCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
eventhub_custom = CliCommandType(operations_tmpl='azext_eventhub.custom#{}') | ||
super(EventhubCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=eventhub_custom, min_profile="2017-03-10-profile") | ||
|
||
def load_command_table(self, args): | ||
from azext_eventhub.commands import load_command_table | ||
load_command_table(self, args) | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_eventhub._params import load_arguments_namespace, load_arguments_eventhub, load_arguments_consumergroup, load_arguments_geodr | ||
load_arguments_namespace(self, command) | ||
load_arguments_eventhub(self, command) | ||
load_arguments_consumergroup(self, command) | ||
load_arguments_geodr(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = EventhubCommandsLoader |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def cf_eventhub(cli_ctx, **_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_eventhub.eventhub import EventHubManagementClient | ||
return get_mgmt_service_client(cli_ctx, EventHubManagementClient) | ||
|
||
|
||
def namespaces_mgmt_client_factory(cli_ctx, _): | ||
return cf_eventhub(cli_ctx).namespaces | ||
|
||
|
||
def event_hub_mgmt_client_factory(cli_ctx, _): | ||
return cf_eventhub(cli_ctx).event_hubs | ||
|
||
|
||
def consumer_groups_mgmt_client_factory(cli_ctx, _): | ||
return cf_eventhub(cli_ctx).consumer_groups | ||
|
||
|
||
def disaster_recovery_mgmt_client_factory(cli_ctx, _): | ||
return cf_eventhub(cli_ctx).disaster_recovery_configs |
Oops, something went wrong.