Skip to content

Commit f99dc00

Browse files
committed
Merge pull request #221 from Azure/dev
.
2 parents 4c9e8d6 + f649902 commit f99dc00

File tree

23 files changed

+254
-55
lines changed

23 files changed

+254
-55
lines changed

setup/azurecmdfiles.wxi

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4102,9 +4102,6 @@
41024102
<Component Id="cmp2FF23DA02D92BABF1414E60E2746B791" Guid="*">
41034103
<File Id="fil8502BEF8D63565248962863AF77D7E44" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.TrafficManager.dll" />
41044104
</Component>
4105-
<Component Id="cmp5BC1FEE2A60641F2345605CD3B676362" Guid="*">
4106-
<File Id="filC467F130CDCA9ECCB88E974C5ADAA94B" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.VirtualNetworks.dll" />
4107-
</Component>
41084105
<Component Id="cmpE1EAFD7E808AF4C192C5D45154BB2136" Guid="*">
41094106
<File Id="fil24568F5AAF5B1381C11436DB37976472" KeyPath="yes" Source="$(var.sourceDir)\ServiceManagement\Azure\Services\Microsoft.WindowsAzure.Management.WebSites.dll" />
41104107
</Component>
@@ -6025,8 +6022,7 @@
60256022
<ComponentRef Id="cmp2F2E1D5926F718232A6068856776B49D" />
60266023
<ComponentRef Id="cmpF1CE4A66C053B106D2C485757F703AB2" />
60276024
<ComponentRef Id="cmp2A6B149B9B0BDCC11A05919864D86251" />
6028-
<ComponentRef Id="cmp2FF23DA02D92BABF1414E60E2746B791" />
6029-
<ComponentRef Id="cmp5BC1FEE2A60641F2345605CD3B676362" />
6025+
<ComponentRef Id="cmp2FF23DA02D92BABF1414E60E2746B791" />
60306026
<ComponentRef Id="cmpE1EAFD7E808AF4C192C5D45154BB2136" />
60316027
<ComponentRef Id="cmp0313F8F73743B761E3DC5BBE65D6FB04" />
60326028
<ComponentRef Id="cmpFA98ECC9A87BB49B7FC68AC0CDC89955" />

src/ServiceManagement/Common/Commands.ScenarioTest/Commands.ScenarioTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
124124
</Reference>
125125
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
126-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.0\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
126+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
127127
<Private>True</Private>
128128
</Reference>
129129
<Reference Include="Microsoft.WindowsAzure.Management.Storage">

src/ServiceManagement/Common/Commands.ScenarioTest/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
24-
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.0" targetFramework="net45" />
24+
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
2525
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2626
<package id="Microsoft.WindowsAzure.Management.WebSites" version="4.4.2-prerelease" targetFramework="net45" />
2727
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/Commands.ServiceManagement.Preview.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@
132132
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
133133
</Reference>
134134
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
135-
<SpecificVersion>False</SpecificVersion>
136-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
135+
<SpecificVersion>False</SpecificVersion>
136+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
137137
</Reference>
138138
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
139139
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/ServiceManagement/Compute/Commands.ServiceManagement.Preview/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
23-
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
23+
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
2424
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2525
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2626
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/Commands.ServiceManagement.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
133133
</Reference>
134134
<Reference Include="Microsoft.WindowsAzure.Management.Network">
135-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
135+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
136136
</Reference>
137137
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
138138
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>
@@ -458,7 +458,7 @@
458458
<Compile Include="FunctionalTests\VMTemplateTests.cs" />
459459
</ItemGroup>
460460
<ItemGroup>
461-
<Content Include="FunctionalTests\ExtensionTests\MicrosoftAntimalware\AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1" />
461+
<Content Include="FunctionalTests\ExtensionTests\MicrosoftAntimalware\AzureVMMicrosoftAntimalwareExtensionFunctionalTests.ps1" />
462462
<None Include="AzureRTBVTs.playlist" />
463463
<None Include="AzureRTComplete.playlist" />
464464
<None Include="AzureRTComplete_Full_Diff.playlist" />

src/ServiceManagement/Compute/Commands.ServiceManagement.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
24-
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
24+
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
2525
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2626
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2727
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ServiceManagement/Compute/Commands.ServiceManagement/Commands.ServiceManagement.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@
133133
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
134134
</Reference>
135135
<Reference Include="Microsoft.WindowsAzure.Management.Network, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
136-
<SpecificVersion>False</SpecificVersion>
137-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
136+
<SpecificVersion>False</SpecificVersion>
137+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
138138
</Reference>
139139
<Reference Include="Microsoft.WindowsAzure.Management.Storage">
140140
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Storage.5.1.1\lib\net40\Microsoft.WindowsAzure.Management.Storage.dll</HintPath>

