Skip to content

. #221

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 1, 2015
Merged

. #221

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions setup/azurecmdfiles.wxi
Original file line number Diff line number Diff line change
Expand Up @@ -4159,9 +4159,6 @@
<Component Id="cmp2FF23DA02D92BABF1414E60E2746B791" Guid="*">
<File Id="fil8502BEF8D63565248962863AF77D7E44" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.TrafficManager.dll" />
</Component>
<Component Id="cmp5BC1FEE2A60641F2345605CD3B676362" Guid="*">
<File Id="filC467F130CDCA9ECCB88E974C5ADAA94B" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.VirtualNetworks.dll" />
</Component>
<Component Id="cmpE1EAFD7E808AF4C192C5D45154BB2136" Guid="*">
<File Id="fil24568F5AAF5B1381C11436DB37976472" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.WebSites.dll" />
</Component>
Expand Down Expand Up @@ -6113,8 +6110,7 @@
<ComponentRef Id="cmp2F2E1D5926F718232A6068856776B49D" />
<ComponentRef Id="cmpF1CE4A66C053B106D2C485757F703AB2" />
<ComponentRef Id="cmp2A6B149B9B0BDCC11A05919864D86251" />
<ComponentRef Id="cmp2FF23DA02D92BABF1414E60E2746B791" />
<ComponentRef Id="cmp5BC1FEE2A60641F2345605CD3B676362" />
<ComponentRef Id="cmp2FF23DA02D92BABF1414E60E2746B791" />
<ComponentRef Id="cmpE1EAFD7E808AF4C192C5D45154BB2136" />
<ComponentRef Id="cmp0313F8F73743B761E3DC5BBE65D6FB04" />
<ComponentRef Id="cmpFA98ECC9A87BB49B7FC68AC0CDC89955" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.0" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.2-prerelease" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down Expand Up @@ -458,7 +458,7 @@
<Compile Include="FunctionalTests\VMTemplateTests.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="FunctionalTests\ExtensionTests\MicrosoftAntimalware\AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1" />
<Content Include="FunctionalTests\ExtensionTests\MicrosoftAntimalware\AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1" />
<None Include="AzureRTBVTs.playlist" />
<None Include="AzureRTComplete.playlist" />
<None Include="AzureRTComplete_Full_Diff.playlist" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Network">
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
</Reference>
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -185,7 +185,7 @@
<Compile Include="ScenarioTests\ReservedIPs\ReservedIP.cs" />
<Compile Include="TestInterfaces\TestClientProvider.cs" />
</ItemGroup>
<ItemGroup>
<ItemGroup>
<None Include="MSSharedLibKey.snk" />
<None Include="packages.config" />
<None Include="ScenarioTests\IPForwarding\IPForwardingTests.ps1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.9.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,26 @@ public class ApplicationGatewayConfiguration : ConfigurationElement
[DataMember(Order = 2, IsRequired = true)]
public IEnumerable<FrontendPort> FrontendPorts { get; set; }

[DataMember(Order = 3, EmitDefaultValue = false)]
public IEnumerable<Probe> Probes { get; set; }

/// <summary>
/// Collection of backend address pools. See backendAddressPools in the NRP spec
/// </summary>
[DataMember(Order = 3, IsRequired = true)]
[DataMember(Order = 4, IsRequired = true)]
public IEnumerable<BackendAddressPool> BackendAddressPools { get; set; }

[DataMember(Order = 4, IsRequired = true)]
[DataMember(Order = 5, IsRequired = true)]
public IEnumerable<BackendHttpSettings> BackendHttpSettingsList { get; set; }

[DataMember(Order = 5, IsRequired = true)]
[DataMember(Order = 6, IsRequired = true)]
public IEnumerable<HttpListener> HttpListeners { get; set; }

[DataMember(Order = 6, IsRequired = true)]
[DataMember(Order = 7, IsRequired = true)]
public IEnumerable<HttpLoadBalancingRule> HttpLoadBalancingRules { get; set; }

public ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }

public ApplicationGatewayConfiguration()
{
}
Expand All @@ -65,10 +68,10 @@ public void ProcessConfiguration()

public override void Validate()
{
if (this.FrontendIPConfigurations != null && this.FrontendIPConfigurations.Count() > 1)
if (this.FrontendIPConfigurations != null && this.FrontendIPConfigurations.Count() > 2)
{
throw new ApplicationGatewayConfigurationValidationException(
"Only one FrontendIPConfiguration can be specified");
"Maximum two FrontendIPConfiguration can be specified");
}

