Skip to content

{Network} az network network-watcher packet-capture create: Make ring buffer command working#31624

Merged
necusjz merged 2 commits intoAzure:devfrom
v-sapanchal:spanchal/ringbuffer_hotfix_new
Jun 18, 2025
Merged

{Network} az network network-watcher packet-capture create: Make ring buffer command working#31624
necusjz merged 2 commits intoAzure:devfrom
v-sapanchal:spanchal/ringbuffer_hotfix_new

Conversation

@v-sapanchal
Copy link
Copy Markdown
Contributor

Related command
az network network-watcher packet-capture create'

Description
Removed the default values from old parameters to make ring buffer command working, as continuous-capture nullable parameter.

Testing Guide
az network network-watcher packet-capture create --network-watcher-name "NetworkWatcher_region" --packet-capture-name "clitestpcap24" --resource-group "RGName" --storage-location '{"storageId":"/subscriptions/SubId/resourceGroups/rg/providers/Microsoft.Storage/storageAccounts/SA"}' --target "/subscriptions/SubId/resourceGroups/rg/providers/Microsoft.Compute/virtualMachineScaleSets/vmssname" --continuous-capture true --capture-settings '{"FileCount":"10","FileSizeInBytes":"102400 ","SessionTimeLimitInSeconds":"100"}'

History Notes

[Component Name 1] BREAKING CHANGE: az command a: Make some customer-facing breaking change
[Component Name 2] az command b: Add some customer-facing feature


This checklist is used to make sure that common guidelines for a pull request are followed.

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Jun 10, 2025

️✔️AzureCLI-FullTest
️✔️acr
️✔️latest
️✔️3.12
️✔️3.9
️✔️acs
️✔️latest
️✔️3.12
️✔️3.9
️✔️advisor
️✔️latest
️✔️3.12
️✔️3.9
️✔️ams
️✔️latest
️✔️3.12
️✔️3.9
️✔️apim
️✔️latest
️✔️3.12
️✔️3.9
️✔️appconfig
️✔️latest
️✔️3.12
️✔️3.9
️✔️appservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️aro
️✔️latest
️✔️3.12
️✔️3.9
️✔️backup
️✔️latest
️✔️3.12
️✔️3.9
️✔️batch
️✔️latest
️✔️3.12
️✔️3.9
️✔️batchai
️✔️latest
️✔️3.12
️✔️3.9
️✔️billing
️✔️latest
️✔️3.12
️✔️3.9
️✔️botservice
️✔️latest
️✔️3.12
️✔️3.9
️✔️cdn
️✔️latest
️✔️3.12
️✔️3.9
️✔️cloud
️✔️latest
️✔️3.12
️✔️3.9
️✔️cognitiveservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️compute_recommender
️✔️latest
️✔️3.12
️✔️3.9
️✔️computefleet
️✔️latest
️✔️3.12
️✔️3.9
️✔️config
️✔️latest
️✔️3.12
️✔️3.9
️✔️configure
️✔️latest
️✔️3.12
️✔️3.9
️✔️consumption
️✔️latest
️✔️3.12
️✔️3.9
️✔️container
️✔️latest
️✔️3.12
️✔️3.9
️✔️containerapp
️✔️latest
️✔️3.12
️✔️3.9
️✔️core
️✔️latest
️✔️3.12
️✔️3.9
️✔️cosmosdb
️✔️latest
️✔️3.12
️✔️3.9
️✔️databoxedge
️✔️latest
️✔️3.12
️✔️3.9
️✔️dls
️✔️latest
️✔️3.12
️✔️3.9
️✔️dms
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventgrid
️✔️latest
️✔️3.12
️✔️3.9
️✔️eventhubs
️✔️latest
️✔️3.12
️✔️3.9
️✔️feedback
️✔️latest
️✔️3.12
️✔️3.9
️✔️find
️✔️latest
️✔️3.12
️✔️3.9
️✔️hdinsight
️✔️latest
️✔️3.12
️✔️3.9
️✔️identity
️✔️latest
️✔️3.12
️✔️3.9
️✔️iot
️✔️latest
️✔️3.12
️✔️3.9
️✔️keyvault
️✔️latest
️✔️3.12
️✔️3.9
️✔️lab
️✔️latest
️✔️3.12
️✔️3.9
️✔️managedservices
️✔️latest
️✔️3.12
️✔️3.9
️✔️maps
️✔️latest
️✔️3.12
️✔️3.9
️✔️marketplaceordering
️✔️latest
️✔️3.12
️✔️3.9
️✔️monitor
️✔️latest
️✔️3.12
️✔️3.9
️✔️mysql
️✔️latest
️✔️3.12
️✔️3.9
️✔️netappfiles
️✔️latest
️✔️3.12
️✔️3.9
️✔️network
️✔️latest
️✔️3.12
️✔️3.9
️✔️policyinsights
️✔️latest
️✔️3.12
️✔️3.9
️✔️privatedns
️✔️latest
️✔️3.12
️✔️3.9
️✔️profile
️✔️latest
️✔️3.12
️✔️3.9
️✔️rdbms
️✔️latest
️✔️3.12
️✔️3.9
️✔️redis
️✔️latest
️✔️3.12
️✔️3.9
️✔️relay
️✔️latest
️✔️3.12
️✔️3.9
️✔️resource
️✔️latest
️✔️3.12
️✔️3.9
️✔️role
️✔️latest
️✔️3.12
️✔️3.9
️✔️search
️✔️latest
️✔️3.12
️✔️3.9
️✔️security
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicebus
️✔️latest
️✔️3.12
️✔️3.9
️✔️serviceconnector
️✔️latest
️✔️3.12
️✔️3.9
️✔️servicefabric
️✔️latest
️✔️3.12
️✔️3.9
️✔️signalr
️✔️latest
️✔️3.12
️✔️3.9
️✔️sql
️✔️latest
️✔️3.12
️✔️3.9
️✔️sqlvm
️✔️latest
️✔️3.12
️✔️3.9
️✔️storage
️✔️latest
️✔️3.12
️✔️3.9
️✔️synapse
️✔️latest
️✔️3.12
️✔️3.9
️✔️telemetry
️✔️latest
️✔️3.12
️✔️3.9
️✔️util
️✔️latest
️✔️3.12
️✔️3.9
️✔️vm
️✔️latest
️✔️3.12
️✔️3.9

