Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter netem qdiscs in JSON output for improved clarity #2492

Merged
merged 1 commit into from
Feb 26, 2025
Merged

Conversation

FloSch62
Copy link
Member

Nodes that have not any impairments configured will return in json:

./containerlab tools netem show -n clab-vlan-srl2 -f json 
{
  "clab-vlan-srl2": null
}

otherwise we would have duplicated interfaces for some kinds, because of clsact or other qdisc types:

{
  "clab-edge": [
    {
      "interface": "eth1",
      "delay": "10ms",
      "jitter": "30ms",
      "packet_loss": 0.05,
      "rate": 700,
      "corruption": 0.09
    },
    {
      "interface": "eth1",
      "delay": "",
      "jitter": "",
      "packet_loss": 0,
      "rate": 0,
      "corruption": 0
    },
    
    ```

@hellt hellt merged commit 1bc67fa into main Feb 26, 2025
66 of 67 checks passed
@hellt hellt deleted the filter_netem branch February 26, 2025 11:44
Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 52.42%. Comparing base (134b828) to head (e6d82aa).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2492      +/-   ##
==========================================
- Coverage   52.47%   52.42%   -0.05%     
==========================================
  Files         172      172              
  Lines       17767    17768       +1     
==========================================
- Hits         9323     9315       -8     
- Misses       7458     7467       +9     
  Partials      986      986              
Files with missing lines Coverage Δ
cmd/tools_netem.go 68.00% <100.00%> (-1.45%) ⬇️

... and 1 file with indirect coverage changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants