Skip to content

Commit 1023dc4

Browse files
authored
Merge pull request #8079 from maddieclayton/networkbc
Network breaking changes
2 parents 271274e + 4d6bbbd commit 1023dc4

23 files changed

+16224
-8552
lines changed

src/ResourceManager/Network/Commands.Network.Test/ScenarioTests/VirtualNetworkGatewayTests.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -198,13 +198,6 @@ param
198198
Assert-AreEqual $expected.Name $actual.Name
199199
Assert-AreEqual "Vpn" $expected.GatewayType
200200
Assert-AreEqual "RouteBased" $expected.VpnType
201-
202-
# Update P2S VPNClient Configuration
203-
#[SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine")]
204-
$Secure_String_Pwd = ConvertTo-SecureString "TestRadiusServerPassword" -AsPlainText -Force
205-
Set-AzureRmVirtualNetworkGatewayVpnClientConfig -VirtualNetworkGateway $expected -VpnClientAddressPool 200.168.0.0/16 -RadiusServerAddress "TestRadiusServer" -RadiusServerSecret $Secure_String_Pwd
206-
$expected = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
207-
Assert-AreEqual "200.168.0.0/16" $expected.VpnClientConfiguration.VpnClientAddressPool.AddressPrefixes
208201

209202
$radiusCertFilePath = $basedir + "\ScenarioTests\Data\ApplicationGatewayAuthCert.cer"
210203
$vpnProfilePackageUrl = New-AzureRmVpnClientConfiguration -ResourceGroupName $rgname -name $rname -AuthenticationMethod $vpnclientAuthMethod -RadiusRootCertificateFile $radiusCertFilePath
@@ -359,11 +352,6 @@ function Test-VirtualNetworkGatewayP2SAndSKU
359352
$expected = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
360353
Assert-AreEqual "VpnGw2" $expected.Sku.Tier
361354

362-
# Update P2S VPNClient Address Pool
363-
Set-AzureRmVirtualNetworkGatewayVpnClientConfig -VirtualNetworkGateway $expected -VpnClientAddressPool 200.168.0.0/16
364-
$expected = Get-AzureRmVirtualNetworkGateway -ResourceGroupName $rgname -name $rname
365-
Assert-AreEqual "200.168.0.0/16" $expected.VpnClientConfiguration.VpnClientAddressPool.AddressPrefixes[0]
366-
367355
# Get, list client Root certificates
368356
$rootCert = Get-AzureRmVpnClientRootCertificate -VpnClientRootCertificateName $clientRootCertName -VirtualNetworkGatewayName $expected.Name -ResourceGroupName $expected.ResourceGroupName
369357
Assert-AreEqual $clientRootCertName $rootCert.Name

src/ResourceManager/Network/Commands.Network.Test/SessionRecords/Commands.Network.Test.ScenarioTests.VirtualNetworkGatewayTests/TestVirtualNetworkGatewayP2SAndSKU.json

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

src/ResourceManager/Network/Commands.Network/Az.Network.psd1

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,6 @@ CmdletsToExport = 'Add-AzApplicationGatewayAuthenticationCertificate',
264264
'Resize-AzVirtualNetworkGateway',
265265
'Remove-AzVpnClientRevokedCertificate',
266266
'Remove-AzVpnClientRootCertificate',
267-
'Set-AzVirtualNetworkGatewayVpnClientConfig',
268267
'Get-AzVpnClientPackage', 'New-AzVpnClientConfiguration',
269268
'Get-AzVpnClientConfiguration',
270269
'New-AzVirtualNetworkGatewayIpConfig',

src/ResourceManager/Network/Commands.Network/ChangeLog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,7 @@
3535
- Add-AzureRmApplicationGatewayRequestRoutingRule
3636
- New-AzureRmApplicationGatewayPathRuleConfig
3737
- Add-AzureRmApplicationGatewayUrlPathMapConfig
38-
- New-AzureRmApplicationGatewayUrlPathMapConfig
38+
- New-AzureRmApplicationGatewayUrlPathMapConfig
39+
* Removed deprecated -ResourceId parameter from Get-AzServiceEndpointPolicyDefinition
40+
* Removed deprecated EnableVmProtection property from PSVirtualNetwork
41+
* Removed deprecated Set-AzVirtualNetworkGatewayVpnClientConfig cmdlet

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.format.ps1xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@
126126
<Label>DdosProtectionPlan</Label>
127127
<PropertyName>DdosProtectionPlanText</PropertyName>
128128
</ListItem>
129-
<ListItem>
130-
<Label>EnableVmProtection</Label>
131-
<PropertyName>EnableVmProtectionText</PropertyName>
132-
</ListItem>
133129
</ListItems>
134130
</ListEntry>
135131
</ListEntries>

