You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Az.Migrate] Adding Tagging, CRN feature for Migrate and few fixes (#15520)
* move to 2021 swagger
* Changing default recovery for CBT
* Azure Migrate Initialize Replication Infrastructure UserObject cmdlet fix
* Included SQL License Type and Resource Tagging Feature
* Simplified Set-AzMigrateServerReplication.ps1 to avoid repetition of code
* Few fixes in Set-AzMigrateServerReplication.ps1
* Changes in New-AzMigrateServerReplication.ps1
* Changed Variable Name
* Removed SeedDiskTag
* Updated SQL Server License Type Summary and fixed tag Count issue.
* Adding CRN feature.
* Error msg change
* Recorded tests
* Tagging change as per design review
* Adding error msg when tag key is passed as empty string
* Fix in Nickname spelling
* add breaking change and signature suppression
* Test fixed
Co-authored-by: Prachetos Sadhukhan <[email protected]>
Co-authored-by: Yeming Liu <[email protected]>
if ($null-eq$sdsSolution.DetailExtendedDetail["applianceNameToSiteIdMapV2"] -And
@@ -225,7 +250,7 @@ public static int hashForArtifact(String artifact)
225
250
if (($existingMapping) -and ($existingMapping.ProviderSpecificDetail.TargetLocation-ne$TargetRegion)) {
226
251
$targetRegionMismatchExceptionMsg=$ProjectName+" is already configured for migrating servers to "+$TargetRegion+". Target Region cannot be modified once configured."
227
252
throw$targetRegionMismatchExceptionMsg
228
-
}
253
+
}
229
254
}
230
255
}
231
256
@@ -241,7 +266,7 @@ public static int hashForArtifact(String artifact)
241
266
242
267
# Phase 1
243
268
# Storage account
244
-
$MigratePrefix="migrate"
269
+
$MigratePrefix="migrate"
245
270
$LogStorageAcName=$MigratePrefix+"lsa"+$hash
246
271
$GateWayStorageAcName=$MigratePrefix+"gwsa"+$hash
247
272
$StorageType="Microsoft.Storage/storageAccounts"
@@ -299,13 +324,13 @@ public static int hashForArtifact(String artifact)
if ($PSBoundParameters.ContainsKey('TargetNicSelectionType')) {
59
65
if ($TargetNicSelectionType-eq'primary') {
@@ -76,6 +82,18 @@ function New-AzMigrateNicMapping {
76
82
if ($PSBoundParameters.ContainsKey('TargetNicIP')) {
77
83
$NicObject.TargetStaticIPAddress=$TargetNicIP
78
84
}
85
+
86
+
if ($PSBoundParameters.ContainsKey('TargetNicName')) {
87
+
if ($TargetNicName.length-gt80-or$TargetNicName.length-eq0) {
88
+
throw"The NIC name must be between 1 and 80 characters long."
89
+
}
90
+
91
+
if ($TargetNicName-notmatch"^[^_\W][a-zA-Z0-9_\-\.]{0,79}(?<![-.])$") {
92
+
throw"The NIC name must begin with a letter or number, end with a letter, number or underscore, and may contain only letters, numbers, underscores, periods, or hyphens."
0 commit comments