Skip to content

Commit 7ff173a

Browse files
[Network] New-AzNetworkWatcherPacketCapture - TotalBytesPerSession with incorrect data type (#20504)
* resolved the TotalBytesPerSession limit issue * suppress the warning messages of the breaking change analyzer by adding all the error in BreakingChangeIssues.csv file * Update ChangeLog.md Co-authored-by: Yeming Liu <[email protected]>
1 parent 9a3ae62 commit 7ff173a

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

src/Network/Network/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
--->
2020

2121
## Upcoming Release
22+
* Fixed the incorrect type of `-TotalBytesPerSession` in `New-AzNetworkWatcherPacketCapture`
2223

2324
## Version 5.3.0
2425
* Added samples for retrieving Private Link IP Configuration using 'New-AzApplicationGatewayPrivateLinkIpConfiguration' with fix [#20440]

src/Network/Network/Models/PSGetPacketCaptureResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class PSGetPacketCaptureResult : PSChildResource
3737
public int? BytesToCapturePerPacket { get; set; }
3838

3939
[Ps1Xml(Target = ViewControl.Table)]
40-
public int? TotalBytesPerSession { get; set; }
40+
public uint? TotalBytesPerSession { get; set; }
4141

4242
[Ps1Xml(Target = ViewControl.Table)]
4343
public int? TimeLimitInSeconds { get; set; }

src/Network/Network/Models/PSPacketCaptureResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public class PSPacketCaptureResult : PSChildResource
3535
public int? BytesToCapturePerPacket { get; set; }
3636

3737
[Ps1Xml(Target = ViewControl.Table)]
38-
public int? TotalBytesPerSession { get; set; }
38+
public uint? TotalBytesPerSession { get; set; }
3939

4040
[Ps1Xml(Target = ViewControl.Table)]
4141
public int? TimeLimitInSeconds { get; set; }

src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public class NewAzureNetworkWatcherPacketCaptureCommand : PacketCaptureBaseCmdle
111111
ValueFromPipelineByPropertyName = true,
112112
HelpMessage = "Total bytes per session.")]
113113
[ValidateNotNull]
114-
[ValidateRange(1, int.MaxValue)]
115-
public int? TotalBytesPerSession { get; set; }
114+
[ValidateRange(1, uint.MaxValue)]
115+
public uint? TotalBytesPerSession { get; set; }
116116

117117
[Parameter(
118118
Mandatory = false,

src/Network/Network/NetworkWatcher/PacketCapture/NewAzureNetworkWatcherPacketCaptureCommandV2.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@ public class NewAzureNetworkWatcherPacketCaptureCommandV2 : PacketCaptureBaseCmd
111111
ValueFromPipelineByPropertyName = true,
112112
HelpMessage = "Total bytes per session.")]
113113
[ValidateNotNull]
114-
[ValidateRange(1, int.MaxValue)]
115-
public int? TotalBytesPerSession { get; set; }
114+
[ValidateRange(1, uint.MaxValue)]
115+
public uint? TotalBytesPerSession { get; set; }
116116

117117
[Parameter(
118118
Mandatory = false,

tools/StaticAnalysis/Exceptions/Az.Network/BreakingChangeIssues.csv

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@
33
"Az.Network","Microsoft.Azure.Commands.Network.Automation.GetAzureRmDdosProtectionPlan","Get-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddressesText' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddressesText' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'."
44
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureRmDdosProtectionPlan","New-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddresses' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddresses' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'."
55
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureRmDdosProtectionPlan","New-AzDdosProtectionPlan","0","3010","The property 'PublicIpAddressesText' of type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan' has been removed.","Add the property 'PublicIpAddressesText' back to type 'Microsoft.Azure.Commands.Network.Models.PSDdosProtectionPlan'."
6+
"Az.Network","Microsoft.Azure.Commands.Network.GetAzureNetworkWatcherPacketCaptureCommand","Get-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."
7+
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommand","New-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."
8+
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommand","New-AzNetworkWatcherPacketCapture","0","3030","The generic type for 'parameter TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'parameter TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."
9+
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommandV2","New-AzNetworkWatcherPacketCaptureV2","0","3030","The generic type for 'property TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'property TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."
10+
"Az.Network","Microsoft.Azure.Commands.Network.NewAzureNetworkWatcherPacketCaptureCommandV2","New-AzNetworkWatcherPacketCaptureV2","0","3030","The generic type for 'parameter TotalBytesPerSession' has been changed from 'System.Nullable`1[System.Int32]' to 'System.Nullable`1[System.UInt32]'. ","Change the generic type for 'parameter TotalBytesPerSession' back to 'System.Nullable`1[System.Int32]'."

0 commit comments

Comments
 (0)