Skip to content

Commit 2bb7860

Browse files
committed
Merge pull request #10 from AzCiS/onesdk-avirupch
Fix for bug 1818487
2 parents 906cc9a + c36d8a8 commit 2bb7860

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
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: 9 additions & 0 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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,4 +501,7 @@
501501
<data name="InvalidInterfaceId" xml:space="preserve">
502502
<value>{0} is not a valid InterfaceAlias!</value>
503503
</data>
504+
<data name="DeviceFailoverSourceAndTargetDeviceSameError" xml:space="preserve">
505+
<value>Source and Target device in a failover operation can not be the same.</value>
506+
</data>
504507
</root>

0 commit comments

Comments
 (0)