Skip to content

Commit cfb7106

Browse files
Adding Autoscaling Capabilities to Virtual Network Gateway (#23445)
* edited * edited ps1xml * README.md updated * added upper bound * added some new conventions * added Scale Unit * Updated to ScaleUnit and error messages * updated bounds
1 parent 2411789 commit cfb7106

15 files changed

+243
-76
lines changed

src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaySku.cs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ public VirtualNetworkGatewaySku()
3333
/// 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance',
3434
/// 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ',
3535
/// 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ',
36-
/// 'ErGw2AZ', 'ErGw3AZ'</param>
36+
/// 'ErGw2AZ', 'ErGw3AZ', 'ErGwScale'</param>
3737
/// <param name="tier">Gateway SKU tier. Possible values include:
3838
/// 'Basic', 'HighPerformance', 'Standard', 'UltraPerformance',
3939
/// 'VpnGw1', 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ',
4040
/// 'VpnGw2AZ', 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ',
41-
/// 'ErGw2AZ', 'ErGw3AZ'</param>
41+
/// 'ErGw2AZ', 'ErGw3AZ', 'ErGwScale'</param>
4242
/// <param name="capacity">The capacity.</param>
4343
public VirtualNetworkGatewaySku(string name = default(string), string tier = default(string), int? capacity = default(int?))
4444
{
@@ -57,7 +57,8 @@ public VirtualNetworkGatewaySku()
5757
/// Gets or sets gateway SKU name. Possible values include: 'Basic',
5858
/// 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1',
5959
/// 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ',
60-
/// 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'
60+
/// 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ',
61+
/// 'ErGw3AZ', 'ErGwScale'
6162
/// </summary>
6263
[JsonProperty(PropertyName = "name")]
6364
public string Name { get; set; }
@@ -66,7 +67,8 @@ public VirtualNetworkGatewaySku()
6667
/// Gets or sets gateway SKU tier. Possible values include: 'Basic',
6768
/// 'HighPerformance', 'Standard', 'UltraPerformance', 'VpnGw1',
6869
/// 'VpnGw2', 'VpnGw3', 'VpnGw4', 'VpnGw5', 'VpnGw1AZ', 'VpnGw2AZ',
69-
/// 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ', 'ErGw3AZ'
70+
/// 'VpnGw3AZ', 'VpnGw4AZ', 'VpnGw5AZ', 'ErGw1AZ', 'ErGw2AZ',
71+
/// 'ErGw3AZ', 'ErGwScale'
7072
/// </summary>
7173
[JsonProperty(PropertyName = "tier")]
7274
public string Tier { get; set; }
@@ -78,4 +80,4 @@ public VirtualNetworkGatewaySku()
7880
public int? Capacity { get; private set; }
7981

8082
}
81-
}
83+
}

src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaySkuName.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,6 @@ public static class VirtualNetworkGatewaySkuName
3333
public const string ErGw1AZ = "ErGw1AZ";
3434
public const string ErGw2AZ = "ErGw2AZ";
3535
public const string ErGw3AZ = "ErGw3AZ";
36+
public const string ErGwScale = "ErGwScale";
3637
}
37-
}
38+
}

src/Network/Network.Management.Sdk/Generated/Models/VirtualNetworkGatewaySkuTier.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ namespace Microsoft.Azure.Management.Network.Models
1616
/// </summary>
1717
public static class VirtualNetworkGatewaySkuTier
1818
{
19-
public const string Basic = "Basic";
20-
public const string HighPerformance = "HighPerformance";
19+
public const string Basic = "Basic";
20+
public const string HighPerformance = "HighPerformance";
2121
public const string Standard = "Standard";
2222
public const string UltraPerformance = "UltraPerformance";
2323
public const string VpnGw1 = "VpnGw1";
@@ -33,5 +33,6 @@ public static class VirtualNetworkGatewaySkuTier
3333
public const string ErGw1AZ = "ErGw1AZ";
3434
public const string ErGw2AZ = "ErGw2AZ";
3535
public const string ErGw3AZ = "ErGw3AZ";
36+
public const string ErGwScale = "ErGwScale";
3637
}
37-
}
38+
}

src/Network/Network.Management.Sdk/README.md

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
- `Add-AzApplicationGatewayListener`
3030
- `New-AzApplicationGatewayListener`
3131
* Added cmdlet 'Remove-AzApplicationGatewayFirewallCustomRule' to support removing custom rule in Firewall Policy.
32+
* Added support for new ErGWScale SKU - ErGwScale
3233
* Added property 'size' to firewallPolicy and firewallPolicyRuleCollectionGroup.
3334
* Updated cmdlet `New-AzBastion`, `Set-AzBastion` and `Get-AzBastion` to support Bastion features for CRUD operations
3435

src/Network/Network/Models/PSVirtualNetworkGateway.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public class PSVirtualNetworkGateway : PSTopLevelResource
7878
[Ps1Xml(Target = ViewControl.Table)]
7979
public bool AllowVirtualWanTraffic { get; set; }
8080

