Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
24a2db9
Create extension
Oct 22, 2025
f5b4378
Update src/migrate/azext_migrate/__init__.py
saifaldin14 Oct 22, 2025
67bb359
Fix import issues
Oct 22, 2025
70c525b
Merge branch 'main' of https://github.com/saifaldin14/azure-cli-exten…
Oct 22, 2025
c3021fb
Update src/migrate/setup.py
saifaldin14 Oct 22, 2025
f6e2dd8
Small
Oct 22, 2025
0174a38
Merge branch 'main' of https://github.com/saifaldin14/azure-cli-exten…
Oct 22, 2025
ae26651
Small lint
Oct 22, 2025
09ff801
Small
Oct 22, 2025
749bd43
disable lint for this check
Oct 22, 2025
8002b06
Add json
Oct 22, 2025
be276db
Fix licesnse issue
Oct 22, 2025
8da3466
fix small
Oct 22, 2025
d9fa098
Small
Oct 22, 2025
68f0d46
Get rid of unused variables
Oct 22, 2025
f916208
Add service name and code owner
Oct 23, 2025
9ad08a3
Merge branch 'main' of https://github.com/saifaldin14/azure-cli-exten…
Oct 23, 2025
8ae69d2
New version
Oct 23, 2025
532cbb3
Style
Oct 23, 2025
f216aa3
Small
Oct 23, 2025
77d8eb0
Update
Oct 23, 2025
f7558d6
Follow standard
Oct 23, 2025
ea8d636
Add suggestions
Oct 23, 2025
7117986
Small
Oct 23, 2025
143028f
Not preview
Oct 23, 2025
242fb99
Add flag to become experimental
Oct 23, 2025
4dae020
Merge branch 'Azure:main' into main
saifaldin14 Oct 23, 2025
6a1f184
Update history
Oct 23, 2025
4178016
Merge branch 'main' of https://github.com/saifaldin14/azure-cli-exten…
Oct 23, 2025
8874d5e
Fix
Oct 23, 2025
38b0de2
small
Oct 23, 2025
0f7acb7
Create get job and remove replication commands
Oct 24, 2025
5d4d83b
Add better error handling for jobs command
Nov 3, 2025
2f8b6d8
Add better messages to remove protected item
Nov 3, 2025
9ffb8e6
Return job id in remove command
Nov 3, 2025
d3120e3
Move helpers
Nov 3, 2025
ff6f498
Rename get discovered server helper
Nov 3, 2025
0f4af5b
Refactor _initialize_replication_infrastructure_helpers
Nov 3, 2025
cb8370b
Refactor new replication
Nov 3, 2025
f4514e8
Refactor jobs
Nov 3, 2025
5b482a7
Refactor delete protected item
Nov 3, 2025
15ab074
Fix lint issues
Nov 12, 2025
314d750
Merge branch 'main' into user/saif/newCommands
saifaldin14 Nov 12, 2025
f0dc844
Change release version
Nov 12, 2025
743370b
Merge branch 'user/saif/newCommands' of https://github.com/saifaldin1…
Nov 12, 2025
c373e29
Fix lint issues
Nov 12, 2025
93ff490
Add fix
Nov 12, 2025
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
8 changes: 6 additions & 2 deletions src/migrate/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Release History
+++++++++++++++
* New version.

2.0.1b1
2.0.0b1
+++++++++++++++
* Switch to experimental version.
* Switch to experimental version.