//Validate that atleast one of each configuration element is present
Expand Down Expand Up @@ -102,15 +105,18 @@ public override void Validate()
"Atleast one HttpLoadBalancingRule must be specified");
}
}

public override string ToString()
{
StringBuilder sb = new StringBuilder();

sb.AppendFormat(CultureInfo.InvariantCulture, "FrontendIPConfigurations:");
foreach (FrontendIPConfiguration frontendIP in FrontendIPConfigurations)
if (null != FrontendIPConfigurations)
{
sb.AppendFormat("{0}", frontendIP == null ? "null" : frontendIP.ToString());
sb.AppendFormat(CultureInfo.InvariantCulture, "FrontendIPConfigurations:");
foreach (FrontendIPConfiguration frontendIPConfiguration in FrontendIPConfigurations)
{
sb.AppendFormat("{0}", frontendIPConfiguration == null ? "null" : frontendIPConfiguration.ToString());
}
}

sb.AppendFormat(CultureInfo.InvariantCulture, "FrontEndPorts:");
Expand All @@ -119,6 +125,15 @@ public override string ToString()
sb.AppendFormat("{0}", frontEndPort == null ? "null" : frontEndPort.ToString());
}

if (null != Probes)
{
sb.AppendFormat(CultureInfo.InvariantCulture, "Probes:");
foreach (Probe probe in Probes)
{
sb.AppendFormat("{0}", probe == null ? "null" : probe.ToString());
}
}

sb.AppendFormat(CultureInfo.InvariantCulture, "BackendAddressPools:");
foreach (BackendAddressPool backendAddressPool in BackendAddressPools)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// limitations under the License.
// ----------------------------------------------------------------------------------

using System.Runtime.Remoting.Channels;

namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationGateway.Model
{
using System;
Expand All @@ -25,7 +23,14 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationG
[DataContract(Namespace = "http://schemas.microsoft.com/windowsazure")]
public class BackendHttpSettings : NamedConfigurationElement
{
internal ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }
internal ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }

//Values taken from ARR schemas
public const uint MinRequestTimeout = 1;
public const uint DefaultRequestTimeout = 30;
public const uint MaxRequestTimeout = 86400;

private uint _requestTimeout;

[DataMember(Order = 2, IsRequired = true)]
public ushort Port { get; set; }
Expand All @@ -36,6 +41,31 @@ public class BackendHttpSettings : NamedConfigurationElement
[DataMember(Order = 4, IsRequired = true)]
public string CookieBasedAffinity { get; set; }

//ReuestTimeout in seconds
//ARR will fail the request if response not received within RequestTimeout
[DataMember(Order = 5, IsRequired = false)]
public uint RequestTimeout
{
get
{
if (0 == _requestTimeout)
return DefaultRequestTimeout;
else
return _requestTimeout;
}
set
{
_requestTimeout = value;
}
}

[DataMember(Order = 6, EmitDefaultValue = false)]
public string Probe { get; set; }

public BackendHttpSettings()
{
RequestTimeout = DefaultRequestTimeout;
}
public override void Validate()
{
if (!string.Equals(this.Protocol.ToString(), "Http", StringComparison.InvariantCultureIgnoreCase))
Expand All @@ -44,12 +74,29 @@ public override void Validate()
string.Format("Only Http is allowed as Protocol of BackendHttpSettings {0}", this.Name));
}

if (this.Port == 443)
{
throw new ApplicationGatewayConfigurationValidationException(
string.Format("443 is not allowed as Port of BackendHttpSettings {0}", this.Name));
}

if (!string.Equals(this.CookieBasedAffinity, "Enabled", StringComparison.InvariantCultureIgnoreCase) &&
!string.Equals(this.CookieBasedAffinity, "Disabled", StringComparison.InvariantCultureIgnoreCase))
{
throw new ApplicationGatewayConfigurationValidationException(
string.Format("Invalid value for CookieBasedAffinity in BackendHttpSettings {0}. Allowed values:[Enabled/Disabled]", this.Name));
}

if ((this.RequestTimeout < MinRequestTimeout) || (this.RequestTimeout > MaxRequestTimeout))
{
throw new ApplicationGatewayConfigurationValidationException(
string.Format("Invalid BackendHttpSettings {0} RequestTimeout. {1} is outside valid RequestTimeout (seconds) range [1, 86400]", this.Name, this.RequestTimeout));
}
}

public bool IsCookieBasedAffinityEnabled()
{
return string.Equals(this.CookieBasedAffinity, "Enabled", StringComparison.InvariantCultureIgnoreCase);
}
}
}
Loading