81+
[Ps1Xml(Label = "AutoScaleConfiguration", Target = ViewControl.Table)]
82+
public PSVirtualNetworkGatewayAutoscaleConfiguration AutoScaleConfiguration { get; set; }
83+
8184
[JsonIgnore]
8285
public string IpConfigurationsText
8386
{
@@ -131,5 +134,11 @@ public string CustomRoutesText
131134
{
132135
get { return JsonConvert.SerializeObject(CustomRoutes, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
133136
}
137+
138+
[JsonIgnore]
139+
public string AutoScaleConfigurationText
140+
{
141+
get { return JsonConvert.SerializeObject(AutoScaleConfiguration, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
142+
}
134143
}
135144
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// Copyright (c) Microsoft. All rights reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
//
15+
16+
using Microsoft.WindowsAzure.Commands.Common.Attributes;
17+
using Newtonsoft.Json;
18+
19+
namespace Microsoft.Azure.Commands.Network.Models
20+
{
21+
public class PSVirtualNetworkGatewayAutoscaleConfiguration
22+
{
23+
[Ps1Xml(Target = ViewControl.Table)]
24+
public PSVirtualNetworkGatewayPropertiesAutoScaleConfigurationBounds Bounds { get; set; }
25+
26+
[JsonIgnore]
27+
public string Range
28+
{
29+
get { return JsonConvert.SerializeObject(Bounds, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
30+
}
31+
32+
public PSVirtualNetworkGatewayPropertiesAutoScaleConfigurationBounds ScaleUnit {
33+
get { return Bounds; }
34+
}
35+
}
36+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Microsoft.WindowsAzure.Commands.Common.Attributes;
2+
3+
namespace Microsoft.Azure.Commands.Network.Models
4+
{
5+
public class PSVirtualNetworkGatewayPropertiesAutoScaleConfigurationBounds
6+
{
7+
[Ps1Xml(Target = ViewControl.Table)]
8+
public int Min { get; set; }
9+
10+
[Ps1Xml(Target = ViewControl.Table)]
11+
public int Max { get; set; }
12+
}
13+
}

src/Network/Network/Network.format.ps1xml

Lines changed: 45 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,10 @@
976976
<Label>Sku</Label>
977977
<PropertyName>SkuText</PropertyName>
978978
</ListItem>
979+
<ListItem>
980+
<Label>AutoScaleConfiguration</Label>
981+
<PropertyName>AutoScaleConfigurationText</PropertyName>
982+
</ListItem>
979983
<ListItem>
980984
<Label>VpnClientConfiguration</Label>
981985
<PropertyName>VpnClientConfigurationText</PropertyName>
@@ -5307,8 +5311,6 @@
53075311
</ListEntries>
53085312
</ListControl>
53095313
</View>
5310-
5311-
53125314
<View>
53135315
<Name>Microsoft.Azure.Commands.Network.Models.PSExpressRouteGatewayAutoscaleConfiguration</Name>
53145316
<ViewSelectedBy>
@@ -5320,7 +5322,7 @@
53205322
<ListItems>
53215323
<ListItem>
53225324
<Label>Bounds</Label>
5323-
<PropertyName>BoundsText</PropertyName>
5325+
<PropertyName>Range</PropertyName>
53245326
</ListItem>
53255327
</ListItems>
53265328
</ListEntry>
@@ -6142,6 +6144,46 @@
61426144
</ListEntries>
61436145
</ListControl>
61446146
</View>
6147+
<View>
6148+
<Name>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGatewayAutoscaleConfiguration</Name>
6149+
<ViewSelectedBy>
6150+
<TypeName>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGatewayAutoscaleConfiguration</TypeName>
6151+
</ViewSelectedBy>
6152+
<ListControl>
6153+
<ListEntries>
6154+
<ListEntry>
6155+
<ListItems>
6156+
<ListItem>
6157+
<Label>ScaleUnit</Label>
6158+
<PropertyName>ScaleUnitText</PropertyName>
6159+
</ListItem>
6160+
</ListItems>
6161+
</ListEntry>
6162+
</ListEntries>
6163+
</ListControl>
6164+
</View>
6165+
<View>
6166+
<Name>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGatewayPropertiesAutoScaleConfigurationBounds</Name>
6167+
<ViewSelectedBy>
6168+
<TypeName>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGatewayPropertiesAutoScaleConfigurationBounds</TypeName>
6169+
</ViewSelectedBy>
6170+
<ListControl>
6171+
<ListEntries>
6172+
<ListEntry>
6173+
<ListItems>
6174+
<ListItem>
6175+
<Label>Min</Label>
6176+
<PropertyName>MinText</PropertyName>
6177+
</ListItem>
6178+
<ListItem>
6179+
<Label>Max</Label>
6180+
<PropertyName>MaxText</PropertyName>
6181+
</ListItem>
6182+
</ListItems>
6183+
</ListEntry>
6184+
</ListEntries>
6185+
</ListControl>
6186+
</View>
61456187
<View>
61466188
<Name>Microsoft.Azure.Commands.Network.Models.PSVirtualNetworkGatewayConnectionIkeSaQuickModeSa</Name>
61476189
<ViewSelectedBy>

src/Network/Network/Properties/Resources.Designer.cs

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

0 commit comments

Comments
 (0)