feat(UME): 完善网元字段注释并补齐IPv6地址字段

为 ume_inventory_ne 的关键字段补充建表注释并在启动时执行 COMMENT ON 同步历史库结构,同时新增 ipv6_address 字段并完成入库映射、接口返回与前端类型定义对齐。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-08 22:19:06 +08:00
parent 037873423d
commit d0994f6e53
6 changed files with 67 additions and 18 deletions

View file

@ -187,6 +187,7 @@ def sync_inventory_full(db: Session, client: UMEClient, *, trigger_mode: str = "
existing.ne_name = _s(_pick(row, "name", "ne-name"))
existing.user_label = _s(_pick(row, "user-label", "user_label"))
existing.ip_address = _s(_pick(row, "ip-Address", "ip-address", "ip"))
existing.ipv6_address = _s(_pick(row, "ipv6-address", "ipv6_address"))
existing.ne_type = _s(_pick(row, "type", "ne-type"))
existing.device_level = _s(_pick(row, "device-level"))
existing.host_name = _s(_pick(row, "host-name"))