Skip to content

Commit aa0fd56

Browse files
nareshkumar-microsoftBavneet Singh
authored andcommitted
Informatica: udpated azure cli commands description (Azure#8752)
* udpated informatica azure cli commands description * updated version and group command description * updated the desc for group * fixed tests
1 parent 12648b0 commit aa0fd56

File tree

14 files changed

+44
-58
lines changed

14 files changed

+44
-58
lines changed

src/informatica/HISTORY.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
Release History
44
===============
55

6+
1.0.0b2
7+
+++++
8+
* Updated description for commands and command groups.
9+
610
1.0.0b1
711
++++++
812
* Initial release.

src/informatica/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ az group create -n testrg -l eastus
2222
```
2323
# Create Informatica Organization
2424
```
25-
az informatica data-management organization create --resource-group {resource_group} --org-name {name} --subscription {subscription} --location {location} --company-details '{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}' --marketplace-details '{"marketplace-subscription-id": "{marketplace_subscription_id}", "offer-details": {"offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "publisher-id": "{publisher_id}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}' --user-details '{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}' --informatica-properties '{"organization-id": "{org_id}", "organization-name": "{org_name}", "informatica-region": "{informatica_region}"}' --link-organization '{"token": "{link_token}"}'
25+
az informatica data-management organization create --resource-group {resource_group} --organization-name {name} --subscription {subscription} --location {location} --company-details '{"company-name": "{company_name}", "office-address": "{office_address}", "country": "{country}", "domain": "{domain}", "number-of-employees": {number_of_employee}}' --marketplace-details '{"marketplace-subscription-id": "{marketplace_subscription_id}", "offer-details": {"offer-id": "{offer_id}", "plan-id": "{plan_id}", "plan-name": "{plan_name}", "publisher-id": "{publisher_id}", "term-unit": "{term_unit}", "term-id": "{term_id}"}}' --user-details '{"first-name": "{user_first_name}", "last-name": "{user_last_name}", "email-address": "{user_email}", "upn": "{user_upn}", "phone-number": "{user_phone}"}' --informatica-properties '{"organization-id": "{org_id}", "organization-name": "{org_name}", "informatica-region": "{informatica_region}"}' --link-organization '{"token": "{link_token}"}'
2626
```
2727
# Show an Informatica Organization Resource
2828
```

src/informatica/azext_informatica/aaz/latest/informatica/__cmd_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"informatica",
1616
)
1717
class __CMDGroup(AAZCommandGroup):
18-
"""Manage Informatica
18+
"""Manage all resources related to Informatica within the Azure CLI.
1919
"""
2020
pass
2121

src/informatica/azext_informatica/aaz/latest/informatica/data_management/__cmd_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"informatica data-management",
1616
)
1717
class __CMDGroup(AAZCommandGroup):
18-
"""Manage Informatica
18+
"""Manage all resources related to Informatica within the Azure CLI.
1919
"""
2020
pass
2121

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/__cmd_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"informatica data-management organization",
1616
)
1717
class __CMDGroup(AAZCommandGroup):
18-
"""Manage Informatica organization
18+
"""Manage organization-level resources for Informatica.
1919
"""
2020
pass
2121

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/_create.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
"informatica data-management organization create",
1616
)
1717
class Create(AAZCommand):
18-
"""Create a InformaticaOrganizationResource
19-
20-
:example: Create or Update an Organization
21-
az informatica data-management organization create -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x -l westUS2
18+
"""Create a new organization resource in Informatica via Azure.
2219
"""
2320

