Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Az.Migrate support new Data.Replication #23615

Merged
Merged
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
117 changes: 108 additions & 9 deletions src/Migrate/Migrate.Autorest/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,10 @@ commit: 0dd49a444195fef7f3555cad038cb7665cbd928c
require:
- $(this-folder)/../../readme.azure.noprofile.md
input-file:
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/service.json
- $(repo)/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json
- $(repo)/specification/migrateprojects/resource-manager/Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
- $(repo)/specification/recoveryservicessiterecovery/resource-manager/Microsoft.RecoveryServices/stable/2023-01-01/service.json
- $(repo)/specification/recoveryservicesdatareplication/resource-manager/Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json

module-version: 1.0.1
title: Migrate
Expand Down Expand Up @@ -105,6 +106,22 @@ directive:
- ProtectionContainerMappingProviderSpecificDetails
- MigrateProjectProperties
- FabricProperties
- FabricModelProperties
- FabricModelCustomProperties
- AzStackHCIFabricModelCustomProperties
- HyperVMigrateFabricModelCustomProperties
- VMwareMigrateFabricModelCustomProperties
- PolicyModelProperties
- ReplicationExtensionModelProperties
- ProtectedItemModelProperties
- ProtectedItemModelCustomProperties
- HyperVToAzStackHCIProtectedItemModelCustomProperties
- VMwareToAzStackHCIProtectedItemModelCustomProperties
- PlannedFailoverModelProperties
- WorkflowModelProperties
- WorkflowModelCustomProperties
- TaskModel
- TaskModelCustomProperties
# Remove variants not in scope
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
Expand Down Expand Up @@ -224,10 +241,6 @@ directive:
verb: New$|Remove$|Update$
subject: ^Site
remove: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
subject: ^HyperV
remove: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
subject: ^Job|^VMwareOperationsStatus
Expand All @@ -244,7 +257,12 @@ directive:
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
where:
verb: Set$|Remove$|Update$
subject: ^Solution|ProjectSummary$
subject: ProjectSummary$
remove: true
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
where:
verb: Remove$|Update$
subject: ^Solution
remove: true
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
where:
Expand All @@ -261,7 +279,7 @@ directive:
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
subject: ^Commit|^Planned|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
subject: ^Commit|^Renew|^Reprotect|^Unplanned|VaultHealth$|ComputeSize$|FabricConsistency$
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
Expand Down Expand Up @@ -298,7 +316,74 @@ directive:
verb: New
subject: ^ReplicationVaultSetting|^SupportedOperatingSystem|^ReplicationProtectionIntent
remove: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
verb: Get
subject: ^HyperV(Cluster|Host|Job|OperationsStatus)$
remove: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
verb: Set
subject: ^HyperV(Cluster|Host)$
remove: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
verb: New|Remove|Update
subject: ^HyperV
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Test|Invoke
subject: NameAvailability$|DeploymentPreflight
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Get|New
subject: ^EmailConfiguration
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Get
subject: ^(Dra|ProtectedItem|Vault|Workflow)OperationStatus$
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Get
subject: ^FabricOperationsStatus$
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: New
subject: ^(Dra|Vault)
remove: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Update
subject: ^Vault
remove: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
verb: Invoke
subject: ^PlannedReplication
remove: true
# Rename cmdlets for AzStackHCI
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Get
subject: ^Fabric$
set:
subject: HCIReplicationFabric
# Hide cmldets used by custom
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
where:
verb: Set$
subject: ^Solution
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
verb: Get$
subject: ToAzureMigrate$
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
verb: Get$
Expand Down Expand Up @@ -344,6 +429,15 @@ directive:
verb: Resume$
subject: ^ReplicationMigrationItemReplication
hide: true
- from: Microsoft.RecoveryServices/stable/2023-01-01/service.json
where:
subject: ^Planned
hide: true
- from: Microsoft.OffAzure/stable/2020-01-01/migrate.json
where:
verb: Get
subject: ^HyperV(Site|RunAsAccount)$
hide: true
# Hide cmdlets not to be visible to user.
- from: Microsoft.Migrate/preview/2018-09-01-preview/migrate.json
where:
Expand Down Expand Up @@ -373,6 +467,11 @@ directive:
verb: New$
variant: ^CreateViaIdentity
hide: true
- from: Microsoft.DataReplication/preview/2021-02-16-preview/recoveryservicesdatareplication.json
where:
verb: Get$|Invoke$|New$|Remove$|Test$|Update$
subject: ^Dra|^Fabric|^Policy|^EmailConfiguration|^ProtectedItem|^ReplicationExtension|^Vault|^Workflow
hide: true
- where:
verb: New$|Set$|Update$
subject: Site$|VCenter$
Expand Down
40 changes: 40 additions & 0 deletions src/Migrate/Migrate.Autorest/custom/AzStackHCIDiskInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview
{
public class AzStackHCIDiskInput
{
public AzStackHCIDiskInput(
string diskId,
bool isDynamic,
long diskSizeGB,
string diskFileFormat,
bool isOsDisk)
{
DiskId = diskId;
IsDynamic = isDynamic;
DiskSizeGb = diskSizeGB;
DiskFileFormat = diskFileFormat;
IsOSDisk = isOsDisk;
}

/// <summary>Gets or sets the type of the virtual hard disk, vhd or vhdx.</summary>
public string DiskFileFormat { get; set; }

/// <summary>Gets or sets the disk Id.</summary>
public string DiskId { get; set; }

/// <summary>Gets or sets the disk size in GB.</summary>
public long DiskSizeGb { get; set; }

/// <summary>
/// Gets or sets a value indicating whether dynamic sizing is enabled on the virtual hard
/// disk.
/// </summary>
public bool? IsDynamic { get; set; }

/// <summary>Gets or sets a value indicating whether disk is os disk.</summary>
public bool IsOSDisk { get; set; }
}
}
32 changes: 32 additions & 0 deletions src/Migrate/Migrate.Autorest/custom/AzStackHCINicInput.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

namespace Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20210216Preview
{
public class AzStackHCINicInput
{
public AzStackHCINicInput(
string nicId,
string targetNetworkId,
string testNetworkId,
string selectionTypeForFailover)
{
NicId = nicId;
TargetNetworkId = targetNetworkId;
TestNetworkId = testNetworkId;
SelectionTypeForFailover = selectionTypeForFailover;
}

/// <summary>Gets or sets the NIC Id.</summary>
public string NicId { get; set; }

/// <summary>Gets or sets the target network Id within AzStackHCI Cluster.</summary>
public string TargetNetworkId { get; set; }

/// <summary>Gets or sets the target test network Id within AzStackHCI Cluster.</summary>
public string TestNetworkId { get; set; }

/// <summary>Gets or sets the selection type of the NIC.</summary>
public string SelectionTypeForFailover { get; set; }
}
}
Loading
Loading