Skip to content

Commit bf91842

Browse files
committed
incorporating CR comments
1 parent 9c9a87a commit bf91842

File tree

5 files changed

+7
-28
lines changed

5 files changed

+7
-28
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,12 @@ public override void ExecuteCmdlet()
5151
{
5252
try
5353
{
54+
string sourceDeviceIdentifierInMessage = string.IsNullOrEmpty(DeviceName) ? DeviceId : DeviceName;
55+
string targetDeviceIdentifierInMessage = string.IsNullOrEmpty(TargetDeviceName) ? TargetDeviceId : TargetDeviceName;
5456
ConfirmAction(
5557
Force.IsPresent,
56-
string.Format(Resources.StartDeviceFailoverJobWarningMessage, DeviceName, TargetDeviceName),
57-
string.Format(Resources.StartDeviceFailoverJobMessage, DeviceName, TargetDeviceName),
58+
string.Format(Resources.StartDeviceFailoverJobWarningMessage, sourceDeviceIdentifierInMessage, targetDeviceIdentifierInMessage),
59+
string.Format(Resources.StartDeviceFailoverJobMessage, sourceDeviceIdentifierInMessage, targetDeviceIdentifierInMessage),
5860
string.Empty,
5961
() =>
6062
{

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

Lines changed: 0 additions & 9 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: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,4 @@
438438
<data name="SuccessMessageSubmitDeviceJob" xml:space="preserve">
439439
<value>The {0} job is triggered successfully. Please use the command Get-AzureStorSimpleJob -InstanceId {1} for tracking the job's status</value>
440440
</data>
441-
<data name="FailureMessageSubmitDeviceJob" xml:space="preserve">
442-
<value>The {0} job failed to submit. </value>
443-
</data>
444441
</root>

src/ServiceManagement/StorSimple/Commands.StorSimple/ServiceClients/StorSimpleDeviceFailoverClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public partial class StorSimpleClient
2525
{
2626
public DataContainerGroupsGetResponse GetFaileoverDataContainerGroups(string deviceId)
2727
{
28-
return this.GetStorSimpleClient().DeviceFailover.ListDCGroups(deviceId, this.GetCustomRequestHeaders());
28+
return GetStorSimpleClient().DeviceFailover.ListDCGroups(deviceId, this.GetCustomRequestHeaders());
2929
}
3030

3131
public JobResponse TriggerFailover(string deviceId, DeviceFailoverRequest drRequest)

src/ServiceManagement/StorSimple/Commands.StorSimple/StorSimpleCmdletBase.cs

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,8 @@ internal virtual void HandleAsyncTaskResponse(AzureOperationResponse opResponse,
9494

9595
internal virtual void HandleDeviceJobResponse(JobResponse jobResponse, string operationName)
9696
{
97-
string msg = string.Empty;
98-
99-
if (jobResponse.StatusCode != HttpStatusCode.Accepted && jobResponse.StatusCode != HttpStatusCode.OK)
100-
{
101-
msg = string.Format(Resources.FailureMessageSubmitDeviceJob, operationName);
102-
}
103-
104-
else
105-
{
106-
msg = string.Format(Resources.SuccessMessageSubmitDeviceJob, operationName, jobResponse.JobId);
107-
WriteObject(jobResponse.JobId);
108-
}
109-
97+
string msg = string.Format(Resources.SuccessMessageSubmitDeviceJob, operationName, jobResponse.JobId);
98+
WriteObject(jobResponse.JobId);
11099
WriteVerbose(msg);
111100
}
112101

0 commit comments

Comments
 (0)