Skip to content

[CLI] Enhanced sequence introspection in nw info command #39

@mischadiehm

Description

@mischadiehm

Context

The pypi-support branch included WIP work on improved sequence introspection for the nw info command. The GlobalSequenceInfoTableProvider was added and integrated, but the full vision for enhanced introspection was not completed.

Identified in PR for pypi-support branch merge.

Current State

  • GlobalSequenceInfoTableProvider is implemented and working
  • nw info sequences shows sequence information
  • Global sequences now properly displayed via new provider
  • WIP commit "introstpection info comman ds" added foundation

Desired State

Complete the enhanced sequence introspection feature:

  1. Unified sequence view: Show all sequences regardless of source in one view
  2. Source attribution: Clearly indicate where each sequence comes from (global, vendor, device)
  3. Conflict detection: Highlight when same sequence name exists in multiple sources
  4. Filter options: Filter by source type (--global, --vendor, --device)

Example output:

Sequences Overview
------------------
Sequence Name    | Source Type | Defined In           | Commands
-----------------|-------------|----------------------|----------
backup           | global      | sequences/global.yml | 3
health-check     | vendor      | mikrotik, cisco      | varies
custom-audit     | device      | router1, router2     | 5

Implementation Notes

Files Likely Affected

  • src/network_toolkit/commands/info.py - Add new subcommand or enhance existing
  • src/network_toolkit/common/table_providers.py - May need new provider
  • tests/test_info.py - Add tests for new functionality

Acceptance Criteria

  • Single command shows all sequences from all sources
  • Source type clearly indicated for each sequence
  • Filtering by source type works
  • Output is clear and actionable
  • Verbose mode shows additional details

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions