Skip to content

Commit 7f45762

Browse files
committed
Bug fixes: 1908985, 1907418, 1898689,1901426
1 parent eca12ce commit 7f45762

10 files changed

+23
-21
lines changed

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/GetAzureRemoteAppCollectionUsageSummary.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureRemoteAppCollectionUsageSummary : RdsCmdlet
2929
Position = 0,
3030
ValueFromPipelineByPropertyName = true,
3131
HelpMessage = "RemoteApp collection name")]
32+
[ValidatePattern(NameValidatorString)]
3233
public string CollectionName { get; set; }
3334

3435
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class UpdateAzureRemoteAppCollection : RdsCmdlet
3434
ValueFromPipelineByPropertyName = true,
3535
HelpMessage = "The name of the RemoteApp template image."
3636
)]
37+
[ValidatePattern(NameValidatorString)]
3738
public string ImageName { get; set; }
3839

3940
public override void ExecuteCmdlet()

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.Designer.cs

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

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.resx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@
216216
<data name="VnetSharedKeyResetCaptionMessage" xml:space="preserve">
217217
<value>This operation will reset the shared key for the VNet's VPN device. This will interrupt connectivity to the on-premises network until you configure the VPN device to use the new shared key.</value>
218218
</data>
219-
<data name="VnetSharedKeyResetConfirmationDescription" xml:space="preserve">
220-
<value>Resetting the VPN shared key</value>
219+
<data name="VnetSharedKeyResetConfirmationDescriptionFormat" xml:space="preserve">
220+
<value>Resetting the VPN shared key on {0}</value>
221221
</data>
222222
<data name="WaitingForStorageVerificationToCompleteMessage" xml:space="preserve">
223223
<value>Waiting for Storage verification to complete</value>

src/ServiceManagement/RemoteApp/Commands.RemoteApp/RemoteProgram/PublishAzureRemoteAppProgram.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2222
{
23-
[Cmdlet(VerbsData.Publish, "AzureRemoteAppProgram", DefaultParameterSetName = AppId), OutputType(typeof(PublishingOperationResult))]
23+
[Cmdlet(VerbsData.Publish, "AzureRemoteAppProgram", DefaultParameterSetName = AppId), OutputType(typeof(PublishingOperationResult), typeof(Job))]
2424
public class PublishAzureRemoteAppProgram : RdsCmdlet
2525
{
2626
private const string AppPath = "App Path";
@@ -129,9 +129,12 @@ public override void ExecuteCmdlet()
129129

130130
task.ProcessJob(() =>
131131
{
132+
task.SetStatus("Publishing Application");
132133
PublishAction();
133134
task.SetStatus("ProcessJob completed");
134135
});
136+
137+
WriteObject(task);
135138
}
136139
else
137140
{

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Vnet/GetAzureRemoteAppVnet.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public class GetAzureRemoteAppVNet : RdsCmdlet
2626
Position = 0,
2727
ValueFromPipeline = true,
2828
HelpMessage = "RemoteApp virtual network name. Wildcards are permitted.")]
29+
[ValidatePattern(VNetNameValidatorStringWithWildCards)]
2930
public string VNetName { get; set; }
3031

3132
[Parameter(Mandatory = false,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Vnet/GetAzureRemoteAppVpnDevice.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public class GetAzureRemoteAppVpnDevice : RdsCmdlet
2525
Position = 0,
2626
ValueFromPipeline = true,
2727
HelpMessage = "RemoteApp virtual network name.")]
28-
[ValidatePattern(VNetNameValidatorStringWithWildCards)]
28+
[ValidatePattern(VNetNameValidatorString)]
2929
public string VNetName { get; set; }
3030