src/ServiceManagement/Compute/Commands.ServiceManagement/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="2.0.3" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2222
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
23-
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
23+
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
2424
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2525
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />
2626
<package id="System.Spatial" version="5.6.4" targetFramework="net45" />

src/ServiceManagement/Network/Commands.Network.Test/Commands.ServiceManagement.Network.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Compute.12.3.1\lib\net40\Microsoft.WindowsAzure.Management.Compute.dll</HintPath>
110110
</Reference>
111111
<Reference Include="Microsoft.WindowsAzure.Management.Network">
112-
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.3\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
112+
<HintPath>..\..\..\packages\Microsoft.WindowsAzure.Management.Network.7.0.4\lib\net40\Microsoft.WindowsAzure.Management.Network.dll</HintPath>
113113
</Reference>
114114
<Reference Include="Microsoft.WindowsAzure.Management.Storage, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
115115
<SpecificVersion>False</SpecificVersion>
@@ -185,7 +185,7 @@
185185
<Compile Include="ScenarioTests\ReservedIPs\ReservedIP.cs" />
186186
<Compile Include="TestInterfaces\TestClientProvider.cs" />
187187
</ItemGroup>
188-
<ItemGroup>
188+
<ItemGroup>
189189
<None Include="MSSharedLibKey.snk" />
190190
<None Include="packages.config" />
191191
<None Include="ScenarioTests\IPForwarding\IPForwardingTests.ps1">

src/ServiceManagement/Network/Commands.Network.Test/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<package id="Microsoft.Rest.ClientRuntime.Azure.Authentication" version="0.9.3" targetFramework="net45" />
2020
<package id="Microsoft.WindowsAzure.Management" version="4.1.1" targetFramework="net45" />
2121
<package id="Microsoft.WindowsAzure.Management.Compute" version="12.3.1" targetFramework="net45" />
22-
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.3" targetFramework="net45" />
22+
<package id="Microsoft.WindowsAzure.Management.Network" version="7.0.4" targetFramework="net45" />
2323
<package id="Microsoft.WindowsAzure.Management.Storage" version="5.1.1" targetFramework="net45" />
2424
<package id="Moq" version="4.2.1402.2112" targetFramework="net45" />
2525
<package id="Newtonsoft.Json" version="6.0.8" targetFramework="net45" />

src/ServiceManagement/Network/Commands.Network/ApplicationGateway/Model/ApplicationGatewayConfiguration.cs

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,26 @@ public class ApplicationGatewayConfiguration : ConfigurationElement
3636
[DataMember(Order = 2, IsRequired = true)]
3737
public IEnumerable<FrontendPort> FrontendPorts { get; set; }
3838

39+
[DataMember(Order = 3, EmitDefaultValue = false)]
40+
public IEnumerable<Probe> Probes { get; set; }
41+
3942
/// <summary>
4043
/// Collection of backend address pools. See backendAddressPools in the NRP spec
4144
/// </summary>
42-
[DataMember(Order = 3, IsRequired = true)]
45+
[DataMember(Order = 4, IsRequired = true)]
4346
public IEnumerable<BackendAddressPool> BackendAddressPools { get; set; }
4447

45-
[DataMember(Order = 4, IsRequired = true)]
48+
[DataMember(Order = 5, IsRequired = true)]
4649
public IEnumerable<BackendHttpSettings> BackendHttpSettingsList { get; set; }
4750

48-
[DataMember(Order = 5, IsRequired = true)]
51+
[DataMember(Order = 6, IsRequired = true)]
4952
public IEnumerable<HttpListener> HttpListeners { get; set; }
5053

51-
[DataMember(Order = 6, IsRequired = true)]
54+
[DataMember(Order = 7, IsRequired = true)]
5255
public IEnumerable<HttpLoadBalancingRule> HttpLoadBalancingRules { get; set; }
5356

5457
public ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }
55-
58+
5659
public ApplicationGatewayConfiguration()
5760
{
5861
}
@@ -65,10 +68,10 @@ public void ProcessConfiguration()
6568

6669
public override void Validate()
6770
{
68-
if (this.FrontendIPConfigurations != null && this.FrontendIPConfigurations.Count() > 1)
71+
if (this.FrontendIPConfigurations != null && this.FrontendIPConfigurations.Count() > 2)
6972
{
7073
throw new ApplicationGatewayConfigurationValidationException(
71-
"Only one FrontendIPConfiguration can be specified");
74+
"Maximum two FrontendIPConfiguration can be specified");
7275
}
7376

