Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d98cffb
Eventhub-namespace,Eventhub AuthRule
schaudhari6254888 Jan 13, 2023
b2c0988
CI's Fixes
schaudhari6254888 Jan 14, 2023
e5240cb
More CI fixes
schaudhari6254888 Jan 14, 2023
1dc8c55
Merge branch 'dev' of https://github.com/schaudhari6254888/azure-cli …
schaudhari6254888 Feb 6, 2023
96aabad
Updates
schaudhari6254888 Feb 7, 2023
3c98b4b
CI's fixes
schaudhari6254888 Feb 8, 2023
6d75593
CI fixes
schaudhari6254888 Feb 8, 2023
abe2a55
ci agaaaaaaaaaaaaaaaaaaaaaain
schaudhari6254888 Feb 8, 2023
37fb0a5
CI's fixes again
schaudhari6254888 Feb 9, 2023
02aa53c
CI's fixessssssssssssssssssssss
schaudhari6254888 Feb 15, 2023
2c7657b
Updated latest
schaudhari6254888 Mar 30, 2023
af7c9cf
updates
schaudhari6254888 Mar 30, 2023
36a904a
updates
schaudhari6254888 Mar 30, 2023
bb5d41c
updates
schaudhari6254888 Apr 4, 2023
4ac3e2a
Merge branch 'dev' into Auth_Eventhub
schaudhari6254888 Apr 4, 2023
58ae0e2
Conflict resolved
schaudhari6254888 Apr 4, 2023
321ea93
Merge branch 'Auth_Eventhub' of https://github.com/schaudhari6254888/…
schaudhari6254888 Apr 4, 2023
14db74e
Hybrid profile test_iot_command.py succeeded
schaudhari6254888 Apr 5, 2023
fc50aec
Recording added
schaudhari6254888 Apr 5, 2023
9a7e1a4
CI's fixes again
schaudhari6254888 Apr 5, 2023
1cce941
Conflict resolved
schaudhari6254888 Apr 7, 2023
071f197
UPdates
schaudhari6254888 Apr 7, 2023
ca2d597
UPdates
schaudhari6254888 Apr 7, 2023
af1fa9d
UPdates
schaudhari6254888 Apr 7, 2023
452c548
Updates
schaudhari6254888 Apr 9, 2023
fb1ddd6
updatess removed --yes confirmation
schaudhari6254888 Apr 12, 2023
49ac367
updatess
schaudhari6254888 Apr 12, 2023
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
52 changes: 2 additions & 50 deletions src/azure-cli/azure/cli/command_modules/eventhubs/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,12 @@ def load_arguments_eh(self, _):
from azure.cli.core.commands.validators import get_default_location_from_resource_group
from azure.cli.command_modules.eventhubs._completers import get_consumergroup_command_completion_list, \
get_eventhubs_command_completion_list
from azure.cli.command_modules.eventhubs._validator import validate_storageaccount, validate_partner_namespace, validate_rights
from azure.cli.command_modules.eventhubs._validator import validate_storageaccount, validate_partner_namespace
from knack.arguments import CLIArgumentType
from azure.cli.core.profiles import ResourceType
(KeyType, AccessRights, SkuName, TlsVersion) = self.get_models('KeyType', 'AccessRights', 'SkuName', 'TlsVersion', resource_type=ResourceType.MGMT_EVENTHUB)
(SkuName, TlsVersion) = self.get_models('SkuName', 'TlsVersion', resource_type=ResourceType.MGMT_EVENTHUB)
from azure.cli.command_modules.eventhubs.action import AlertAddEncryption, ConstructPolicy

rights_arg_type = CLIArgumentType(options_list=['--rights'], nargs='+', arg_type=get_enum_type(AccessRights), validator=validate_rights, help='Space-separated list of Authorization rule rights')
key_arg_type = CLIArgumentType(options_list=['--key'], arg_type=get_enum_type(KeyType), help='specifies Primary or Secondary key needs to be reset')
keyvalue_arg_type = CLIArgumentType(options_list=['--key-value'], help='Optional, if the key value provided, is set for KeyType or autogenerated Key value set for keyType.')
event_hub_name_arg_type = CLIArgumentType(options_list=['--eventhub-name'], help='Name of EventHub')
namespace_name_arg_type = CLIArgumentType(options_list=['--namespace-name'], help='Name of Namespace', id_part='name')

