diff --git a/src/migrate/HISTORY.rst b/src/migrate/HISTORY.rst index 19d5e0d478a..bd2edf06b3f 100644 --- a/src/migrate/HISTORY.rst +++ b/src/migrate/HISTORY.rst @@ -2,6 +2,10 @@ Release History =============== +3.0.0b5 ++++++++++++++++ +* Change migrate command parameter name. + 3.0.0b4 +++++++++++++++ * Fix edge case bugs in az migrate local replication init & new commands. diff --git a/src/migrate/azext_migrate/_help.py b/src/migrate/azext_migrate/_help.py index d0b02d6d962..38607ab9b11 100644 --- a/src/migrate/azext_migrate/_help.py +++ b/src/migrate/azext_migrate/_help.py @@ -558,7 +558,7 @@ Note: This command uses a preview API version and may experience breaking changes in future releases. parameters: - - name: --protected-item-id + - name: --target-object-id short-summary: Full ARM resource ID of the protected item to migrate. long-summary: > The complete ARM resource ID of the replicating server. @@ -581,11 +581,11 @@ - name: Start migration for a protected item text: | az migrate local start-migration \\ - --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" + --target-object-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" - name: Start migration and turn off source server text: | az migrate local start-migration \\ - --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \\ + --target-object-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \\ --turn-off-source-server - name: Start migration using short parameter names text: | @@ -595,6 +595,6 @@ - name: Start migration with specific subscription text: | az migrate local start-migration \\ - --protected-item-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \\ + --target-object-id "/subscriptions/xxxx/resourceGroups/myRG/providers/Microsoft.DataReplication/replicationVaults/myVault/protectedItems/myItem" \\ --subscription-id "12345678-1234-1234-1234-123456789012" """ diff --git a/src/migrate/azext_migrate/_params.py b/src/migrate/azext_migrate/_params.py index 8f9dfbd3283..a9569f42295 100644 --- a/src/migrate/azext_migrate/_params.py +++ b/src/migrate/azext_migrate/_params.py @@ -259,7 +259,7 @@ def load_arguments(self, _): with self.argument_context('migrate local start-migration') as c: c.argument( 'protected_item_id', - options_list=['--protected-item-id', '--id'], + options_list=['--target-object-id', '--id'], help='The full ARM resource ID of the protected item to migrate. ' 'This can be obtained from the list or get replication commands.', required=True) diff --git a/src/migrate/azext_migrate/custom.py b/src/migrate/azext_migrate/custom.py index dc2069836f0..26d366ee1b2 100644 --- a/src/migrate/azext_migrate/custom.py +++ b/src/migrate/azext_migrate/custom.py @@ -533,7 +533,7 @@ def start_local_server_migration(cmd, # Validate that either ID or name is provided if not protected_item_id: raise CLIError( - "The --protected-item-id parameter must be provided." + "The --target-object-id parameter must be provided." ) # Determine the operation mode diff --git a/src/migrate/azext_migrate/tests/latest/test_migrate_commands.py b/src/migrate/azext_migrate/tests/latest/test_migrate_commands.py index 7d93a18a8d4..e38513085c7 100644 --- a/src/migrate/azext_migrate/tests/latest/test_migrate_commands.py +++ b/src/migrate/azext_migrate/tests/latest/test_migrate_commands.py @@ -5193,7 +5193,7 @@ def test_start_migration_with_protected_item_name(self, mock_get_sub_id, ) # Verify error message - self.assertIn("--protected-item-id parameter must be provided", + self.assertIn("--target-object-id parameter must be provided", str(context.exception)) @mock.patch('azure.cli.core.commands.client_factory.get_subscription_id') @@ -5208,7 +5208,7 @@ def test_start_migration_missing_parameters(self, mock_get_sub_id): with self.assertRaises(CLIError) as context: start_local_server_migration(cmd=mock_cmd) - self.assertIn("--protected-item-id parameter must be provided", + self.assertIn("--target-object-id parameter must be provided", str(context.exception)) @mock.patch('azure.cli.core.commands.client_factory.get_subscription_id') @@ -5225,7 +5225,7 @@ def test_start_migration_name_without_resource_group(self, mock_get_sub_id): cmd=mock_cmd ) - self.assertIn("--protected-item-id parameter must be provided", + self.assertIn("--target-object-id parameter must be provided", str(context.exception)) @mock.patch('azext_migrate.helpers._utils.get_resource_by_id') diff --git a/src/migrate/setup.py b/src/migrate/setup.py index 45fdc92f64d..01338ff061c 100644 --- a/src/migrate/setup.py +++ b/src/migrate/setup.py @@ -7,7 +7,7 @@ from setuptools import setup, find_packages -VERSION = "3.0.0b4" +VERSION = "3.0.0b5" CLASSIFIERS = [ 'Development Status :: 4 - Beta',