Skip to content

Commit f827ad0

Browse files
committed
Fix for bug 1818487
1 parent d3a9bd5 commit f827ad0

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

src/ServiceManagement/StorSimple/Commands.StorSimple/Cmdlets/Failover/StartAzureStorSimpleDeviceFailoverJob.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,19 @@ public override void ExecuteCmdlet()
8787
break;
8888
}
8989

90-
if (String.IsNullOrEmpty(deviceId) || string.IsNullOrEmpty(targetDeviceId))
90+
if (string.IsNullOrEmpty(deviceId) || string.IsNullOrEmpty(targetDeviceId))
9191
{
9292
WriteObject(null);
9393
return;
9494
}
9595

96+
if(deviceId.Equals(targetDeviceId, StringComparison.InvariantCultureIgnoreCase))
97+
{
98+
WriteVerbose(Resources.DeviceFailoverSourceAndTargetDeviceSameError);
99+
WriteObject(null);
100+
return;
101+
}
102+
96103
var vcIdList = StorSimpleClient.GetVcIdListFromVcGroups(VolumecontainerGroups);
97104

98105
var drRequest = new DeviceFailoverRequest()

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

Lines changed: 10 additions & 1 deletion
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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,4 +444,7 @@
444444
<data name="StartASSBackupCloneJobWarningMessage" xml:space="preserve">
445445
<value>Are you sure you want to clone the backup with backupId {0}?</value>
446446
</data>
447+
<data name="DeviceFailoverSourceAndTargetDeviceSameError" xml:space="preserve">
448+
<value>Source and Target device in a failover operation can not be the same.</value>
449+
</data>
447450
</root>

0 commit comments

Comments
 (0)