3131
public override void ExecuteCmdlet()

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Vnet/GetAzureRemoteAppVpnDeviceConfigScript.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class GetAzureRemoteAppVpnDeviceConfigScript : RdsCmdlet
2626
Position = 0,
2727
ValueFromPipeline = true,
2828
HelpMessage = "RemoteApp virtual network name.")]
29-
[ValidatePattern(VNetNameValidatorStringWithWildCards)]
29+
[ValidatePattern(VNetNameValidatorString)]
3030
public string VNetName { get; set; }
3131

3232
[Parameter(Mandatory = true,

src/ServiceManagement/RemoteApp/Commands.RemoteApp/Vnet/ResetAzureRemoteAppVpnSharedKey.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.RemoteApp;
1616
using Microsoft.Azure.Management.RemoteApp;
1717
using Microsoft.Azure.Management.RemoteApp.Models;
18+
using System;
1819
using System.Management.Automation;
1920

2021
namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
@@ -23,17 +24,17 @@ namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2324
[Cmdlet(VerbsCommon.Reset, "AzureRemoteAppVpnSharedKey", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact.High), OutputType(typeof(VNet))]
2425
public class ResetAzureRemoteAppVpnSharedKey : RdsCmdlet
2526
{
26-
[Parameter(Mandatory = false,
27+
[Parameter(Mandatory = true,
2728
Position = 0,
2829
ValueFromPipeline = true,
2930
HelpMessage = "RemoteApp virtual network name.")]
30-
[ValidatePattern(VNetNameValidatorStringWithWildCards)]
31+
[ValidatePattern(VNetNameValidatorString)]
3132
public string VNetName { get; set; }
3233

3334
public override void ExecuteCmdlet()
3435
{
3536
OperationResultWithTrackingId response = null;
36-
string description = Commands_RemoteApp.VnetSharedKeyResetConfirmationDescription;
37+
string description = String.Format(Commands_RemoteApp.VnetSharedKeyResetConfirmationDescriptionFormat, VNetName);
3738
string warning = Commands_RemoteApp.GenericAreYouSureQuestion;
3839
string caption = Commands_RemoteApp.VnetSharedKeyResetCaptionMessage;
3940

@@ -62,7 +63,8 @@ public override void ExecuteCmdlet()
6263
VNetResult vnet = CallClient(() => Client.VNet.Get(VNetName, true), Client.VNet);
6364
WriteObject(vnet.VNet);
6465

65-
WriteVerboseWithTimestamp("The request completed successfully.");
66+
WriteVerboseWithTimestamp("The request completed successfully." +
67+
" Call Get-AzureRemoteAppVpnDeviceConfigScript to download the script and pass in the SharedKey returned by this cmdlet");
6668
}
6769
else
6870
{

src/ServiceManagement/RemoteApp/Commands.RemoteApp/WorkSpace/SetAzureRemoteAppWorkspace.cs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
namespace Microsoft.Azure.Management.RemoteApp.Cmdlets
2020
{
21-
[Cmdlet(VerbsCommon.Set, "AzureRemoteAppWorkspace"), OutputType(typeof(TrackingResult))]
21+
[Cmdlet(VerbsCommon.Set, "AzureRemoteAppWorkspace")]
2222
public class SetAzureRemoteAppWorkspace : RdsCmdlet
2323
{
2424
[Parameter(Mandatory = true,
@@ -29,7 +29,6 @@ public class SetAzureRemoteAppWorkspace : RdsCmdlet
2929

3030
public override void ExecuteCmdlet()
3131
{
32-
OperationResultWithTrackingId response = null;
3332
AccountDetailsParameter details = new AccountDetailsParameter()
3433
{
3534
AccountInfo = new AccountDetails()
@@ -38,12 +37,7 @@ public override void ExecuteCmdlet()
3837
}
3938
};
4039

41-
response = CallClient(() => Client.Account.Set(details), Client.Account);
42-
43-
if (response != null)
44-
{
45-
WriteTrackingId(response);
46-
}
40+
CallClient(() => Client.Account.Set(details), Client.Account);
4741
}
4842

4943
}

0 commit comments

Comments
 (0)