@@ -20,31 +20,6 @@ def get_discovered_server(cmd,
2020 subscription_id = None ,
2121 name = None ,
2222 appliance_name = None ):
23- """
24- Retrieve discovered servers from the Azure Migrate project.
25-
26- Args:
27- cmd: The CLI command context
28- project_name (str): Specifies the migrate project name (required)
29- resource_group (str): Specifies the resource group name
30- (required)
31- display_name (str, optional): Specifies the source machine
32- display name
33- source_machine_type (str, optional): Specifies the source machine
34- type (VMware, HyperV)
35- subscription_id (str, optional): Specifies the subscription id
36- name (str, optional): Specifies the source machine name
37- (internal name)
38- appliance_name (str, optional): Specifies the appliance name
39- (maps to site)
40-
41- Returns:
42- dict: The discovered server data from the API response
43-
44- Raises:
45- CLIError: If required parameters are missing or the API request
46- fails
47- """
4823 from azext_migrate .helpers ._utils import APIVersion
4924 from azext_migrate .helpers ._server import (
5025 validate_get_discovered_server_params ,
@@ -112,37 +87,6 @@ def initialize_replication_infrastructure(cmd,
11287 cache_storage_account_id = None ,
11388 subscription_id = None ,
11489 pass_thru = False ):
115- """
116- Initialize Azure Migrate local replication infrastructure.
117-
118- This function is based on a preview API version and may experience
119- breaking changes in future releases.
120-
121- Args:
122- cmd: The CLI command context
123- resource_group (str): Specifies the Resource Group of the
124- Azure Migrate Project (required)
125- project_name (str): Specifies the name of the Azure Migrate
126- project to be used for server migration (required)
127- source_appliance_name (str): Specifies the source appliance name
128- for the AzLocal scenario (required)
129- target_appliance_name (str): Specifies the target appliance name
130- for the AzLocal scenario (required)
131- cache_storage_account_id (str, optional): Specifies the Storage
132- Account ARM Id to be used for private endpoint scenario
133- subscription_id (str, optional): Azure Subscription ID. Uses
134- current subscription if not provided
135- pass_thru (bool, optional): Returns True when the command
136- succeeds
137-
138- Returns:
139- bool: True if the operation succeeds (when pass_thru is True),
140- otherwise None
141-
142- Raises:
143- CLIError: If required parameters are missing or the API request
144- fails
145- """
14690 from azure .cli .core .commands .client_factory import \
14791 get_subscription_id
14892 from azext_migrate .helpers .replication .init ._execute_init import (
@@ -197,63 +141,6 @@ def new_local_server_replication(cmd,
197141 nic_to_include = None ,
198142 os_disk_id = None ,
199143 subscription_id = None ):
200- """
201- Create a new replication for an Azure Local server.
202-
203- This cmdlet is based on a preview API version and may experience
204- breaking changes in future releases.
205-
206- Args:
207- cmd: The CLI command context
208- target_storage_path_id (str): Specifies the storage path ARM ID
209- where the VMs will be stored (required)
210- target_resource_group_id (str): Specifies the target resource
211- group ARM ID where the migrated VM resources will reside
212- (required)
213- target_vm_name (str): Specifies the name of the VM to be created
214- (required)
215- source_appliance_name (str): Specifies the source appliance name
216- for the AzLocal scenario (required)
217- target_appliance_name (str): Specifies the target appliance name
218- for the AzLocal scenario (required)
219- machine_id (str, optional): Specifies the machine ARM ID of the
220- discovered server to be migrated (required if machine_index
221- not provided)
222- machine_index (int, optional): Specifies the index of the
223- discovered server from the list (1-based, required if
224- machine_id not provided)
225- project_name (str, optional): Specifies the migrate project name
226- (required when using machine_index)
227- resource_group (str, optional): Specifies the resource group
228- name (required when using machine_index)
229- target_vm_cpu_core (int, optional): Specifies the number of CPU
230- cores
231- target_virtual_switch_id (str, optional): Specifies the logical
232- network ARM ID that the VMs will use (required for default
233- user mode)
234- target_test_virtual_switch_id (str, optional): Specifies the test
235- logical network ARM ID that the VMs will use
236- is_dynamic_memory_enabled (str, optional): Specifies if RAM is
237- dynamic or not. Valid values: 'true', 'false'
238- target_vm_ram (int, optional): Specifies the target RAM size in
239- MB
240- disk_to_include (list, optional): Specifies the disks on the
241- source server to be included for replication (power user
242- mode)
243- nic_to_include (list, optional): Specifies the NICs on the source
244- server to be included for replication (power user mode)
245- os_disk_id (str, optional): Specifies the operating system disk
246- for the source server to be migrated (required for default
247- user mode)
248- subscription_id (str, optional): Azure Subscription ID. Uses
249- current subscription if not provided
250-
251- Returns:
252- dict: The job model from the API response
253-
254- Raises:
255- CLIError: If required parameters are missing or validation fails
256- """
257144 from azext_migrate .helpers ._utils import SiteTypes
258145 from azext_migrate .helpers .replication .new ._validate import (
259146 validate_server_parameters ,
@@ -482,29 +369,6 @@ def get_local_replication_job(cmd,
482369 project_name = None ,
483370 job_name = None ,
484371 subscription_id = None ):
485- """
486- Retrieve the status of an Azure Migrate job.
487-
488- This cmdlet is based on a preview API version and may experience
489- breaking changes in future releases.
490-
491- Args:
492- cmd: The CLI command context
493- job_id (str, optional): Specifies the job ARM ID for which
494- the details need to be retrieved
495- resource_group (str, optional): The name of the resource
496- group where the recovery services vault is present
497- project_name (str, optional): The name of the migrate project
498- job_name (str, optional): Job identifier/name
499- subscription_id (str, optional): Azure Subscription ID. Uses
500- current subscription if not provided
501-
502- Returns:
503- dict or list: Job details (single job or list of jobs)
504-
505- Raises:
506- CLIError: If required parameters are missing or the job is not found
507- """
508372 from azure .cli .core .commands .client_factory import \
509373 get_subscription_id
510374 from azext_migrate .helpers .replication .job ._parse import (
@@ -554,26 +418,6 @@ def list_local_server_replications(cmd,
554418 resource_group = None ,
555419 project_name = None ,
556420 subscription_id = None ):
557- """
558- List all protected items (replicating servers) in an Azure Migrate project.
559-
560- This cmdlet is based on a preview API version and may experience
561- breaking changes in future releases.
562-
563- Args:
564- cmd: The CLI command context
565- resource_group (str, optional): The name of the resource group where
566- the migrate project is present (required)
567- project_name (str, optional): The name of the migrate project (required)
568- subscription_id (str, optional): Azure Subscription ID. Uses
569- current subscription if not provided
570-
571- Returns:
572- list: List of protected items with their replication status
573-
574- Raises:
575- CLIError: If required parameters are missing or the vault is not found
576- """
577421 from azure .cli .core .commands .client_factory import \
578422 get_subscription_id
579423 from azext_migrate .helpers .replication .list ._execute_list import (
@@ -605,31 +449,6 @@ def get_local_server_replication(cmd,
605449 resource_group = None ,
606450 project_name = None ,
607451 subscription_id = None ):
608- """
609- Get details of a specific replicating server.
610-
611- This cmdlet is based on a preview API version and may experience
612- breaking changes in future releases.
613-
614- Args:
615- cmd: The CLI command context
616- protected_item_name (str, optional): The name of the protected item
617- protected_item_id (str, optional): The full ARM resource ID of the
618- protected item
619- resource_group (str, optional): The name of the resource group where
620- the migrate project is present (required if using protected_item_name)
621- project_name (str, optional): The name of the migrate project
622- (required if using protected_item_name)
623- subscription_id (str, optional): Azure Subscription ID. Uses
624- current subscription if not provided
625-
626- Returns:
627- dict: Detailed information about the protected item
628-
629- Raises:
630- CLIError: If required parameters are missing or the protected item
631- is not found
632- """
633452 from azure .cli .core .commands .client_factory import \
634453 get_subscription_id
635454 from azext_migrate .helpers .replication .get ._execute_get import (
@@ -664,28 +483,6 @@ def remove_local_server_replication(cmd,
664483 target_object_id ,
665484 force_remove = False ,
666485 subscription_id = None ):
667- """
668- Stop replication for a migrated server.
669-
670- This cmdlet is based on a preview API version and may experience
671- breaking changes in future releases.
672-
673- Args:
674- cmd: The CLI command context
675- target_object_id (str): Specifies the replicating server ARM ID
676- for which replication needs to be disabled (required)
677- force_remove (bool, optional): Specifies whether the replication
678- needs to be force removed. Default is False
679- subscription_id (str, optional): Azure Subscription ID. Uses
680- current subscription if not provided
681-
682- Returns:
683- dict: The job model from the API response
684-
685- Raises:
686- CLIError: If the protected item is not found or cannot be
687- removed in its current state
688- """
689486 from azure .cli .core .commands .client_factory import \
690487 get_subscription_id
691488 from azext_migrate .helpers .replication .remove ._parse import (
@@ -720,39 +517,12 @@ def start_local_server_migration(cmd,
720517 protected_item_id = None ,
721518 turn_off_source_server = False ,
722519 subscription_id = None ):
723- """
724- Start migration for a local server.
725-
726- This cmdlet is based on a preview API version and may experience
727- breaking changes in future releases.
728-
729- Args:
730- cmd: The CLI command context
731- protected_item_name (str, optional): The name of the protected item
732- protected_item_id (str, optional): The full ARM resource ID of the
733- protected item
734- resource_group (str, optional): The name of the resource group where
735- the migrate project is present (required if using protected_item_name)
736- project_name (str, optional): The name of the migrate project
737- (required if using protected_item_name)
738- turn_off_source_server (bool, optional): Specifies whether the source
739- server should be turned off post migration. Default is False
740- subscription_id (str, optional): Azure Subscription ID. Uses
741- current subscription if not provided
742-
743- Returns:
744- dict: Job model representing the migration operation
745-
746- Raises:
747- CLIError: If required parameters are missing or the protected item
748- is not found or cannot be migrated
749- """
750520 from azure .cli .core .commands .client_factory import \
751521 get_subscription_id
752- from azext_migrate .helpers .replication . migrate ._parse import (
522+ from azext_migrate .helpers .migration . start ._parse import (
753523 parse_protected_item_id
754524 )
755- from azext_migrate .helpers .replication . migrate ._execute_migrate import (
525+ from azext_migrate .helpers .migration . start ._execute_migrate import (
756526 execute_migration
757527 )
758528
0 commit comments