src/ResourceManager/Network/Commands.Network/Microsoft.Azure.Commands.Network.generated.format.ps1xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4348,10 +4348,6 @@
43484348
<Alignment>Left</Alignment>
43494349
<Label>EnableDdosProtection</Label>
43504350
</TableColumnHeader>
4351-
<TableColumnHeader>
4352-
<Alignment>Left</Alignment>
4353-
<Label>EnableVmProtection</Label>
4354-
</TableColumnHeader>
43554351
</TableHeaders>
43564352
<TableRowEntries>
43574353
<TableRowEntry>

src/ResourceManager/Network/Commands.Network/Models/PSApplicationGatewayBackendHttpSettings.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ public class PSApplicationGatewayBackendHttpSettings : PSChildResource
4040
public bool? PickHostNameFromBackendAddress { get; set; }
4141
[Ps1Xml(Target = ViewControl.Table)]
4242
public string AffinityCookieName { get; set; }
43-
[Obsolete("Property 'ProbeEnabled' is ignored and will be removed from the 'PSApplicationGatewayBackendHttpSettings' type in a future release.")]
44-
[Ps1Xml(Target = ViewControl.Table)]
45-
public bool ProbeEnabled { get; set; }
4643
[Ps1Xml(Target = ViewControl.Table)]
4744
public string Path { get; set; }
4845
[Ps1Xml(Target = ViewControl.Table)]

src/ResourceManager/Network/Commands.Network/Models/PSVirtualNetwork.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ public class PSVirtualNetwork : PSTopLevelResource, IResourceReference
3636
[Ps1Xml(Target = ViewControl.Table)]
3737
public bool? EnableDdosProtection { get; set; }
3838

39-
[Ps1Xml(Target = ViewControl.Table)]
40-
public bool? EnableVmProtection { get; set; }
41-
4239
public PSResourceId DdosProtectionPlan { get; set; }
4340

4441
[JsonIgnore]
@@ -76,11 +73,5 @@ public string DdosProtectionPlanText
7673
{
7774
get { return JsonConvert.SerializeObject(DdosProtectionPlan, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
7875
}
79-
80-
[JsonIgnore]
81-
public string EnableVmProtectionText
82-
{
83-
get { return JsonConvert.SerializeObject(EnableVmProtection, Formatting.Indented, new JsonSerializerSettings() { NullValueHandling = NullValueHandling.Ignore }); }
84-
}
8576
}
8677
}

src/ResourceManager/Network/Commands.Network/ServiceEndpointPolicy/ServiceEndpointPolicyDefinition/GetAzureServiceEndpointPolicyDefinitionCommand.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ public class GetAzureServiceEndpointPolicyDefinitionCommand : NetworkBaseCmdlet
3535
HelpMessage = "The Service endpoint policy")]
3636
public PSServiceEndpointPolicy ServiceEndpointPolicy { get; set; }
3737

38-
[CmdletParameterBreakingChange("ResourceId", ChangeDescription = "Parameter is being deprecated without being replaced")]
39-
[Parameter(
40-
Mandatory = false,
41-
ValueFromPipelineByPropertyName = true,
42-
ParameterSetName = "GetByResourceIdParameterSet")]
43-
[ValidateNotNullOrEmpty]
44-
public virtual string ResourceId { get; set; }
45-
4638
public override void Execute()
4739
{
4840
if (this.ShouldProcess(Name, VerbsLifecycle.Restart))

src/ResourceManager/Network/Commands.Network/VirtualNetwork/GetAzureVirtualNetworkCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
namespace Microsoft.Azure.Commands.Network
2525
{
26-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new string[] { "EnableVmProtection" })]
2726
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetwork"), OutputType(typeof(PSVirtualNetwork))]
2827
public class GetAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet
2928
{

src/ResourceManager/Network/Commands.Network/VirtualNetwork/NewAzureVirtualNetworkCommand.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
namespace Microsoft.Azure.Commands.Network
2828
{
29-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new[] { "EnableVmProtection" })]
3029
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetwork", SupportsShouldProcess = true),OutputType(typeof(PSVirtualNetwork))]
3130
public class NewAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet
3231
{
@@ -90,16 +89,6 @@ public class NewAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet
9089
HelpMessage = "Reference to the DDoS protection plan resource associated with the virtual network.")]
9190
public string DdosProtectionPlanId { get; set; }
9291

