Skip to content
Draft
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
60 changes: 60 additions & 0 deletions src/data-transfer/azext_data_transfer/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,63 @@
- name: Enable a flow by name in a resource group.
text: az data-transfer connection flow enable --resource-group {rg} --name {connectionName}
"""

helps['data-transfer pipeline disable'] = """
type: command
short-summary: Disable a pipeline.
examples:
- name: Disable a pipeline with justification.
text: az data-transfer pipeline disable --resource-group myResourceGroup --pipeline-name myPipeline --justification "Emergency maintenance"
- name: Disable a pipeline without waiting for completion.
text: az data-transfer pipeline disable --resource-group myResourceGroup --pipeline-name myPipeline --no-wait
"""

helps['data-transfer pipeline enable'] = """
type: command
short-summary: Enable a pipeline to allow updates.
examples:
- name: Enable a pipeline with justification.
text: az data-transfer pipeline enable --resource-group myResourceGroup --pipeline-name myPipeline --justification "Maintenance completed"
- name: Enable a pipeline without waiting for completion.
text: az data-transfer pipeline enable --resource-group myResourceGroup --pipeline-name myPipeline --no-wait
"""

helps['data-transfer pipeline connection disable'] = """
type: command
short-summary: Disable specific connections in a pipeline.
examples:
- name: Disable multiple connections in a pipeline.
text: az data-transfer pipeline connection disable --resource-group myResourceGroup --pipeline-name myPipeline --connection-ids conn1 conn2 --justification "Connection maintenance"
- name: Disable a single connection.
text: az data-transfer pipeline connection disable --resource-group myResourceGroup --pipeline-name myPipeline --connection-ids /subscriptions/sub-id/resourceGroups/rg/providers/Microsoft.AzureDataTransfer/connections/myConnection
"""

helps['data-transfer pipeline connection enable'] = """
type: command
short-summary: Enable specific connections in a pipeline to allow updates.
examples:
- name: Enable multiple connections in a pipeline.
text: az data-transfer pipeline connection enable --resource-group myResourceGroup --pipeline-name myPipeline --connection-ids conn1 conn2 --justification "Connection maintenance completed"
- name: Enable a single connection.
text: az data-transfer pipeline connection enable --resource-group myResourceGroup --pipeline-name myPipeline --connection-ids /subscriptions/sub-id/resourceGroups/rg/providers/Microsoft.AzureDataTransfer/connections/myConnection
"""

helps['data-transfer pipeline flowtype disable'] = """
type: command
short-summary: Disable specific flow types in a pipeline.
examples:
- name: Disable multiple flow types in a pipeline.
text: az data-transfer pipeline flowtype disable --resource-group myResourceGroup --pipeline-name myPipeline --flow-types DataFlow LogFlow --justification "Flow type maintenance"
- name: Disable a single flow type.
text: az data-transfer pipeline flowtype disable --resource-group myResourceGroup --pipeline-name myPipeline --flow-types DataFlow
"""

helps['data-transfer pipeline flowtype enable'] = """
type: command
short-summary: Enable specific flow types in a pipeline to allow updates.
examples:
- name: Enable multiple flow types in a pipeline.
text: az data-transfer pipeline flowtype enable --resource-group myResourceGroup --pipeline-name myPipeline --flow-types DataFlow LogFlow --justification "Flow type maintenance completed"
- name: Enable a single flow type.
text: az data-transfer pipeline flowtype enable --resource-group myResourceGroup --pipeline-name myPipeline --flow-types DataFlow
"""
21 changes: 21 additions & 0 deletions src/data-transfer/azext_data_transfer/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ def load_arguments(self, _): # pylint: disable=unused-argument
options_list=['--name', '-n', '--pipeline-name'],
help='The name for the pipeline to perform the operation on.'
)
c.argument(
'justification',
options_list=['--justification'],
help='Business justification for the action'
)

with self.argument_context('data-transfer pipeline connection') as c:
c.argument(
'connection_ids',
options_list=['--connection-ids'],
nargs='+',
help='List of connection IDs to operate on'
)

with self.argument_context('data-transfer pipeline flowtype') as c:
c.argument(
'flow_types',
options_list=['--flow-types'],
nargs='+',
help='List of flow types to operate on'
)

with self.argument_context('data-transfer connection flow') as c:
c.argument(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from ._approve_connection import *
from ._create import *
from ._delete import *
from ._execute_action import *
from ._list import *
from ._reject_connection import *
from ._show import *
Expand Down
Loading
Loading