2421
_aaz_info = {
@@ -45,16 +42,15 @@ def _build_arguments_schema(cls, *args, **kwargs):
4542
# define Arg Group ""
4643

4744
_args_schema = cls._args_schema
48-
_args_schema.org_name = AAZStrArg(
49-
options=["-n", "--name", "--org-name"],
45+
_args_schema.organization_name = AAZStrArg(
46+
options=["-n", "--name", "--organization-name"],
5047
help="Name of the Organizations resource",
5148
required=True,
5249
fmt=AAZStrArgFormat(
5350
pattern="^[a-zA-Z0-9_-]*$",
5451
),
5552
)
5653
_args_schema.resource_group = AAZResourceGroupNameArg(
57-
help="Resource group name",
5854
required=True,
5955
)
6056

@@ -315,7 +311,7 @@ def error_format(self):
315311
def url_parameters(self):
316312
parameters = {
317313
**self.serialize_url_param(
318-
"organizationName", self.ctx.args.org_name,
314+
"organizationName", self.ctx.args.organization_name,
319315
required=True,
320316
),
321317
**self.serialize_url_param(

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/_delete.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,7 @@
1616
confirmation="Are you sure you want to perform this operation?",
1717
)
1818
class Delete(AAZCommand):
19-
"""Delete a InformaticaOrganizationResource
20-
21-
:example: Delete Organizations
22-
az informatica data-management organization delete -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
19+
"""Delete an existing organization resource in Informatica via Azure.
2320
"""
2421

2522
_aaz_info = {
@@ -46,8 +43,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
4643
# define Arg Group ""
4744

4845
_args_schema = cls._args_schema
49-
_args_schema.org_name = AAZStrArg(
50-
options=["-n", "--name", "--org-name"],
46+
_args_schema.organization_name = AAZStrArg(
47+
options=["-n", "--name", "--organization-name"],
5148
help="Name of the Organizations resource",
5249
required=True,
5350
id_part="name",
@@ -56,7 +53,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5653
),
5754
)
5855
_args_schema.resource_group = AAZResourceGroupNameArg(
59-
help="Resource group name",
6056
required=True,
6157
)
6258
return cls._args_schema
@@ -129,7 +125,7 @@ def error_format(self):
129125
def url_parameters(self):
130126
parameters = {
131127
**self.serialize_url_param(
132-
"organizationName", self.ctx.args.org_name,
128+
"organizationName", self.ctx.args.organization_name,
133129
required=True,
134130
),
135131
**self.serialize_url_param(

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/_list.py

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
"informatica data-management organization list",
1616
)
1717
class List(AAZCommand):
18-
"""List InformaticaOrganizationResource resources by subscription ID
19-
20-
:example: List organizations by subscription
21-
az informatica data-management organization list --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
18+
"""List all Informatica organization resources under the current subscription.
2219
"""
2320

2421
_aaz_info = {
@@ -46,19 +43,17 @@ def _build_arguments_schema(cls, *args, **kwargs):
4643
# define Arg Group ""
4744

4845
_args_schema = cls._args_schema
49-
_args_schema.resource_group = AAZResourceGroupNameArg(
50-
help="Resource group name",
51-
)
46+
_args_schema.resource_group = AAZResourceGroupNameArg()
5247
return cls._args_schema
5348

5449
def _execute_operations(self):
5550
self.pre_operations()
56-
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
57-
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)
5853
if condition_0:
59-
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
60-
if condition_1:
6154
self.OrganizationsListBySubscription(ctx=self.ctx)()
55+
if condition_1:
56+
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
6257
self.post_operations()
6358

6459
@register_callback
@@ -74,7 +69,7 @@ def _output(self, *args, **kwargs):
7469
next_link = self.deserialize_output(self.ctx.vars.instance.next_link)
7570
return result, next_link
7671

77-
class OrganizationsListByResourceGroup(AAZHttpOperation):
72+
class OrganizationsListBySubscription(AAZHttpOperation):
7873
CLIENT_TYPE = "MgmtClient"
7974

8075
def __call__(self, *args, **kwargs):
@@ -88,7 +83,7 @@ def __call__(self, *args, **kwargs):
8883
@property
8984
def url(self):
9085
return self.client.format_url(
91-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations",
86+
"/subscriptions/{subscriptionId}/providers/Informatica.DataManagement/organizations",
9287
**self.url_parameters
9388
)
9489

@@ -103,10 +98,6 @@ def error_format(self):
10398
@property
10499
def url_parameters(self):
105100
parameters = {
106-
**self.serialize_url_param(
107-
"resourceGroupName", self.ctx.args.resource_group,
108-
required=True,
109-
),
110101
**self.serialize_url_param(
111102
"subscriptionId", self.ctx.subscription_id,
112103
required=True,
@@ -309,7 +300,7 @@ def _build_schema_on_200(cls):
309300

310301
return cls._schema_on_200
311302

312-
class OrganizationsListBySubscription(AAZHttpOperation):
303+
class OrganizationsListByResourceGroup(AAZHttpOperation):
313304
CLIENT_TYPE = "MgmtClient"
314305

315306
def __call__(self, *args, **kwargs):
@@ -323,7 +314,7 @@ def __call__(self, *args, **kwargs):
323314
@property
324315
def url(self):
325316
return self.client.format_url(
326-
"/subscriptions/{subscriptionId}/providers/Informatica.DataManagement/organizations",
317+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations",
327318
**self.url_parameters
328319
)
329320

@@ -338,6 +329,10 @@ def error_format(self):
338329
@property
339330
def url_parameters(self):
340331
parameters = {
332+
**self.serialize_url_param(
333+
"resourceGroupName", self.ctx.args.resource_group,
334+
required=True,
335+
),
341336
**self.serialize_url_param(
342337
"subscriptionId", self.ctx.subscription_id,
343338
required=True,

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/_show.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
"informatica data-management organization show",
1616
)
1717
class Show(AAZCommand):
18-
"""Get an InformaticaOrganizationResource
19-
20-
:example: Get an Informatica Organization
21-
az informatica data-management organization show -g demoResourceGroup -n demoOrg
18+
"""Retrieve details of a specific Informatica organization resource.
2219
"""
2320

2421
_aaz_info = {
@@ -44,8 +41,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
4441
# define Arg Group ""
4542

4643
_args_schema = cls._args_schema
47-
_args_schema.org_name = AAZStrArg(
48-
options=["-n", "--name", "--org-name"],
44+
_args_schema.organization_name = AAZStrArg(
45+
options=["-n", "--name", "--organization-name"],
4946
help="Name of the Organizations resource",
5047
required=True,
5148
id_part="name",
@@ -54,7 +51,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5451
),
5552
)
5653
_args_schema.resource_group = AAZResourceGroupNameArg(
57-
help="Resource group name",
5854
required=True,
5955
)
6056
return cls._args_schema
@@ -106,7 +102,7 @@ def error_format(self):
106102
def url_parameters(self):
107103
parameters = {
108104
**self.serialize_url_param(
109-
"organizationName", self.ctx.args.org_name,
105+
"organizationName", self.ctx.args.organization_name,
110106
required=True,
111107
),
112108
**self.serialize_url_param(

src/informatica/azext_informatica/aaz/latest/informatica/data_management/organization/_wait.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
4040
# define Arg Group ""
4141

4242
_args_schema = cls._args_schema
43-
_args_schema.org_name = AAZStrArg(
44-
options=["-n", "--name", "--org-name"],
43+
_args_schema.organization_name = AAZStrArg(
44+
options=["-n", "--name", "--organization-name"],
4545
help="Name of the Organizations resource",
4646
required=True,
4747
id_part="name",
@@ -50,7 +50,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
5050
),
5151
)
5252
_args_schema.resource_group = AAZResourceGroupNameArg(
53-
help="Resource group name",
5453
required=True,
5554
)
5655
return cls._args_schema
@@ -102,7 +101,7 @@ def error_format(self):
102101
def url_parameters(self):
103102
parameters = {
104103
**self.serialize_url_param(
105-
"organizationName", self.ctx.args.org_name,
104+
"organizationName", self.ctx.args.organization_name,
106105
required=True,
107106
),
108107
**self.serialize_url_param(

0 commit comments

Comments
 (0)