3.0.0b1
+++++++++++++++
* Refactor codebase for improved readability and maintainability.
129 changes: 121 additions & 8 deletions src/migrate/azext_migrate/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,31 +71,31 @@
text: |
az migrate local get-discovered-server \\
--project-name myMigrateProject \\
--resource-group-name myRG
--resource-group myRG
- name: Get a specific discovered server by name
text: |
az migrate local get-discovered-server \\
--project-name myMigrateProject \\
--resource-group-name myRG \\
--resource-group myRG \\
--name machine-12345
- name: Filter discovered servers by display name
text: |
az migrate local get-discovered-server \\
--project-name myMigrateProject \\
--resource-group-name myRG \\
--resource-group myRG \\
--display-name "web-server"
- name: List VMware servers discovered by a specific appliance
text: |
az migrate local get-discovered-server \\
--project-name myMigrateProject \\
--resource-group-name myRG \\
--resource-group myRG \\
--appliance-name myVMwareAppliance \\
--source-machine-type VMware
- name: Get a specific server from a specific appliance
text: |
az migrate local get-discovered-server \\
--project-name myMigrateProject \\
--resource-group-name myRG \\
--resource-group myRG \\
--appliance-name myAppliance \\
--name machine-12345 \\
--source-machine-type HyperV
Expand Down Expand Up @@ -152,14 +152,14 @@
- name: Initialize replication infrastructure
text: |
az migrate local replication init \\
--resource-group-name myRG \\
--resource-group myRG \\
--project-name myMigrateProject \\
--source-appliance-name myVMwareAppliance \\
--target-appliance-name myAzStackHCIAppliance
- name: Initialize and return success status
text: |
az migrate local replication init \\
--resource-group-name myRG \\
--resource-group myRG \\
--project-name myMigrateProject \\
--source-appliance-name mySourceAppliance \\
--target-appliance-name myTargetAppliance \\
Expand Down Expand Up @@ -268,7 +268,7 @@
az migrate local replication new \\
--machine-index 1 \\
--project-name myMigrateProject \\
--resource-group-name myRG \\
--resource-group myRG \\
--target-storage-path-id "XZXZ" \\
--target-resource-group-id "YZYZ" \\
--target-vm-name migratedVM01 \\
Expand Down Expand Up @@ -303,3 +303,116 @@
--target-test-virtual-switch-id "XYXY" \\
--os-disk-id "disk-0"
"""

helps['migrate local replication remove'] = """
type: command
short-summary: Stop replication for a migrated server.
long-summary: |
Stops the replication for a migrated server and removes
the replication configuration.
This command disables protection for the specified server.

Note: This command uses a preview API version
and may experience breaking changes in future releases.
parameters:
- name: --target-object-id --id
short-summary: Replicating server ARM ID to disable replication.
long-summary: >
Specifies the ARM resource ID of the replicating server
for which replication needs to be disabled.
The ID should be retrieved using a get or list command
for replication items.
- name: --force-remove --force
short-summary: Force remove the replication.
long-summary: >
Specifies whether the replication needs to be
force removed. Default is false.
Use this option to remove replication even if
the cleanup process encounters errors.
- name: --subscription-id
short-summary: Azure subscription ID.
long-summary: >
The subscription containing the replication resources.
Uses the current subscription if not specified.
examples:
- name: Stop replication for a migrated server
text: |
az migrate local replication remove \\
--target-object-id "XXXX"
- name: Force remove replication for a server
text: |
az migrate local replication remove \\
--target-object-id "XXXX" \\
--force-remove true
- name: Stop replication using short parameter names
text: |
az migrate local replication remove \\
--id "XXXX" \\
--force
"""

helps['migrate local replication get-job'] = """
type: command
short-summary: Retrieve the status of an Azure Migrate job.
long-summary: |
Get the status and details of an Azure Migrate replication job.
You can retrieve a specific job by its ARM ID or name,
or list all jobs in a migrate project.

Note: This command uses a preview API version
and may experience breaking changes in future releases.
parameters:
- name: --job-id --id
short-summary: Job ARM ID for which details need to be retrieved.
long-summary: >
Specifies the full ARM resource ID of the job.
When provided, retrieves the specific job details.
- name: --resource-group -g
short-summary: Resource group name where the vault is present.
long-summary: >
The name of the resource group containing
the recovery services vault.
Required when using --project-name.
- name: --project-name
short-summary: Name of the migrate project.
long-summary: >
The name of the Azure Migrate project.
Required when using --resource-group.
- name: --job-name --name
short-summary: Job identifier/name.
long-summary: >
The name of the specific job to retrieve.
If not provided, lists all jobs in the project.
- name: --subscription-id
short-summary: Azure subscription ID.
long-summary: >
The subscription containing the migrate project.
Uses the current subscription if not specified.
examples:
- name: Get a specific job by ARM ID
text: |
az migrate local replication get-job \\
--job-id "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.DataReplication/replicationVaults/{vault}/jobs/{job-name}"
- name: Get a specific job by name
text: |
az migrate local replication get-job \\
--resource-group myRG \\
--project-name myMigrateProject \\
--job-name myJobName
- name: List all jobs in a project
text: |
az migrate local replication get-job \\
--resource-group myRG \\
--project-name myMigrateProject
- name: Get job using short parameter names
text: |
az migrate local replication get-job \\
--id "/subscriptions/{sub-id}/resourceGroups/{rg}/providers/Microsoft.DataReplication/replicationVaults/{vault}/jobs/{job-name}"
- name: Get job with specific subscription
text: |
az migrate local replication get-job \\
-g myRG \\
--project-name myMigrateProject \\
--name myJobName \\
--subscription-id "12345678-1234-1234-1234-123456789012"
"""
Loading
Loading