@azure-client-tools-bot-prd
Copy link
Copy Markdown

azure-client-tools-bot-prd bot commented Jun 10, 2025

⚠️AzureCLI-BreakingChangeTest
⚠️network
rule cmd_name rule_message suggest_message
⚠️ 1009 - ParaPropRemove network network-watcher packet-capture create cmd network network-watcher packet-capture create update parameter time_limit_in_seconds: removed property aaz_default=18000
⚠️ 1009 - ParaPropRemove network network-watcher packet-capture create cmd network network-watcher packet-capture create update parameter time_limit_in_seconds: removed property default=18000
⚠️ 1009 - ParaPropRemove network network-watcher packet-capture create cmd network network-watcher packet-capture create update parameter total_bytes_per_session: removed property aaz_default=1073741824
⚠️ 1009 - ParaPropRemove network network-watcher packet-capture create cmd network network-watcher packet-capture create update parameter total_bytes_per_session: removed property default=1073741824
⚠️ 1002 - CmdRemove network network-watcher packet-capture wait cmd network network-watcher packet-capture wait removed

@yonzhan
Copy link
Copy Markdown
Collaborator

yonzhan commented Jun 10, 2025

Thank you for your contribution! We will review the pull request and get back to you soon.

@github-actions
Copy link
Copy Markdown

The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR.

Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions).
After that please run the following commands to enable git hooks:

pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>

@microsoft-github-policy-service microsoft-github-policy-service bot added the Auto-Assign Auto assign by bot label Jun 10, 2025
@microsoft-github-policy-service microsoft-github-policy-service bot added the Network az network vnet/lb/nic/dns/etc... label Jun 10, 2025
@v-sapanchal v-sapanchal changed the title [[Network]] Hot fixes for ring buffer Packet capture command [Network] Hot fixes for ring buffer Packet capture command Jun 10, 2025
@necusjz necusjz changed the title [Network] Hot fixes for ring buffer Packet capture command {Network} az network network-watcher packet-capture create: Make ring buffer command working Jun 10, 2025
@necusjz
Copy link
Copy Markdown
Member

necusjz commented Jun 10, 2025

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 3 pipeline(s).

@necusjz necusjz marked this pull request as ready for review June 11, 2025 01:07
Copilot AI review requested due to automatic review settings June 11, 2025 01:07
@necusjz necusjz requested a review from wangzelin007 as a code owner June 11, 2025 01:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes default values for the time-limit and total-bytes parameters in the packet capture create command to support the ring buffer functionality.

  • Removed default value for --time-limit-in-seconds
  • Removed default value for --total-bytes/--total-bytes-per-session
Comments suppressed due to low confidence (2)

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/network_watcher/packet_capture/_create.py:116

  • [nitpick] Consider adding an inline comment explaining the rationale for removing the default value for --time-limit-in-seconds to help future maintainers understand this change.
default=18000,

src/azure-cli/azure/cli/command_modules/network/aaz/latest/network/network_watcher/packet_capture/_create.py:125

  • [nitpick] Consider adding an inline comment clarifying the removal of the default value for --total-bytes/--total-bytes-per-session to support continuous-capture scenarios.
default=1073741824,

@v-sapanchal
Copy link
Copy Markdown
Contributor Author

Please do not merge it now, need to get reviewed by team and then we are good.

@v-sapanchal
Copy link
Copy Markdown
Contributor Author

Please merge this PR, review part is done.
Thank you for your help.

@necusjz necusjz merged commit 9c704ce into Azure:dev Jun 18, 2025
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Auto-Assign Auto assign by bot Network az network vnet/lb/nic/dns/etc...

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants