Skip to content

Commit 88a36a4

Browse files
committed
String case match for data container names, MigrationPlanNoConfig parameter value change, convert MigrationPlanNoConfig message to warning
1 parent 91fdda1 commit 88a36a4

7 files changed

+11
-10
lines changed

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Migration/GetAzureStorSimpleLegacyVolumeContainerConfirmStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public override void ExecuteCmdlet()
4242
{
4343
var legacyContainerNameList = LegacyContainerNames.ToList();
4444
confirmStatus.ContainerConfirmStatus = confirmStatus.ContainerConfirmStatus.ToList().FindAll(
45-
status => legacyContainerNameList.Contains(status.CloudConfigurationName));
45+
status => legacyContainerNameList.Contains(status.CloudConfigurationName, StringComparer.OrdinalIgnoreCase));
4646
}
4747
}
4848

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Migration/GetAzureStorSimpleLegacyVolumeContainerMigrationPlan.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public override void ExecuteCmdlet()
4141
var migrationPlanList = StorSimpleClient.GetAllMigrationPlan();
4242
if (migrationPlanList.MigrationPlans.Count == 0)
4343
{
44-
throw new ArgumentException(Resources.MigrationPlanNoConfigs);
44+
WriteWarning(Resources.MigrationPlanNoConfigs);
4545
}
4646
else
4747
{
@@ -68,7 +68,7 @@ public override void ExecuteCmdlet()
6868
var legacyContainerNamesList = LegacyContainerNames.ToList();
6969
migrationPlan.MigrationPlanInfo =
7070
migrationPlan.MigrationPlanInfo.ToList().FindAll(
71-
plan => legacyContainerNamesList.Contains(plan.DataContainerName));
71+
plan => legacyContainerNamesList.Contains(plan.DataContainerName, StringComparer.OrdinalIgnoreCase));
7272
}
7373

7474
var migrationPlanMsg = new MigrationPlanMsg(migrationPlan);

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Migration/GetAzureStorSimpleLegacyVolumeContainerStatus.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ public override void ExecuteCmdlet()
4141
overallMigrationStatusList.MigrationDataContainerStatuses.ToList();
4242
if (null != LegacyContainerNames && 0 < LegacyContainerNames.Length)
4343
{
44-
List<string> containerNameList = LegacyContainerNames.ToList();
44+
45+
var containerNameList = LegacyContainerNames.ToList();
4546
migrationDataContainerStatusList = migrationDataContainerStatusList.ToList().FindAll(
46-
status => containerNameList.Contains(status.CloudConfigurationName));
47+
status => containerNameList.Contains(status.CloudConfigurationName, StringComparer.OrdinalIgnoreCase));
4748
}
4849

4950
var migrationStatus = new DataContainerMigrationStatus(

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Migration/ImportAzureStorSimpleLegacyVolumeContainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public override void ExecuteCmdlet()
4646
{
4747
var importDataContainerRequest = new MigrationImportDataContainerRequest();
4848
importDataContainerRequest.DataContainerNames = (null != LegacyContainerNames)
49-
? new List<string>(LegacyContainerNames.ToList().Distinct())
49+
? new List<string>(LegacyContainerNames.ToList().Distinct(StringComparer.OrdinalIgnoreCase))
5050
: new List<string>();
5151
importDataContainerRequest.ForceOnOtherDevice = Force.IsPresent;
5252
importDataContainerRequest.SkipACRs = SkipACRs.IsPresent;

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Migration/StartAzureStorSimpleLegacyVolumeContainerMigrationPlan.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public override void ExecuteCmdlet()
4040
var startMigrationPlanRequest = new MigrationPlanStartRequest();
4141
startMigrationPlanRequest.ConfigId = LegacyConfigId;
4242
startMigrationPlanRequest.DataContainerNameList = (null != LegacyContainerNames)
43-
? new List<string>(LegacyContainerNames.ToList().Distinct())
43+
? new List<string>(LegacyContainerNames.ToList().Distinct(StringComparer.OrdinalIgnoreCase))
4444
: new List<string>();
4545

4646
var status = StorSimpleClient.StartLegacyVolumeContainerMigrationPlan(startMigrationPlanRequest);

src/ServiceManagement/StorSimple/Commands.StorSimple/Properties/Resources.Designer.cs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ServiceManagement/StorSimple/Commands.StorSimple/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ a special character</value>
566566
<value>Import started. You can check the import status with Get-AzureStorSimpleLegacyVolumeContainerStatus cmdlet.</value>
567567
</data>
568568
<data name="MigrationPlanNoConfigs" xml:space="preserve">
569-
<value>There are no configs on the resource.</value>
569+
<value>No ConfigFile imported.</value>
570570
</data>
571571
<data name="MigrationPlanNotFound" xml:space="preserve">
572572
<value>No migration plan found corresponding to the LegacyConfigId.</value>

0 commit comments

Comments
 (0)