Skip to content

schema+wire+fixtures: get_ip_addresses flat defaults + SSH prefix (#329) - #389

Draft
AdamRickards wants to merge 1 commit into
mainfrom
review/329-ip-addresses
Draft

AdamRickards wants to merge 1 commit into
mainfrom
review/329-ip-addresses

Conversation

@AdamRickards

Copy link
Copy Markdown
Owner

Draft for sidecar live proof; do not merge.

Replaces get_ip_addresses defaults: {ipv4: {}} with the flat scalar shape (ipv4_address, ipv4_prefix, ipv4_gateway) and wires SSH ipv4_prefix from show network parms Subnetmask via a new net_mask_to_prefix value_map in base wire/netconfig.yaml (#329). Fixtures: sanitized hm2NetStaticGroup block (RFC 5737 placeholder) in config_nvm_sample.xml, gold_floors.json get_ip_addresses regenerated to 3 leaves, floors_provenance ssh untested -> pass, FLOORS_BOARD.md regenerated.

Offline (tested):

  • On main, SSH sends no command and MOPS returns only {ipv4: {}} even against a fixture that carries hm2NetStaticGroup; on this head both return the 3 leaves (prefix 24 via the value_map).
  • offline_gold_matrix.py --methods get_ip_addresses: 3 real leaf matches (main: 1 vacuous "both empty").
  • New gold mismatch: get_management.prefix_length offline=24 gold=0. The new fixture block also feeds get_management, whose gold was not regenerated.

Live (untested, pending): sidecar get_ip_addresses.read mops/snmp/ssh on this head vs main. The ssh: pass provenance flip is pending that proof.

  • pytest tests/: pass
  • scripts/ci_offline.sh: pass
  • generate_floors_board.py --check: pass
  • tests/offline_gold_matrix.py: fail (2 known on main + 1 new, above)

Schema, wire YAML and fixtures only; no Engine files.

Related #329

defaults: {ipv4: {}} replaced by the flat scalar shape
{ipv4_address: '', ipv4_prefix: 0, ipv4_gateway: ''}, matching the
schema's own "Management IP" note that this method is a scalar dict,
not a per-interface table.

SSH: hm2netprefixlength wired to "show network parms" Subnetmask via a
new net_mask_to_prefix value_map (33 entries, prefix 0-32) in base
wire/netconfig.yaml. It sits in the base file because the load_wire()
overlay merge reads only attributes: (see companion park row).

Fixtures: sanitized hm2NetStaticGroup scalar block (RFC 5737
TEST-NET-1 placeholder) added to config_nvm_sample.xml; gold_floors.json
get_ip_addresses regenerated from {"ipv4": {}} to the 3 leaves the
fixture now produces. The old floor came from 259aee0 (#192) as an
empty Offline leaf. floors_provenance ssh untested -> pass and
FLOORS_BOARD.md regenerated; catalogue_inventory_draft.md note updated.

Schema, wire YAML and test fixtures only; no Engine files.
Live sidecar proof: untested (pending). Draft; do not merge.

Related #329
@AdamRickards

Copy link
Copy Markdown
Owner Author

Sidecar live proof + claims review for head 8e319fd: #329 (comment)

Verdict: partial. All 3 protocols now gather live and agree. The gold regeneration misses get_management (new offline_gold mismatch get_management.prefix_length). Companion park review: #329 (comment)

Draft; do not merge.

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.

1 participant