Skip to content

status: Add dual-stack mgmt address support and integration coverage#3532

Merged
ipspace merged 2 commits into
ipspace:devfrom
moogzy:enhancement/add_dualstack_mgmt_address_support_to_status
Jun 30, 2026
Merged

status: Add dual-stack mgmt address support and integration coverage#3532
ipspace merged 2 commits into
ipspace:devfrom
moogzy:enhancement/add_dualstack_mgmt_address_support_to_status

Conversation

@moogzy

@moogzy moogzy commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Summary:

Add dual-stack management visibility in netlab status output with integration coverage for that behaviour.

Addresses #3358

// Previous behaviour

vscode ➜ /workspaces/netlab/tests (dev) $ netlab status
Lab default in /workspaces/netlab/tests
  status:      started
  topology:    platform-integration/cli/12-status-mgmt-dual-stack.yml
  provider(s): clab

┏━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┓
┃ node ┃ device ┃ image              ┃ mgmt IPv4      ┃ connection ┃ provider ┃ VM/container ┃ status       ┃
┡━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━┩
│ x    │ linux  │ python:3.13-alpine │ 192.168.121.11 │ docker     │ clab     │ clab-cli-x   │ Up 8 seconds │
└──────┴────────┴────────────────────┴────────────────┴────────────┴──────────┴──────────────┴──────────────┘

// New behaviour - backwards compatible with default v4 address only

vscode ➜ /workspaces/netlab/tests (dev) $ ../netlab status
Lab default in /workspaces/netlab/tests
  status:      started
  topology:    platform-integration/cli/13-status-mgmt-v4-only.yml
  provider(s): clab

┏━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ node ┃ device ┃ image              ┃ mgmt  IP       ┃ connection ┃ provider ┃ VM/container ┃ status        ┃
┡━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ x    │ linux  │ python:3.13-alpine │ 192.168.121.21 │ docker     │ clab     │ clab-cli-x   │ Up 10 seconds │
└──────┴────────┴────────────────────┴────────────────┴────────────┴──────────┴──────────────┴───────────────┘

// New behaviour - dual-stack support

vscode ➜ /workspaces/netlab/tests (dev) $ ../netlab status
Lab default in /workspaces/netlab/tests
  status:      started
  topology:    platform-integration/cli/12-status-mgmt-dual-stack.yml
  provider(s): clab

┏━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
┃ node ┃ device ┃ image              ┃ mgmt IP          ┃ connection ┃ provider ┃ VM/container ┃ status        ┃
┡━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
│ x    │ linux  │ python:3.13-alpine │ 192.168.121.11   │ docker     │ clab     │ clab-cli-x   │ Up 17 seconds │
│      │        │                    │ 2001:db8:121::11 │            │          │              │               │
└──────┴────────┴────────────────────┴──────────────────┴────────────┴──────────┴──────────────┴───────────────┘

Changes:

  1. Show IPv6 management address on a new line under IPv4 in status mgmt column.
  2. Add platform integration test for v4-only and dual-stack status output.
  3. Fix integration validation script warning by initializing error counter and quoting file paths.

Copilot AI review requested due to automatic review settings June 27, 2026 08:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 enhances the netlab status CLI output to improve management IP visibility by showing dual-stack (IPv4 + IPv6) management addressing, and adds platform integration tests to cover the new status output behavior.

Changes:

  • Update netlab status to display IPv6 management addresses (when present) alongside IPv4 in the mgmt column.
  • Add platform integration CLI tests for IPv4-only and dual-stack mgmt status output.
  • Fix tests/check-integration-tests.sh robustness by initializing the error counter and quoting file paths.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
netsim/cli/status.py Adds IPv6 mgmt capture and renders mgmt as multi-line output in the status table.
tests/platform-integration/cli/12-status-mgmt-dual-stack.yml New integration test ensuring status output contains both IPv4 and IPv6 mgmt addresses.
tests/platform-integration/cli/13-status-mgmt-v4-only.yml New integration test ensuring status output contains the IPv4 mgmt address for IPv4-only nodes.
tests/check-integration-tests.sh Initializes err_cnt and quotes $file to avoid validation script warnings/word-splitting issues.

Comment thread netsim/cli/status.py Outdated
Comment thread netsim/cli/status.py
@moogzy moogzy requested a review from Copilot June 27, 2026 09:08
@moogzy moogzy changed the title status: improve dual-stack mgmt display and integration coverage status: Add dual-stack mgmt address support and integration coverage Jun 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread tests/check-integration-tests.sh
Comment thread netsim/cli/status.py
@moogzy moogzy force-pushed the enhancement/add_dualstack_mgmt_address_support_to_status branch from 521a636 to 464919e Compare June 27, 2026 09:32
Comment thread netsim/cli/status.py Outdated

@ipspace ipspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nice job. The "do not set mgmt on tools" should be reverted because it changes JSON data. Other than that, it's just a few minor quirks/nits.

Thank you!

Comment thread netsim/cli/status.py Outdated
Comment thread netsim/cli/status.py Outdated
Comment thread netsim/cli/status.py Outdated

for n_name,n_data in ls.nodes.items():
row = [ n_name, n_data.device, n_data.image, n_data.get('mgmt',''),
mgmt = f'{n_data.mgmt}\n{n_data.mgmt6}' if n_data.get('mgmt6') else n_data.get('mgmt')

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

If you leave the old n_data.get('mgmt','') as the fallback expression, then you don't need to set 'mgmt' for tools.

Comment thread tests/platform-integration/cli/13-status-mgmt-v4-only.yml Outdated
Comment thread tests/check-integration-tests.sh
Comment thread docs/netlab/status.md Outdated
@moogzy moogzy force-pushed the enhancement/add_dualstack_mgmt_address_support_to_status branch 3 times, most recently from c93bf03 to 2652e94 Compare June 30, 2026 08:09
Fixes ipspace#3358

What changed:

- Render node management addresses in netlab status with IPv6 on a new line under IPv4 in the mgmt column.

- Add platform integration test tests/platform-integration/cli/12-status-mgmt.yml to validate dual-stack mgmt output.

- Harden tests/check-integration-tests.sh by initializing err_cnt and quoting topology path arguments.

Why:

- The status output did not clearly present dual-stack management addresses and could be ambiguous/truncated in narrow output.

- Integration validation emitted a noisy shell warning when err_cnt was unset.
@moogzy moogzy force-pushed the enhancement/add_dualstack_mgmt_address_support_to_status branch from 2652e94 to 4b998d4 Compare June 30, 2026 08:17

@ipspace ipspace left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Great job. Thank you and welcome to the contributors club ;)

Comment thread netsim/cli/status.py Outdated
@ipspace ipspace merged commit 53498eb into ipspace:dev Jun 30, 2026
6 checks passed
ipspace added a commit that referenced this pull request Jun 30, 2026
The changes made in #3532 fixed the CI/CD harness that checks the
integration tests against the 'none' device. As more tests being run,
we have to update the device features to pass this expanded set of tests.
ipspace added a commit that referenced this pull request Jun 30, 2026
The changes made in #3532 fixed the CI/CD harness that checks the
integration tests against the 'none' device. As more tests being run,
we have to update the device features to pass this expanded set of tests.
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.

3 participants