-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ServiceBus CLI Extension * updated Codeowners * changed sb to servicebus * fixed lint error * updated help * Review comments resolved * Review comments resolved * fixed the lint error * lint error of trailing whitespace fixed * test fixture * resolved help review comments * Review comments for help and params * Added Matadat file
- Loading branch information
1 parent
55f351c
commit 5e43e0e
Showing
76 changed files
with
11,898 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
/src/index.json @derekbekoe | ||
|
||
/src/image-copy/ @tamirkamara | ||
|
||
/src/servicebus/ @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,36 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
# pylint: disable=unused-import | ||
|
||
from azure.cli.core import AzCommandsLoader | ||
from ._help import helps | ||
|
||
|
||
class ServicebusCommandsLoader(AzCommandsLoader): | ||
|
||
def __init__(self, cli_ctx=None): | ||
from azure.cli.core.commands import CliCommandType | ||
servicebus_custom = CliCommandType(operations_tmpl='azext_servicebus.custom#{}') | ||
super(ServicebusCommandsLoader, self).__init__(cli_ctx=cli_ctx, custom_command_type=servicebus_custom, | ||
min_profile="2017-03-10-profile") | ||
|
||
def load_command_table(self, args): | ||
from azext_servicebus.commands import load_command_table | ||
load_command_table(self, args) | ||
return self.command_table | ||
|
||
def load_arguments(self, command): | ||
from azext_servicebus._params import load_arguments_namespace, load_arguments_queue, load_arguments_topic,\ | ||
load_arguments_subscription, load_arguments_rule, load_arguments_geodr | ||
load_arguments_namespace(self, command) | ||
load_arguments_queue(self, command) | ||
load_arguments_topic(self, command) | ||
load_arguments_subscription(self, command) | ||
load_arguments_rule(self, command) | ||
load_arguments_geodr(self, command) | ||
|
||
|
||
COMMAND_LOADER_CLS = ServicebusCommandsLoader |
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,50 @@ | ||
# -------------------------------------------------------------------------------------------- | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. See License.txt in the project root for license information. | ||
# -------------------------------------------------------------------------------------------- | ||
|
||
|
||
def cf_servicebus(cli_ctx, **_): | ||
from azure.cli.core.commands.client_factory import get_mgmt_service_client | ||
from azext_servicebus.servicebus import ServiceBusManagementClient | ||
return get_mgmt_service_client(cli_ctx, ServiceBusManagementClient) | ||
|
||
|
||
def namespaces_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).namespaces | ||
|
||
|
||
def queues_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).queues | ||
|
||
|
||
def topics_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).topics | ||
|
||
|
||
def subscriptions_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).subscriptions | ||
|
||
|
||
def rules_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).rules | ||
|
||
|
||
def regions_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).regions | ||
|
||
|
||
def premium_messaging_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).premium_messaging | ||
|
||
|
||
def event_subscriptions_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).event_subscriptions | ||
|
||
|
||
def event_hubs_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).event_hubs | ||
|
||
|
||
def disaster_recovery_mgmt_client_factory(cli_ctx, _): | ||
return cf_servicebus(cli_ctx).disaster_recovery_configs |
Oops, something went wrong.