93-
// TODO: Remove IfDef code
94-
#if !NETSTANDARD
95-
[CmdletParameterBreakingChange("EnableVmProtection", ChangeDescription = "The EnableVMProtection setting is no longer supported. Setting this parameter has no impact. This parameter will be removed in a future release. Please remove it from your scripts")]
96-
[Parameter(
97-
Mandatory = false,
98-
ValueFromPipelineByPropertyName = true,
99-
HelpMessage = "A switch parameter which represents if Vm protection is enabled or not.")]
100-
public SwitchParameter EnableVmProtection { get; set; }
101-
#endif
102-
10392
[Parameter(
10493
Mandatory = false,
10594
HelpMessage = "Do not ask for confirmation if you want to override a resource")]

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Peering/AddAzureVirtualNetworkPeeringCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ public class AddAzureVirtualNetworkPeeringCommand : VirtualNetworkPeeringBase
3232
[ValidateNotNullOrEmpty]
3333
public string Name { get; set; }
3434

35-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
3635
[Parameter(
3736
Mandatory = true,
3837
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/SetAzureVirtualNetworkCommand.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@
2323

2424
namespace Microsoft.Azure.Commands.Network
2525
{
26-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new string[] { "EnableVmProtection" })]
2726
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetwork"), OutputType(typeof(PSVirtualNetwork))]
2827
public class SetAzureVirtualNetworkCommand : VirtualNetworkBaseCmdlet
29-
{
30-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
28+
{
3129
[Parameter(
3230
Mandatory = true,
3331
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/AddAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
namespace Microsoft.Azure.Commands.Network
2323
{
24-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new string[] { "EnableVmProtection" })]
2524
[Cmdlet("Add", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetworkSubnetConfig", DefaultParameterSetName = "SetByResource"), OutputType(typeof(PSVirtualNetwork))]
2625
public class AddAzureVirtualNetworkSubnetConfigCommand : AzureVirtualNetworkSubnetConfigBase
2726
{
@@ -31,7 +30,6 @@ public class AddAzureVirtualNetworkSubnetConfigCommand : AzureVirtualNetworkSubn
3130
[ValidateNotNullOrEmpty]
3231
public override string Name { get; set; }
3332

34-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
3533
[Parameter(
3634
Mandatory = true,
3735
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/GetAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ public class GetAzureVirtualNetworkSubnetConfigCommand : NetworkBaseCmdlet
2828
HelpMessage = "The name of the subnet")]
2929
public string Name { get; set; }
3030

31-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
3231
[Parameter(
3332
Mandatory = true,
3433
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/RemoveAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
namespace Microsoft.Azure.Commands.Network
2121
{
22-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new string[] { "EnableVmProtection" })]
2322
[Cmdlet("Remove", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetworkSubnetConfig"), OutputType(typeof(PSVirtualNetwork))]
2423
public class RemoveAzureVirtualNetworkSubnetConfigCommand : NetworkBaseCmdlet
2524
{
@@ -29,7 +28,6 @@ public class RemoveAzureVirtualNetworkSubnetConfigCommand : NetworkBaseCmdlet
2928
[ValidateNotNullOrEmpty]
3029
public string Name { get; set; }
3130

32-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
3331
[Parameter(
3432
Mandatory = true,
3533
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222
namespace Microsoft.Azure.Commands.Network
2323
{
24-
[CmdletOutputBreakingChange(typeof(PSVirtualNetwork), DeprecatedOutputProperties = new string[] { "EnableVmProtection" })]
2524
[Cmdlet("Set", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "VirtualNetworkSubnetConfig", DefaultParameterSetName = "SetByResource"), OutputType(typeof(PSVirtualNetwork))]
2625
public class SetAzureVirtualNetworkSubnetConfigCommand : AzureVirtualNetworkSubnetConfigBase
2726
{
@@ -31,7 +30,6 @@ public class SetAzureVirtualNetworkSubnetConfigCommand : AzureVirtualNetworkSubn
3130
[ValidateNotNullOrEmpty]
3231
public override string Name { get; set; }
3332

34-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
3533
[Parameter(
3634
Mandatory = true,
3735
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetwork/TestAzurePrivateIpAddressAvailabilityCmdlet.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ namespace Microsoft.Azure.Commands.Network
2424
[Cmdlet("Test", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "PrivateIPAddressAvailability"), OutputType(typeof(PSIPAddressAvailabilityResult))]
2525
public class TestAzurePrivateIPAddressAvailabilityCmdlet : VirtualNetworkBaseCmdlet
2626
{
27-
[CmdletParameterBreakingChange("VirtualNetwork", ChangeDescription = "The EnableVMProtection property for the parameter Virtualnetwork is no longer supported. Setting this property has no impact. This property will be removed in a future release. Please remove it from your scripts")]
2827
[Parameter(
2928
Mandatory = true,
3029
ValueFromPipeline = true,

src/ResourceManager/Network/Commands.Network/VirtualNetworkGateway/SetAzureVirtualNetworkGatewayVpnClientConfig.cs

Lines changed: 0 additions & 121 deletions
This file was deleted.

0 commit comments

Comments
 (0)