Expand Down Expand Up @@ -79,29 +76,6 @@ def load_arguments_eh(self, _):
c.argument('tags', arg_type=tags_type)
c.argument('capacity', type=int, help='Capacity for Sku, allowed value : 1')

# region Namespace Authorizationrule
with self.argument_context('eventhubs namespace authorization-rule list') as c:
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')

with self.argument_context('eventhubs namespace authorization-rule keys list') as c:
c.argument('authorization_rule_name', arg_type=name_type, id_part=None, help='Name of Namespace AuthorizationRule')
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')

for scope in ['eventhubs namespace authorization-rule', 'eventhubs namespace authorization-rule keys renew']:
with self.argument_context(scope) as c:
c.argument('authorization_rule_name', arg_type=name_type, id_part='child_name_1', help='Name of Namespace AuthorizationRule')
c.argument('namespace_name', arg_type=namespace_name_arg_type, help='Name of Namespace')

for scope in ['eventhubs namespace authorization-rule create', 'eventhubs namespace authorization-rule update', 'eventhubs eventhub authorization-rule create', 'eventhubs eventhub authorization-rule update']:
with self.argument_context(scope) as c:
c.argument('name', arg_type=name_type, help='Name of Authorization Rule')
c.argument('rights', arg_type=rights_arg_type)

with self.argument_context('eventhubs namespace authorization-rule keys renew') as c:
c.argument('name', arg_type=name_type, help='Name of Authorization Rule')
c.argument('key_type', arg_type=key_arg_type)
c.argument('key', arg_type=keyvalue_arg_type)

# region - Eventhub Create
with self.argument_context('eventhubs eventhub') as c:
c.argument('event_hub_name', arg_type=name_type, id_part='child_name_1', completer=get_eventhubs_command_completion_list, help='Name of Eventhub')
Expand All @@ -122,28 +96,6 @@ def load_arguments_eh(self, _):

with self.argument_context('eventhubs eventhub list') as c:
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')

# region EventHub Authorizationrule
for scope in ['eventhubs eventhub authorization-rule']:
with self.argument_context(scope) as c:
c.argument('authorization_rule_name', arg_type=name_type, id_part='child_name_2', help='Name of EventHub AuthorizationRule')
c.argument('event_hub_name', id_part='child_name_1', arg_type=event_hub_name_arg_type, help='Name of EventHub')

with self.argument_context('eventhubs eventhub authorization-rule keys renew') as c:
c.argument('name', arg_type=name_type, help='Name of Authorization Rule')
c.argument('key_type', arg_type=key_arg_type)
c.argument('key', arg_type=keyvalue_arg_type)

with self.argument_context('eventhubs eventhub authorization-rule list') as c:
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')
c.argument('event_hub_name', id_part=None, arg_type=event_hub_name_arg_type)

with self.argument_context('eventhubs eventhub authorization-rule keys list') as c:
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')
c.argument('event_hub_name', id_part=None, arg_type=event_hub_name_arg_type)
c.argument('authorization_rule_name', arg_type=name_type, id_part=None, help='Name of EventHub AuthorizationRule')


# - ConsumerGroup Region
with self.argument_context('eventhubs eventhub consumer-group') as c:
c.argument('event_hub_name', arg_type=event_hub_name_arg_type, help='Name of EventHub')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"eventhubs",
)
class __CMDGroup(AAZCommandGroup):
"""eventhubs
"""eventhub
"""
pass

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"eventhubs eventhub",
)
class __CMDGroup(AAZCommandGroup):
"""eventhub
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from azure.cli.core.aaz import *


@register_command_group(
"eventhubs eventhub authorization-rule",
)
class __CMDGroup(AAZCommandGroup):
"""eventhub authorization rule
"""
pass


__all__ = ["__CMDGroup"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#
# Code generated by aaz-dev-tools
# --------------------------------------------------------------------------------------------

# pylint: skip-file
# flake8: noqa

from .__cmd_group import *
from ._create import *
from ._delete import *
from ._list import *
from ._show import *
from ._update import *
Loading