7477
//Validate that atleast one of each configuration element is present
@@ -102,15 +105,18 @@ public override void Validate()
102105
"Atleast one HttpLoadBalancingRule must be specified");
103106
}
104107
}
105-
108+
106109
public override string ToString()
107110
{
108111
StringBuilder sb = new StringBuilder();
109112

110-
sb.AppendFormat(CultureInfo.InvariantCulture, "FrontendIPConfigurations:");
111-
foreach (FrontendIPConfiguration frontendIP in FrontendIPConfigurations)
113+
if (null != FrontendIPConfigurations)
112114
{
113-
sb.AppendFormat("{0}", frontendIP == null ? "null" : frontendIP.ToString());
115+
sb.AppendFormat(CultureInfo.InvariantCulture, "FrontendIPConfigurations:");
116+
foreach (FrontendIPConfiguration frontendIPConfiguration in FrontendIPConfigurations)
117+
{
118+
sb.AppendFormat("{0}", frontendIPConfiguration == null ? "null" : frontendIPConfiguration.ToString());
119+
}
114120
}
115121

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

128+
if (null != Probes)
129+
{
130+
sb.AppendFormat(CultureInfo.InvariantCulture, "Probes:");
131+
foreach (Probe probe in Probes)
132+
{
133+
sb.AppendFormat("{0}", probe == null ? "null" : probe.ToString());
134+
}
135+
}
136+
122137
sb.AppendFormat(CultureInfo.InvariantCulture, "BackendAddressPools:");
123138
foreach (BackendAddressPool backendAddressPool in BackendAddressPools)
124139
{

src/ServiceManagement/Network/Commands.Network/ApplicationGateway/Model/BackendHttpSettings.cs

Lines changed: 50 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using System.Runtime.Remoting.Channels;
16-
1715
namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationGateway.Model
1816
{
1917
using System;
@@ -25,7 +23,14 @@ namespace Microsoft.WindowsAzure.Commands.ServiceManagement.Network.ApplicationG
2523
[DataContract(Namespace = "http://schemas.microsoft.com/windowsazure")]
2624
public class BackendHttpSettings : NamedConfigurationElement
2725
{
28-
internal ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }
26+
internal ApplicationGatewayConfigurationContext ConfigurationContext { get; set; }
27+
28+
//Values taken from ARR schemas
29+
public const uint MinRequestTimeout = 1;
30+
public const uint DefaultRequestTimeout = 30;
31+
public const uint MaxRequestTimeout = 86400;
32+
33+
private uint _requestTimeout;
2934

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

44+
//ReuestTimeout in seconds
45+
//ARR will fail the request if response not received within RequestTimeout
46+
[DataMember(Order = 5, IsRequired = false)]
47+
public uint RequestTimeout
48+
{
49+
get
50+
{
51+
if (0 == _requestTimeout)
52+
return DefaultRequestTimeout;
53+
else
54+
return _requestTimeout;
55+
}
56+
set
57+
{
58+
_requestTimeout = value;
59+
}
60+
}
61+
62+
[DataMember(Order = 6, EmitDefaultValue = false)]
63+
public string Probe { get; set; }
64+
65+
public BackendHttpSettings()
66+
{
67+
RequestTimeout = DefaultRequestTimeout;
68+
}
3969
public override void Validate()
4070
{
4171
if (!string.Equals(this.Protocol.ToString(), "Http", StringComparison.InvariantCultureIgnoreCase))
@@ -44,12 +74,29 @@ public override void Validate()
4474
string.Format("Only Http is allowed as Protocol of BackendHttpSettings {0}", this.Name));
4575
}
4676

77+
if (this.Port == 443)
78+
{
79+
throw new ApplicationGatewayConfigurationValidationException(
80+
string.Format("443 is not allowed as Port of BackendHttpSettings {0}", this.Name));
81+
}
82+
4783
if (!string.Equals(this.CookieBasedAffinity, "Enabled", StringComparison.InvariantCultureIgnoreCase) &&
4884
!string.Equals(this.CookieBasedAffinity, "Disabled", StringComparison.InvariantCultureIgnoreCase))
4985
{
5086
throw new ApplicationGatewayConfigurationValidationException(
5187
string.Format("Invalid value for CookieBasedAffinity in BackendHttpSettings {0}. Allowed values:[Enabled/Disabled]", this.Name));
5288
}
89+
90+
if ((this.RequestTimeout < MinRequestTimeout) || (this.RequestTimeout > MaxRequestTimeout))
91+
{
92+
throw new ApplicationGatewayConfigurationValidationException(
93+
string.Format("Invalid BackendHttpSettings {0} RequestTimeout. {1} is outside valid RequestTimeout (seconds) range [1, 86400]", this.Name, this.RequestTimeout));
94+
}
95+
}
96+
97+
public bool IsCookieBasedAffinityEnabled()
98+
{
99+
return string.Equals(this.CookieBasedAffinity, "Enabled", StringComparison.InvariantCultureIgnoreCase);
53100
}
54101
}
55102
}

0 commit comments

Comments
 (0)