From 5d6323f3e2977d8f464a15b42083ee2d834c95a4 Mon Sep 17 00:00:00 2001 From: Lei He Date: Mon, 7 Dec 2015 11:43:40 -0800 Subject: [PATCH 1/2] Adding subnet name as a parameter for updating a collection --- .../Commands.RemoteApp.Test.csproj | 2 +- .../Commands.RemoteApp.Test/packages.config | 2 +- .../UpdateAzureRemoteAppCollection.cs | 9 ++++++++- .../Commands.RemoteApp.csproj | 5 +++-- ...ndowsAzure.Commands.RemoteApp.dll-help.xml | 20 +++++++++++++++++++ .../Commands.RemoteApp/packages.config | 2 +- 6 files changed, 34 insertions(+), 6 deletions(-) diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj index d9d3fce034d6..a1d0de7b2609 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/Commands.RemoteApp.Test.csproj @@ -145,7 +145,7 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.4.1.1\lib\net40\Microsoft.WindowsAzure.Management.dll - ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.2\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.3\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll ..\..\..\packages\Moq.4.2.1402.2112\lib\net40\Moq.dll diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config index 33ea8842d03b..39fd592a3525 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp.Test/packages.config @@ -13,7 +13,7 @@ - + diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs index 79be039f041e..f6175a3ad662 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs @@ -38,6 +38,12 @@ public class UpdateAzureRemoteAppCollection : RdsCmdlet )] public string ImageName { get; set; } + [Parameter(Mandatory = false, + ValueFromPipelineByPropertyName = true, + HelpMessage = "For Azure VNets only, the name of the subnet to patch the collection" + )] + public string SubnetName { get; set; } + [Parameter(Mandatory = false, HelpMessage = "Log off users immediately after the update has successfully completed")] public SwitchParameter ForceLogoffWhenUpdateComplete { get; set; } @@ -57,7 +63,8 @@ public override void ExecuteCmdlet() details = new CollectionUpdateDetails() { TemplateImageName = ImageName, - WaitBeforeShutdownInMinutes = ForceLogoffWhenUpdateComplete ? -1 : 0 + WaitBeforeShutdownInMinutes = ForceLogoffWhenUpdateComplete ? -1 : 0, + SubnetName = string.IsNullOrEmpty(SubnetName) ? null : SubnetName }; if (ShouldProcess(CollectionName, Commands_RemoteApp.UpdateCollection)) diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj index b7924a1ec282..a2d6a268e3e4 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Commands.RemoteApp.csproj @@ -120,8 +120,9 @@ ..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll - - ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.2\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll + + False + ..\..\..\packages\Microsoft.WindowsAzure.Management.RemoteApp.2.0.3\lib\net40\Microsoft.WindowsAzure.Management.RemoteApp.dll ..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml index e6d871e11012..2c8c6a0eda95 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Microsoft.WindowsAzure.Commands.RemoteApp.dll-help.xml @@ -5993,6 +5993,13 @@ TrackingId string + + SubnetName + + Name of subnet to move the collection into. + + string + ForceLogoffWhenUpdateComplete @@ -6054,6 +6061,19 @@ TrackingId + + SubnetName + + Name of the subnet to move the collection into. + + string + + string + + + + + Confirm diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config index 3553d2471373..ffeb0e0e2692 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/packages.config @@ -18,7 +18,7 @@ - + From 6d1ab3bbb00ad9c647a983c902a0082a165a9787 Mon Sep 17 00:00:00 2001 From: Lei He Date: Tue, 8 Dec 2015 15:00:08 -0800 Subject: [PATCH 2/2] Add subnet name as a parameter for patching a collection. --- .../Collection/UpdateAzureRemoteAppCollection.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs index f6175a3ad662..5dfd4078fcf8 100644 --- a/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs +++ b/src/ServiceManagement/RemoteApp/Commands.RemoteApp/Collection/UpdateAzureRemoteAppCollection.cs @@ -40,7 +40,7 @@ public class UpdateAzureRemoteAppCollection : RdsCmdlet [Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, - HelpMessage = "For Azure VNets only, the name of the subnet to patch the collection" + HelpMessage = "Name of the subnet to move the collection into." )] public string SubnetName { get; set; }