Skip to content

Commit 193b633

Browse files
alluri02Srinivas AlluriAllyW
authored
confluent cli description update (#8786)
* update the cli description to support ai related quiries * updated the version in setup.py * Update src/confluent/setup.py as per the reviewer suggestion Co-authored-by: AllyW <[email protected]> * updated the version as per the pr comments * updated test recordings for confluent * fix linter and style issues in confluent --------- Co-authored-by: Srinivas Alluri <[email protected]> Co-authored-by: AllyW <[email protected]>
1 parent 4af40d2 commit 193b633

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1676
-87
lines changed

src/confluent/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
33
Release History
44
===============
5+
1.0.0
6+
+++++
7+
* Updated CLI command descriptions to be more user and support az mcp commands.
8+
59
0.6.0
610
+++++
711
* Added more commands for user access management

src/confluent/azext_confluent/aaz/latest/confluent/organization/__cmd_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"confluent organization",
1616
)
1717
class __CMDGroup(AAZCommandGroup):
18-
"""Commands to perform actions on a confluent organization
18+
"""Perform administrative operations on Confluent organization entities via Azure.
1919
"""
2020
pass
2121

src/confluent/azext_confluent/aaz/latest/confluent/organization/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
from ._create_user import *
1515
from ._delete import *
1616
from ._list import *
17+
from ._list_region import *
1718
from ._list_role_binding import *
1819
from ._list_service_accounts import *
1920
from ._list_users import *

src/confluent/azext_confluent/aaz/latest/confluent/organization/_create.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"confluent organization create",
1616
)
1717
class Create(AAZCommand):
18-
"""Create Organization resource
18+
"""Create a new Confluent organization entity through Azure integration.
1919
"""
2020

2121
_aaz_info = {
@@ -48,8 +48,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
4848
required=True,
4949
)
5050
_args_schema.resource_group = AAZResourceGroupNameArg(
51-
options=["--resource-group"],
52-
help="Resource Group Name",
5351
required=True,
5452
)
5553

@@ -176,7 +174,7 @@ def _build_arguments_schema(cls, *args, **kwargs):
176174
help="Email address",
177175
required=True,
178176
fmt=AAZStrArgFormat(
179-
pattern="^\S+@\S+\.\S+$",
177+
pattern="^\\S+@\\S+\\.\\S+$",
180178
),
181179
)
182180
user_detail.first_name = AAZStrArg(
@@ -401,6 +399,7 @@ def _build_schema_on_200_201(cls):
401399
)
402400
properties.provisioning_state = AAZStrType(
403401
serialized_name="provisioningState",
402+
flags={"read_only": True},
404403
)
405404
properties.sso_url = AAZStrType(
406405
serialized_name="ssoUrl",

src/confluent/azext_confluent/aaz/latest/confluent/organization/_create_role_binding.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"confluent organization create-role-binding",
1616
)
1717
class CreateRoleBinding(AAZCommand):
18-
"""Organization role bindings
18+
"""Assign roles to users or groups within a Confluent organization.
1919
"""
2020

2121
_aaz_info = {
@@ -48,8 +48,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
4848
id_part="name",
4949
)
5050
_args_schema.resource_group = AAZResourceGroupNameArg(
51-
options=["--resource-group"],
52-
help="Resource group name",
5351
required=True,
5452
)
5553

src/confluent/azext_confluent/aaz/latest/confluent/organization/_create_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"confluent organization create-user",
1616
)
1717
class CreateUser(AAZCommand):
18-
"""Invite user to the organization
18+
"""Invite a new user to join the Confluent organization.
1919
"""
2020

2121
_aaz_info = {

src/confluent/azext_confluent/aaz/latest/confluent/organization/_delete.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
confirmation="Are you sure you want to perform this operation?",
1717
)
1818
class Delete(AAZCommand):
19-
"""Delete Organization resource
19+
"""Delete an existing Confluent organization entity via Azure.
2020
"""
2121

2222
_aaz_info = {
@@ -50,8 +50,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5050
id_part="name",
5151
)
5252
_args_schema.resource_group = AAZResourceGroupNameArg(
53-
options=["--resource-group"],
54-
help="Resource Group Name",
5553
required=True,
5654
)
5755
return cls._args_schema

src/confluent/azext_confluent/aaz/latest/confluent/organization/_list.py

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"confluent organization list",
1616
)
1717
class List(AAZCommand):
18-
"""List all organizations under the specified subscription.
18+
"""List all Confluent organizations under the specified resource group or subscription.
1919
"""
2020

