Skip to content

Commit 12e11b4

Browse files
schaudhari6254888Your Name
andauthored
[Eventhub] az eventhubs namespace: Add nsp-configuration show and nsp-configuration list (#31846)
Co-authored-by: Your Name <you@example.com>
1 parent cf56fe1 commit 12e11b4

File tree

8 files changed

+792
-10
lines changed

8 files changed

+792
-10
lines changed

src/azure-cli/azure/cli/command_modules/eventhubs/_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def load_arguments_eh(self, _):
6565
with self.argument_context('eventhubs eventhub') as c:
6666
c.argument('event_hub_name', arg_type=name_type, id_part='child_name_1', completer=get_eventhubs_command_completion_list, help='Name of Eventhub')
6767

68-
for scope in ['eventhubs eventhub create']:
68+
for scope in ['eventhubs eventhub create', 'eventhubs eventhub update']:
6969
with self.argument_context(scope) as c:
7070
c.argument('partition_count', type=int, help='Number of partitions created for the Event Hub. By default, allowed values are 2-32. Lower value of 1 is supported with Kafka enabled namespaces. In presence of a custom quota, the upper limit will match the upper limit of the quota.')
7171
c.argument('status', arg_type=get_enum_type(['Active', 'Disabled', 'SendDisabled']), help='Status of Eventhub')
@@ -86,6 +86,7 @@ def load_arguments_eh(self, _):
8686
c.argument('user_metadata', help="Gets and Sets Metadata of User.")
8787
c.argument('timestamp_type', arg_type=get_enum_type(['Create', 'LogAppend']), help='Denotes the type of timestamp the message will hold.')
8888
c.argument('min_compaction_lag_in_mins', type=int, arg_group='Retention-Description', options_list=['--min-lag', '--min-compaction-lag-in-mins'], help="The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.")
89+
c.argument('encoding', arg_group='Capture', options_list=['encoding'], help='Enumerates the possible values for the encoding format of capture description. Note: \'AvroDeflate\' will be deprecated in New API Version')
8990
with self.argument_context('eventhubs eventhub list') as c:
9091
c.argument('namespace_name', options_list=['--namespace-name'], id_part=None, help='Name of Namespace')
9192

src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_create.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
184184
help="Enumerates the possible values for cleanup policy",
185185
enum={"Compact": "Compact", "Delete": "Delete", "DeleteOrCompact": "DeleteOrCompact"},
186186
)
187-
_args_schema.min_compaction_lag_in_mins = AAZIntArg(
187+
_args_schema.min_compaction_lag_time_in_minutes = AAZIntArg(
188188
options=["--min-lag", "--min-compaction-lag-in-mins"],
189189
arg_group="RetentionDescription",
190190
help="The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.",
@@ -340,7 +340,7 @@ def content(self):
340340
retention_description = _builder.get(".properties.retentionDescription")
341341
if retention_description is not None:
342342
retention_description.set_prop("cleanupPolicy", AAZStrType, ".cleanup_policy")
343-
retention_description.set_prop("minCompactionLagInMins", AAZIntType, ".min_compaction_lag_in_mins")
343+
retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_time_in_minutes")
344344
retention_description.set_prop("retentionTimeInHours", AAZIntType, ".retention_time_in_hours")
345345
retention_description.set_prop("tombstoneRetentionTimeInHours", AAZIntType, ".tombstone_retention_time_in_hours")
346346

@@ -479,8 +479,8 @@ def _build_schema_on_200(cls):
479479
retention_description.cleanup_policy = AAZStrType(
480480
serialized_name="cleanupPolicy",
481481
)
482-
retention_description.min_compaction_lag_in_mins = AAZIntType(
483-
serialized_name="minCompactionLagInMins",
482+
retention_description.min_compaction_lag_time_in_minutes = AAZIntType(
483+
serialized_name="minCompactionLagTimeInMinutes",
484484
)
485485
retention_description.retention_time_in_hours = AAZIntType(
486486
serialized_name="retentionTimeInHours",

src/azure-cli/azure/cli/command_modules/eventhubs/aaz/latest/eventhubs/eventhub/_update.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
197197
nullable=True,
198198
enum={"Compact": "Compact", "Delete": "Delete", "DeleteOrCompact": "DeleteOrCompact"},
199199
)
200-
_args_schema.min_compaction_lag_in_mins = AAZIntArg(
200+
_args_schema.min_compaction_lag_time_in_minutes = AAZIntArg(
201201
options=["--min-lag", "--min-compaction-lag-in-mins"],
202202
arg_group="RetentionDescription",
203203
help="The minimum time a message will remain ineligible for compaction in the log. This value is used when cleanupPolicy is Compact or DeleteOrCompact.",
@@ -488,7 +488,7 @@ def _update_instance(self, instance):
488488
retention_description = _builder.get(".properties.retentionDescription")
489489
if retention_description is not None:
490490
retention_description.set_prop("cleanupPolicy", AAZStrType, ".cleanup_policy")
491-
retention_description.set_prop("minCompactionLagInMins", AAZIntType, ".min_compaction_lag_in_mins")
491+
retention_description.set_prop("minCompactionLagTimeInMinutes", AAZIntType, ".min_compaction_lag_time_in_minutes")
492492
retention_description.set_prop("retentionTimeInHours", AAZIntType, ".retention_time_in_hours")
493493
retention_description.set_prop("tombstoneRetentionTimeInHours", AAZIntType, ".tombstone_retention_time_in_hours")
494494

@@ -637,8 +637,8 @@ def _build_schema_eventhub_read(cls, _schema):
637637
retention_description.cleanup_policy = AAZStrType(
638638
serialized_name="cleanupPolicy",
639639
)
640-
retention_description.min_compaction_lag_in_mins = AAZIntType(
641-
serialized_name="minCompactionLagInMins",
640+
retention_description.min_compaction_lag_time_in_minutes = AAZIntType(
641+
serialized_name="minCompactionLagTimeInMinutes",
642642
)
643643
retention_description.retention_time_in_hours = AAZIntType(
644644
serialized_name="retentionTimeInHours",
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from azure.cli.core.aaz import *
12+
13+
14+
@register_command_group(
15+
"eventhubs namespace nsp-configuration",
16+
)
17+
class __CMDGroup(AAZCommandGroup):
18+
"""Manage Network Security Perimeter Configuration
19+
"""
20+
pass
21+
22+
23+
__all__ = ["__CMDGroup"]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# --------------------------------------------------------------------------------------------
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
# Licensed under the MIT License. See License.txt in the project root for license information.
4+
#
5+
# Code generated by aaz-dev-tools
6+
# --------------------------------------------------------------------------------------------
7+
8+
# pylint: skip-file
9+
# flake8: noqa
10+
11+
from .__cmd_group import *
12+
from ._list import *
13+
from ._show import *

0 commit comments

Comments
 (0)