Skip to content

Commit

Permalink
Merge pull request #52 from daschult/dev
Browse files Browse the repository at this point in the history
Adding Reset-AzureVnetGateway cmdlet.
  • Loading branch information
ogail committed Dec 17, 2014
2 parents 85cf29d + 8859656 commit 33291cc
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="6.1.2" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="3.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="6.1.2" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="3.1.0" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="6.1.2" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="3.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Testing, Version=1.0.5417.13285, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<package id="Microsoft.WindowsAzure.Common" version="1.4.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Common.Dependencies" version="1.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Storage, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -106,6 +106,7 @@
<Compile Include="Gateway\NewAzureVNetGateway.cs" />
<Compile Include="Gateway\RemoveAzureVNetGateway.cs" />
<Compile Include="Gateway\RemoveAzureVNetGatewayDefaultSite.cs" />
<Compile Include="Gateway\ResetAzureVNetGateway.cs" />
<Compile Include="Gateway\ResizeAzureVNetGateway.cs" />
<Compile Include="Gateway\SetAzureVNetGateway.cs" />
<Compile Include="Gateway\SetAzureVNetGatewayDefaultSite.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// ----------------------------------------------------------------------------------
//
// Copyright Microsoft Corporation
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// http://www.apache.org/licenses/LICENSE-2.0
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// ----------------------------------------------------------------------------------

namespace Microsoft.Azure.Commands.Network.Gateway
{
using System.Management.Automation;
using WindowsAzure.Management.Network.Models;

[Cmdlet(VerbsCommon.Reset, "AzureVNetGateway"), OutputType(typeof(GatewayGetOperationStatusResponse))]
public class ResetAzureVNetGateway : NetworkCmdletBase
{
[Parameter(Position = 0, Mandatory = true, HelpMessage = "Virtual network name.")]
public string VNetName
{
get; set;
}

public override void ExecuteCmdlet()
{
WriteObject(Client.ResetGateway(VNetName));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2057,6 +2057,87 @@
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Reset-AzureVNetGateway</command:name>
<maml:description>
<maml:para>Reset the provided virtual network gateway.</maml:para>
</maml:description>
<maml:copyright>
<maml:para />
</maml:copyright>
<command:verb>Reset</command:verb>
<command:noun>AzureVNetGateway</command:noun>
<dev:version />
</command:details>
<maml:description>
<!--This is the Description section-->
<maml:para>Reset the provided virtual network gateway.</maml:para>
</maml:description>
<command:syntax>
<command:syntaxItem>
<maml:name>Reset-AzureVNetGateway</maml:name>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0">
<maml:name>VNetName</maml:name>
<maml:description>
<maml:para></maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters>
<command:parameter required="true" variableLength="false" globbing="false" pipelineInput="false" position="0">
<maml:name>VNetName</maml:name>
<maml:description>
<maml:para></maml:para>
</maml:description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type>
<maml:name>String</maml:name>
<maml:uri/>
</dev:type>
<dev:defaultValue></dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes>
<command:inputType>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
<maml:description>
<maml:para></maml:para>
</maml:description>
</dev:type>
<maml:description></maml:description>
</command:inputType>
</command:inputTypes>
<command:returnValues>
<command:returnValue>
<dev:type>
<maml:name></maml:name>
<maml:uri/>
<maml:description>
<maml:para></maml:para>
</maml:description>
</dev:type>
<maml:description></maml:description>
</command:returnValue>
</command:returnValues>
<command:terminatingErrors></command:terminatingErrors>
<command:nonTerminatingErrors></command:nonTerminatingErrors>
<maml:alertSet>
<maml:title></maml:title>
<maml:alert>
<maml:para></maml:para>
</maml:alert>
</maml:alertSet>
<command:examples>
</command:examples>
<maml:relatedLinks>
</maml:relatedLinks>
</command:command>
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10">
<!--Generated by PS Cmdlet Help Editor-->
<command:details>
<command:name>Resize-AzureVNetGateway</command:name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,12 @@ public GatewayGetOperationStatusResponse DeleteGateway(string vnetName)
return client.Gateways.Delete(vnetName);
}

public GatewayGetOperationStatusResponse ResetGateway(string vnetName)
{
ResetGatewayParameters parameters = new ResetGatewayParameters();
return client.Gateways.Reset(vnetName, parameters);
}

public GatewayGetOperationStatusResponse ResizeGateway(string vnetName, string gatewaySKU)
{
ResizeGatewayParameters parameters = new ResizeGatewayParameters()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<package id="Microsoft.WindowsAzure.Common.Dependencies" version="1.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="1.8.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="System.Spatial" version="5.6.0" targetFramework="net45" />
<package id="WindowsAzure.Storage" version="4.0.0" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Scheduler, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="6.1.2" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.MediaServices" version="1.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Scheduler" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ServiceBus" version="0.15.0-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="3.1.0" targetFramework="net45" />
Expand Down
5 changes: 2 additions & 3 deletions src/ServiceManagement/Services/Commands/Commands.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.MediaServices.1.2.0\lib\net40\Microsoft.WindowsAzure.Management.MediaServices.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<Reference Include="Microsoft.WindowsAzure.Management.Network">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.4.2.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Scheduler">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Scheduler.4.1.0\lib\net40\Microsoft.WindowsAzure.Management.Scheduler.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion src/ServiceManagement/Services/Commands/packages.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<package id="Microsoft.WindowsAzure.Management" version="2.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="6.1.2" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.MediaServices" version="1.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="4.2.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Scheduler" version="4.1.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.ServiceBus" version="0.15.0-preview" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="3.1.0" targetFramework="net45" />
Expand Down

0 comments on commit 33291cc

Please sign in to comment.