Skip to content

Commit

Permalink
Add examples to generated commands
Browse files Browse the repository at this point in the history
  • Loading branch information
almasak committed Jul 11, 2024
1 parent 48ab877 commit 08d0bd5
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
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
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
)
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
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class GetAllServerlessRuntime(AAZCommand):
"""Gets all serverless runtime resources in a given informatica organization resource.
:example: Get All Serverless Runtimes of the Organization
az informatica data-management organization get-all-serverless-runtime --resource-group rgopenapi --org-name t
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class GetServerlessMetadatum(AAZCommand):
"""Gets Metadata of the serverless runtime environment.
:example: Get Serverless Metadata of the Organization
az informatica data-management organization get-serverless-metadatum -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
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
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"informatica data-management organization show",
)
class Show(AAZCommand):
"""Get a InformaticaOrganizationResource
"""Get an InformaticaOrganizationResource
:example: Get an Informatica Organization
az informatica data-management organization show -g demoResourceGroup -n demoOrg
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class Update(AAZCommand):
"""Update a InformaticaOrganizationResource
:example: Update an Organization
az informatica data-management organization update -n demoOrg -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class CheckDependency(AAZCommand):
"""Checks all dependencies for a serverless runtime resource
:example: Check All Dependencies for a Serverless Runtime Resource
az informatica data-management organization serverless-runtime check-dependency --resource-group demoResourceGroup --org-name demoOrgName --name demoServerlessRuntime
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"informatica data-management organization serverless-runtime create",
)
class Create(AAZCommand):
"""Create a InformaticaServerlessRuntimeResource
"""Create an InformaticaServerlessRuntimeResource
:example: Create Or Update Serverless Runtime
az informatica data-management organization serverless-runtime create -n demoServerlessRuntime -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x --org-name demoOrgName
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
)
class Delete(AAZCommand):
"""Delete a InformaticaServerlessRuntimeResource
:example: Delete Serverless Runtime
az informatica data-management organization serverless-runtime delete -n demoServerlessRuntime -g demoResourceGroup --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x --org-name demoOrgName
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class List(AAZCommand):
"""List InformaticaServerlessRuntimeResource resources by InformaticaOrganizationResource
:example: List InformaticaServerlessRuntimeResource resources by InformaticaOrganizationResource
az informatica data-management organization serverless-runtime list --resource-group demoResourceGroup --org-name demoOrgName --subscription ae37d5a8-dff3-49a3-bfcd-139a4f7db98x
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"informatica data-management organization serverless-runtime show",
)
class Show(AAZCommand):
"""Get a InformaticaServerlessRuntimeResource
"""Get an InformaticaServerlessRuntimeResource
:example: ServerlessRuntimes_Get
az informatica data-management organization serverless-runtime show --resource-group demoResourceGroup --org-name demoOrgName --name demoServerlessRuntime
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class StartFailedServerlessRuntime(AAZCommand):
"""Starts a failed runtime resource
:example: Start a Failed Serverless Runtime
az informatica data-management organization serverless-runtime start-failed-serverless-runtime --resource-group rgopenapi --org-name 9M4 --name -25-G_
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
)
class Update(AAZCommand):
"""Update a InformaticaServerlessRuntimeResource
:example: Update a Serverless Runtime
az informatica data-management organization serverless-runtime update --resource-group demoResourceGroup --org-name demoOrgName --name demoServerlessRuntime
"""

_aaz_info = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"informatica data-management organization serverless-runtime serverless resource-by-id",
)
class ResourceById(AAZCommand):
"""Returns a serverless runtime resource by ID
"""Return a serverless runtime resource by ID
:example: ServerlessRuntimes_ServerlessResourceById
az informatica data-management organization serverless-runtime serverless resource-by-id --resource-group demoResourceGroup --org-name demoOrgName --name demoServerlessRuntime
"""

_aaz_info = {
Expand Down
70 changes: 35 additions & 35 deletions src/informatica/azext_informatica/tests/latest/test_informatica.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,45 @@ def test_informatica(self, resource_group):
'subscription': 'ce37d538-dfa3-49c3-b3cd-149b4b7db48a'
})

# # Check Name Availability
# self.cmd('informatica check-name-availability --name {name} --location {location}', checks=[
# self.check('nameAvailable', True)
# ])
# Check Name Availability
self.cmd('informatica check-name-availability --name {name} --location {location}', checks=[
self.check('nameAvailable', True)
])

# # Create Informatica
# self.cmd('informatica create --name {name} --location {location} --sku {sku} --capacity {capacity} --tier {tier} --resource-group {resource_group}', checks=[
# self.check('name', '{name}'),
# self.check('location', '{location}'),
# self.check('sku', '{sku}'),
# self.check('capacity', '{capacity}'),
# self.check('tier', '{tier}'),
# self.check('type', '{type}'),
# self.check('provisioningState', 'Succeeded')
# ])
# Create Informatica
self.cmd('informatica create --name {name} --location {location} --sku {sku} --capacity {capacity} --tier {tier} --resource-group {resource_group}', checks=[
self.check('name', '{name}'),
self.check('location', '{location}'),
self.check('sku', '{sku}'),
self.check('capacity', '{capacity}'),
self.check('tier', '{tier}'),
self.check('type', '{type}'),
self.check('provisioningState', 'Succeeded')
])

# # Get Informatica
# self.cmd('informatica show --name {name} --resource-group {resource_group}', checks=[
# self.check('name', '{name}'),
# self.check('location', '{location}'),
# self.check('capacity', '{capacity}'),
# self.check('tier', '{tier}'),
# self.check('type', '{type}'),
# self.check('provisioningState', 'Succeeded')
# ])
# Get Informatica
self.cmd('informatica show --name {name} --resource-group {resource_group}', checks=[
self.check('name', '{name}'),
self.check('location', '{location}'),
self.check('capacity', '{capacity}'),
self.check('tier', '{tier}'),
self.check('type', '{type}'),
self.check('provisioningState', 'Succeeded')
])

# List Informatica
self.cmd('az informatica list --subscription {subscription} --resource-group {resource_group}')

# # Update Informatica
# self.cmd('informatica update --name {name} --resource-group {resource_group} --tags tag1=test1', checks=[
# self.check('name', '{name}'),
# self.check('location', '{location}'),
# self.check('sku', '{sku}'),
# self.check('capacity', '{capacity}'),
# self.check('tier', '{tier}'),
# self.check('type', '{type}'),
# self.check('tags.tag1', 'test1')
# ])
# Update Informatica
self.cmd('informatica update --name {name} --resource-group {resource_group} --tags tag1=test1', checks=[
self.check('name', '{name}'),
self.check('location', '{location}'),
self.check('sku', '{sku}'),
self.check('capacity', '{capacity}'),
self.check('tier', '{tier}'),
self.check('type', '{type}'),
self.check('tags.tag1', 'test1')
])

# # Delete Informatica
# self.cmd('informatica delete --name {name} --resource-group {resource_group} --yes')
# Delete Informatica
self.cmd('informatica delete --name {name} --resource-group {resource_group} --yes')

0 comments on commit 08d0bd5

Please sign in to comment.