Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions src/informatica/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Release History
===============

1.0.0b2
+++++
* Updated description for commands and command groups.

1.0.0b1
++++++
* Initial release.
2 changes: 1 addition & 1 deletion src/informatica/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ az group create -n testrg -l eastus
```
# Create Informatica Organization
```
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}"}'
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}"}'
```
# Show an Informatica Organization Resource
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"informatica",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Informatica
"""Manage all resources related to Informatica within the Azure CLI.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"informatica data-management",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Informatica
"""Manage all resources related to Informatica within the Azure CLI.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"informatica data-management organization",
)
class __CMDGroup(AAZCommandGroup):
"""Manage Informatica organization
"""Manage organization-level resources for Informatica.
"""
pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
"informatica data-management organization create",
)
class Create(AAZCommand):
"""Create a InformaticaOrganizationResource

:example: Create or Update an Organization
az informatica data-management organization create -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x -l westUS2
"""Create a new organization resource in Informatica via Azure.
"""

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

_args_schema = cls._args_schema
_args_schema.org_name = AAZStrArg(
options=["-n", "--name", "--org-name"],
_args_schema.organization_name = AAZStrArg(
options=["-n", "--name", "--organization-name"],
help="Name of the Organizations resource",
required=True,
fmt=AAZStrArgFormat(
pattern="^[a-zA-Z0-9_-]*$",
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
help="Resource group name",
required=True,
)

Expand Down Expand Up @@ -315,7 +311,7 @@ def error_format(self):
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"organizationName", self.ctx.args.org_name,
"organizationName", self.ctx.args.organization_name,
required=True,
),
**self.serialize_url_param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
confirmation="Are you sure you want to perform this operation?",
)
class Delete(AAZCommand):
"""Delete a InformaticaOrganizationResource

:example: Delete Organizations
az informatica data-management organization delete -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
"""Delete an existing organization resource in Informatica via Azure.
"""

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

_args_schema = cls._args_schema
_args_schema.org_name = AAZStrArg(
options=["-n", "--name", "--org-name"],
_args_schema.organization_name = AAZStrArg(
options=["-n", "--name", "--organization-name"],
help="Name of the Organizations resource",
required=True,
id_part="name",
Expand All @@ -56,7 +53,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
help="Resource group name",
required=True,
)
return cls._args_schema
Expand Down Expand Up @@ -129,7 +125,7 @@ def error_format(self):
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"organizationName", self.ctx.args.org_name,
"organizationName", self.ctx.args.organization_name,
required=True,
),
**self.serialize_url_param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
"informatica data-management organization list",
)
class List(AAZCommand):
"""List InformaticaOrganizationResource resources by subscription ID

:example: List organizations by subscription
az informatica data-management organization list --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
"""List all Informatica organization resources under the current subscription.
"""

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

_args_schema = cls._args_schema
_args_schema.resource_group = AAZResourceGroupNameArg(
help="Resource group name",
)
_args_schema.resource_group = AAZResourceGroupNameArg()
return cls._args_schema

def _execute_operations(self):
self.pre_operations()
condition_0 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
condition_1 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_0 = has_value(self.ctx.subscription_id) and has_value(self.ctx.args.resource_group) is not True
condition_1 = has_value(self.ctx.args.resource_group) and has_value(self.ctx.subscription_id)
if condition_0:
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
if condition_1:
self.OrganizationsListBySubscription(ctx=self.ctx)()
if condition_1:
self.OrganizationsListByResourceGroup(ctx=self.ctx)()
self.post_operations()

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

class OrganizationsListByResourceGroup(AAZHttpOperation):
class OrganizationsListBySubscription(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -88,7 +83,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations",
"/subscriptions/{subscriptionId}/providers/Informatica.DataManagement/organizations",
**self.url_parameters
)

Expand All @@ -103,10 +98,6 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand Down Expand Up @@ -309,7 +300,7 @@ def _build_schema_on_200(cls):

return cls._schema_on_200

class OrganizationsListBySubscription(AAZHttpOperation):
class OrganizationsListByResourceGroup(AAZHttpOperation):
CLIENT_TYPE = "MgmtClient"

def __call__(self, *args, **kwargs):
Expand All @@ -323,7 +314,7 @@ def __call__(self, *args, **kwargs):
@property
def url(self):
return self.client.format_url(
"/subscriptions/{subscriptionId}/providers/Informatica.DataManagement/organizations",
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Informatica.DataManagement/organizations",
**self.url_parameters
)

Expand All @@ -338,6 +329,10 @@ def error_format(self):
@property
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"resourceGroupName", self.ctx.args.resource_group,
required=True,
),
**self.serialize_url_param(
"subscriptionId", self.ctx.subscription_id,
required=True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
"informatica data-management organization show",
)
class Show(AAZCommand):
"""Get an InformaticaOrganizationResource

:example: Get an Informatica Organization
az informatica data-management organization show -g demoResourceGroup -n demoOrg
"""Retrieve details of a specific Informatica organization resource.
"""

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

_args_schema = cls._args_schema
_args_schema.org_name = AAZStrArg(
options=["-n", "--name", "--org-name"],
_args_schema.organization_name = AAZStrArg(
options=["-n", "--name", "--organization-name"],
help="Name of the Organizations resource",
required=True,
id_part="name",
Expand All @@ -54,7 +51,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
help="Resource group name",
required=True,
)
return cls._args_schema
Expand Down Expand Up @@ -106,7 +102,7 @@ def error_format(self):
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"organizationName", self.ctx.args.org_name,
"organizationName", self.ctx.args.organization_name,
required=True,
),
**self.serialize_url_param(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def _build_arguments_schema(cls, *args, **kwargs):
# define Arg Group ""

_args_schema = cls._args_schema
_args_schema.org_name = AAZStrArg(
options=["-n", "--name", "--org-name"],
_args_schema.organization_name = AAZStrArg(
options=["-n", "--name", "--organization-name"],
help="Name of the Organizations resource",
required=True,
id_part="name",
Expand All @@ -50,7 +50,6 @@ def _build_arguments_schema(cls, *args, **kwargs):
),
)
_args_schema.resource_group = AAZResourceGroupNameArg(
help="Resource group name",
required=True,
)
return cls._args_schema
Expand Down Expand Up @@ -102,7 +101,7 @@ def error_format(self):
def url_parameters(self):
parameters = {
**self.serialize_url_param(
"organizationName", self.ctx.args.org_name,
"organizationName", self.ctx.args.organization_name,
required=True,
),
**self.serialize_url_param(
Expand Down
2 changes: 1 addition & 1 deletion src/informatica/azext_informatica/azext_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"azext.isPreview": true,
"azext.minCliCoreVersion": "2.61.0"
"azext.minCliCoreVersion": "2.70.0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interactions:
Content-Type:
- application/json
ParameterSetName:
- --resource-group --org-name --subscription --location --company-details --marketplace-details
- --resource-group --organization-name --subscription --location --company-details --marketplace-details
--user-details --informatica-properties --link-organization
User-Agent:
- AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.11.0 (Windows-10-10.0.22631-SP0)
Expand Down Expand Up @@ -86,7 +86,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --org-name --subscription --location --company-details --marketplace-details
- --resource-group --organization-name --subscription --location --company-details --marketplace-details
--user-details --informatica-properties --link-organization
User-Agent:
- AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.11.0 (Windows-10-10.0.22631-SP0)
Expand Down Expand Up @@ -133,7 +133,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --org-name --subscription --location --company-details --marketplace-details
- --resource-group --organization-name --subscription --location --company-details --marketplace-details
--user-details --informatica-properties --link-organization
User-Agent:
- AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.11.0 (Windows-10-10.0.22631-SP0)
Expand Down Expand Up @@ -180,7 +180,7 @@ interactions:
Connection:
- keep-alive
ParameterSetName:
- --resource-group --org-name --subscription --location --company-details --marketplace-details
- --resource-group --organization-name --subscription --location --company-details --marketplace-details
--user-details --informatica-properties --link-organization
User-Agent:
- AZURECLI/2.61.0 azsdk-python-core/1.28.0 Python/3.11.0 (Windows-10-10.0.22631-SP0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def test_informatica(self, resource_group):
})

# Create Informatica Organization
self.cmd('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}"}}\'',
self.cmd('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}"}}\'',
checks=[
self.check('name', '{name}'),
self.check('informaticaProperties.organizationName', '{org_name}'),
Expand Down
2 changes: 1 addition & 1 deletion src/informatica/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


# HISTORY.rst entry.
VERSION = '1.0.0b1'
VERSION = '1.0.0b2'

# The full list of classifiers is available at
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
Expand Down