Commit Graph
4 Commits
Author SHA1 Message Date
Christian ManivongandClaude Sonnet 4.6 ff37f3c59f fix: only parse HP/Aruba banner lines in parse_model_from_version
Guard against show version outputs that start with "Image stamp:" or
other non-banner lines — return ("", "") when the first line doesn't
begin with HP/HPE/Aruba.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 23:33:05 +02:00
Christian ManivongandClaude Sonnet 4.6 da5920a9bc fix: parse_model_from_version handles both HP banner orderings
Old switches show: "HP J9298A Switch 2520G-8-PoE" (model after Switch)
Newer switches:    "HP J9565A 2520G-8-PoE Switch" (model before Switch)

New approach: strip vendor prefix + J-code + "Switch" keyword, leaving
just the product name. Returns tuple (model, part_number).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 23:27:15 +02:00
Christian ManivongandClaude Sonnet 4.6 2be268a65e fix: extract J-code part numbers from ProCurve model strings
parse_system_info() now extracts HPE/HP J-codes (e.g. J9298A, J9777A)
from the System Model field and returns them as part_number separately.
The model name is cleaned of the J-code and surrounding punctuation:

  "HP J9298A Switch 2520G-8-PoE" → model="HP 2520G-8-PoE Switch", pn="J9298A"
  "HP2530-8G Switch(J9777A)"     → model="HP2530-8G Switch",       pn="J9777A"

get_facts() includes part_number in the returned dict so NetOrk can
store it on Device.part_number and pass it to NetBox device types.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-22 22:57:33 +02:00
Christian Manivong 35032fd034 initial commit 2026-05-29 09:30:53 +02:00