2121
_aaz_info = {
@@ -43,20 +43,17 @@ def _build_arguments_schema(cls, *args, **kwargs):
4343
# define Arg Group ""
4444

4545
_args_schema = cls._args_schema
46-
_args_schema.resource_group = AAZResourceGroupNameArg(
47-
options=["--resource-group"],
48-
help="Resource Group Name",
49-
)
46+
_args_schema.resource_group = AAZResourceGroupNameArg()
5047
return cls._args_schema
5148

5249
def _execute_operations(self):
5350
self.pre_operations()
54-
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
55-
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
51+
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
52+
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
5653
if condition_0:
57-
self.OrganizationListByResourceGroup(ctx=self.ctx)()
58-
if condition_1:
5954
self.OrganizationListBySubscription(ctx=self.ctx)()
55+
if condition_1:
56+
self.OrganizationListByResourceGroup(ctx=self.ctx)()
6057
self.post_operations()
6158

6259
@register_callback
@@ -72,7 +69,7 @@ def _output(self, *args, **kwargs):
7269
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
7370
return result, next_link
7471

75-
class OrganizationListByResourceGroup(AAZHttpOperation):
72+
class OrganizationListBySubscription(AAZHttpOperation):
7673
CLIENT_TYPE = "MgmtClient"
7774

7875
def __call__(self, *args, **kwargs):
@@ -86,7 +83,7 @@ def __call__(self, *args, **kwargs):
8683
@property
8784
def url(self):
8885
return self.client.format_url(
89-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations",
86+
"/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations",
9087
**self.url_parameters
9188
)
9289

@@ -101,10 +98,6 @@ def error_format(self):
10198
@property
10299
def url_parameters(self):
103100
parameters = {
104-
**self.serialize_url_param(
105-
"resourceGroupName", self.ctx.args.resource_group,
106-
required=True,
107-
),
108101
**self.serialize_url_param(
109102
"subscriptionId", self.ctx.subscription_id,
110103
required=True,
@@ -192,6 +185,7 @@ def _build_schema_on_200(cls):
192185
)
193186
properties.provisioning_state = AAZStrType(
194187
serialized_name="provisioningState",
188+
flags={"read_only": True},
195189
)
196190
properties.sso_url = AAZStrType(
197191
serialized_name="ssoUrl",
@@ -279,7 +273,7 @@ def _build_schema_on_200(cls):
279273

280274
return cls._schema_on_200
281275

282-
class OrganizationListBySubscription(AAZHttpOperation):
276+
class OrganizationListByResourceGroup(AAZHttpOperation):
283277
CLIENT_TYPE = "MgmtClient"
284278

285279
def __call__(self, *args, **kwargs):
@@ -293,7 +287,7 @@ def __call__(self, *args, **kwargs):
293287
@property
294288
def url(self):
295289
return self.client.format_url(
296-
"/subscriptions/{subscriptionId}/providers/Microsoft.Confluent/organizations",
290+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Confluent/organizations",
297291
**self.url_parameters
298292
)
299293

@@ -308,6 +302,10 @@ def error_format(self):
308302
@property
309303
def url_parameters(self):
310304
parameters = {
305+
**self.serialize_url_param(
306+
"resourceGroupName", self.ctx.args.resource_group,
307+
required=True,
308+
),
311309
**self.serialize_url_param(
312310
"subscriptionId", self.ctx.subscription_id,
313311
required=True,
@@ -395,6 +393,7 @@ def _build_schema_on_200(cls):
395393
)
396394
properties.provisioning_state = AAZStrType(
397395
serialized_name="provisioningState",
396+
flags={"read_only": True},
398397
)
399398
properties.sso_url = AAZStrType(
400399
serialized_name="ssoUrl",

0 commit comments

Comments
 (0)