Skip to content

Commit 1c76c97

Browse files
minhsuanleeSam LeeHelen Afework
authored
Az.Migrate support new Data.Replication (#23615)
* Support new scenario in Az.Migrate * Added retry on get machine site. * Add READMEs * Revert changes --------- Co-authored-by: Sam Lee <[email protected]> Co-authored-by: Helen Afework <[email protected]>
1 parent 0faaaad commit 1c76c97

File tree

94 files changed

+9892
-489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+9892
-489
lines changed

src/Migrate/Migrate.Autorest/README.md

Lines changed: 108 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ commit: 0dd49a444195fef7f3555cad038cb7665cbd928c
5252
require:
5353
- $(this-folder)/../../readme.azure.noprofile.md
5454
input-file:
55-
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
56-
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
57-
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/service.json
55+
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
56+
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
57+
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/service.json
58+
- $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
5859

5960
module-version: 1.0.1
6061
title: Migrate
@@ -105,6 +106,22 @@ directive:
105106
- ProtectionContainerMappingProviderSpecificDetails
106107
- MigrateProjectProperties
107108
- FabricProperties
109+
- FabricModelProperties
110+
- FabricModelCustomProperties
111+
- AzStackHCIFabricModelCustomProperties
112+
- HyperVMigrateFabricModelCustomProperties
113+
- VMwareMigrateFabricModelCustomProperties
114+
- PolicyModelProperties
115+
- ReplicationExtensionModelProperties
116+
- ProtectedItemModelProperties
117+
- ProtectedItemModelCustomProperties
118+
- HyperVToAzStackHCIProtectedItemModelCustomProperties
119+
- VMwareToAzStackHCIProtectedItemModelCustomProperties
120+
- PlannedFailoverModelProperties
121+
- WorkflowModelProperties
122+
- WorkflowModelCustomProperties
123+
- TaskModel
124+
- TaskModelCustomProperties
108125
# Remove variants not in scope
109126
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
110127
where:
@@ -224,10 +241,6 @@ directive:
224241
verb: New$|Remove$|Update$
225242
subject: ^Site
226243
remove: true
227-
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
228-
where:
229-
subject: ^HyperV
230-
remove: true
231244
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
232245
where:
233246
subject: ^Job|^VMwareOperationsStatus
@@ -244,7 +257,12 @@ directive:
244257
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
245258
where:
246259
verb: Set$|Remove$|Update$
247-
subject: ^Solution|ProjectSummary$
260+
subject: ProjectSummary$
261+
remove: true
262+
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
263+
where:
264+
verb: Remove$|Update$
265+
subject: ^Solution
248266
remove: true
249267
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
250268
where:
@@ -261,7 +279,7 @@ directive:
261279
remove: true
262280
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
263281
where:
264-
subject: ^Commit|^Planned|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
282+
subject: ^Commit|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
265283
remove: true
266284
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
267285
where:
@@ -298,7 +316,74 @@ directive:
298316
verb: New
299317
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
300318
remove: true
319+
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
320+
where:
321+
verb: Get
322+
subject: ^HyperV(Cluster|Host|Job|OperationsStatus)$
323+
remove: true
324+
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
325+
where:
326+
verb: Set
327+
subject: ^HyperV(Cluster|Host)$
328+
remove: true
329+
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
330+
where:
331+
verb: New|Remove|Update
332+
subject: ^HyperV
333+
remove: true
334+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
335+
where:
336+
verb: Test|Invoke
337+
subject: NameAvailability$|DeploymentPreflight
338+
remove: true
339+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
340+
where:
341+
verb: Get|New
342+
subject: ^EmailConfiguration
343+
remove: true
344+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
345+
where:
346+
verb: Get
347+
subject: ^(Dra|ProtectedItem|Vault|Workflow)OperationStatus$
348+
remove: true
349+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
350+
where:
351+
verb: Get
352+
subject: ^FabricOperationsStatus$
353+
remove: true
354+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
355+
where:
356+
verb: New
357+
subject: ^(Dra|Vault)
358+
remove: true
359+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
360+
where:
361+
verb: Update
362+
subject: ^Vault
363+
remove: true
364+
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
365+
where:
366+
verb: Invoke
367+
subject: ^PlannedReplication
368+
remove: true
369+
# Rename cmdlets for AzStackHCI
370+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
371+
where:
372+
verb: Get
373+
subject: ^Fabric$
374+
set:
375+
subject: HCIReplicationFabric
301376
# Hide cmldets used by custom
377+
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
378+
where:
379+
verb: Set$
380+
subject: ^Solution
381+
hide: true
382+
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
383+
where:
384+
verb: Get$
385+
subject: ToAzureMigrate$
386+
hide: true
302387
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
303388
where:
304389
verb: Get$
@@ -344,6 +429,15 @@ directive:
344429
verb: Resume$
345430
subject: ^ReplicationMigrationItemReplication
346431
hide: true
432+
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
433+
where:
434+
subject: ^Planned
435+
hide: true
436+
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
437+
where:
438+
verb: Get
439+
subject: ^HyperV(Site|RunAsAccount)$
440+
hide: true
347441
# Hide cmdlets not to be visible to user.
348442
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
349443
where:
@@ -373,6 +467,11 @@ directive:
373467
verb: New$
374468
variant: ^CreateViaIdentity
375469
hide: true
470+
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
471+
where:
472+
verb: Get$|Invoke$|New$|Remove$|Test$|Update$
473+
subject: ^Dra|^Fabric|^Policy|^EmailConfiguration|^ProtectedItem|^ReplicationExtension|^Vault|^Workflow
474+
hide: true
376475
- where:
377476
verb: New$|Set$|Update$
378477
subject: Site$|VCenter$
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview
5+
{
6+
public class AzStackHCIDiskInput
7+
{
8+
public AzStackHCIDiskInput(
9+
string diskId,
10+
bool isDynamic,
11+
long diskSizeGB,
12+
string diskFileFormat,
13+
bool isOsDisk)
14+
{
15+
DiskId = diskId;
16+
IsDynamic = isDynamic;
17+
DiskSizeGb = diskSizeGB;
18+
DiskFileFormat = diskFileFormat;
19+
IsOSDisk = isOsDisk;
20+
}
21+
22+
/// <summary>Gets or sets the type of the virtual hard disk, vhd or vhdx.</summary>
23+
public string DiskFileFormat { get; set; }
24+
25+
/// <summary>Gets or sets the disk Id.</summary>
26+
public string DiskId { get; set; }
27+
28+
/// <summary>Gets or sets the disk size in GB.</summary>
29+
public long DiskSizeGb { get; set; }
30+
31+
/// <summary>
32+
/// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard
33+
/// disk.
34+
/// </summary>
35+
public bool? IsDynamic { get; set; }
36+
37+
/// <summary>Gets or sets a value indicating whether disk is os disk.</summary>
38+
public bool IsOSDisk { get; set; }
39+
}
40+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License. See License.txt in the project root for license information.
3+
4+
namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview
5+
{
6+
public class AzStackHCINicInput
7+
{
8+
public AzStackHCINicInput(
9+
string nicId,
10+
string targetNetworkId,
11+
string testNetworkId,
12+
string selectionTypeForFailover)
13+
{
14+
NicId = nicId;
15+
TargetNetworkId = targetNetworkId;
16+
TestNetworkId = testNetworkId;
17+
SelectionTypeForFailover = selectionTypeForFailover;
18+
}
19+
20+
/// <summary>Gets or sets the NIC Id.</summary>
21+
public string NicId { get; set; }
22+
23+
/// <summary>Gets or sets the target network Id within AzStackHCI Cluster.</summary>
24+
public string TargetNetworkId { get; set; }
25+
26+
/// <summary>Gets or sets the target test network Id within AzStackHCI Cluster.</summary>
27+
public string TestNetworkId { get; set; }
28+
29+
/// <summary>Gets or sets the selection type of the NIC.</summary>
30+
public string SelectionTypeForFailover { get; set; }
31+
}
32+
}

0 commit comments

Comments
 (0)