[COMBINE] P0-stage: 257 устройств, 0 дублей, 11 placeholder удалено, поля domain/line/group/form_factor; прод не тронут
This commit is contained in:
1 parent
ca6564990c
commit
39fca83f57
4 files changed
+4603
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# P0 diff (staging vs normalized)
|
||||
|
||||
## Удалено
|
||||
- CM20+CS10
|
||||
- CM50+CS10-D+AP08
|
||||
- Host Wi-Fi
|
||||
- MB-CAM-6X/MB-CAM-12X
|
||||
- MeetingBar (unknown)
|
||||
- MeetingBoard (unknown)
|
||||
- T88W/T88V Pro
|
||||
- Third-Party Dante or Analog Microphone
|
||||
- Third-Party Dante or Analog Speaker
|
||||
- USB Connector
|
||||
- UVC84/UVC86
|
||||
- Wireless Content Sharing Dongle
|
||||
- Yealink (unknown)
|
||||
- Yealink Room Designer
|
||||
- Yealink Room Designer 2
|
||||
- Yealink RoomConnect
|
||||
|
||||
## Добавлено
|
||||
- T88V Pro
|
||||
- T88W Pro
|
||||
@@ -0,0 +1,66 @@
|
||||
# P0-stage каталога — 18.11.2026
|
||||
|
||||
Прод **не изменён**. Выход: `catalog-p0-2026-11-18.yaml`.
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| Было в normalized | 271 |
|
||||
| Стало | 257 |
|
||||
| Удалено placeholder | 11 |
|
||||
| Склеек разделено | 5 |
|
||||
|
||||
## Группы
|
||||
| Группа | Кол-во |
|
||||
|---|---|
|
||||
| T_telephony | 78 |
|
||||
| E_other | 66 |
|
||||
| A_integration_terminals | 29 |
|
||||
| D_usb_byod | 22 |
|
||||
| E_audio | 20 |
|
||||
| B_video_bars | 15 |
|
||||
| E_control | 10 |
|
||||
| E_display | 8 |
|
||||
| E_infra | 4 |
|
||||
| E_power | 3 |
|
||||
| E_mount | 2 |
|
||||
|
||||
## Домены
|
||||
| Домен | Кол-во |
|
||||
|---|---|
|
||||
| vcs | 110 |
|
||||
| telephony | 78 |
|
||||
| unknown | 60 |
|
||||
| infra | 9 |
|
||||
|
||||
## Вендоры
|
||||
| Вендор | Кол-во |
|
||||
|---|---|
|
||||
| yealink | 217 |
|
||||
| hitrolink | 14 |
|
||||
| poly | 14 |
|
||||
| logitech | 9 |
|
||||
| vinteo | 2 |
|
||||
| iva | 1 |
|
||||
|
||||
## Удалённые placeholder
|
||||
- Host Wi-Fi
|
||||
- Third-Party Dante or Analog Microphone
|
||||
- Third-Party Dante or Analog Speaker
|
||||
- USB Connector
|
||||
- Wireless Content Sharing Dongle
|
||||
- Yealink Room Designer
|
||||
- Yealink Room Designer 2
|
||||
- Yealink RoomConnect
|
||||
- MeetingBar (unknown)
|
||||
- MeetingBoard (unknown)
|
||||
- Yealink (unknown)
|
||||
|
||||
## Разделённые склейки
|
||||
- CM20+CS10 →
|
||||
- CM50+CS10-D+AP08 →
|
||||
- MB-CAM-6X/MB-CAM-12X → MB-CAM-6X, MB-CAM-12X
|
||||
- UVC84/UVC86 → UVC84, UVC86
|
||||
- T88W/T88V Pro → T88W Pro, T88V Pro
|
||||
|
||||
## Группа C
|
||||
Подтверждённых SIP/H.323 баров: **0**.
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,212 @@
|
||||
#!/usr/bin/env python3
|
||||
"""P0-stage: чистка нормализованного каталога Комбайна (без замены прода)."""
|
||||
import json
|
||||
import re
|
||||
import yaml
|
||||
from collections import Counter
|
||||
|
||||
SRC = "/root/buryan-infra/ops/combine/catalog-normalized-2026-11-18.yaml"
|
||||
OUT = "/root/buryan-infra/ops/combine/catalog-p0-2026-11-18.yaml"
|
||||
REP = "/root/buryan-infra/ops/combine/P0-STAGE-REPORT-2026-11-18.md"
|
||||
GOLD = "/root/buryan-infra/ops/combine/P0-DIFF-2026-11-18.md"
|
||||
|
||||
data = yaml.safe_load(open(SRC, encoding="utf-8"))
|
||||
devs = data.get("devices") or []
|
||||
|
||||
SPLIT = {
|
||||
"PVB 860/750/650": ["PVB 860", "PVB 750", "PVB 650"],
|
||||
"PVB650/750C": ["PVB 650C", "PVB 750C"],
|
||||
"UVC84/UVC86": ["UVC84", "UVC86"],
|
||||
"MB-CAM-6X/MB-CAM-12X": ["MB-CAM-6X", "MB-CAM-12X"],
|
||||
"MTouch II/MTouch Plus/MTouch E2": ["MTouch II", "MTouch Plus", "MTouch E2"],
|
||||
"Meetingboard 65/86": ["MeetingBoard 65", "MeetingBoard 86"],
|
||||
"MeetingEye800, MeetingEye600, MeetingEye400; VC880, VC800, VC500, VC200, VC200-E, VP59-VCS": [
|
||||
"MeetingEye 800", "MeetingEye 600", "MeetingEye 400", "VC880", "VC800",
|
||||
"VC500", "VC200", "VC200-E", "VP59-VCS"],
|
||||
"T88W/T88V Pro": ["T88W Pro", "T88V Pro"],
|
||||
"T88W (Pro)/T88V Pro": ["T88W Pro", "T88V Pro"],
|
||||
"CM20+CS10": [], "CM50+CS10-D+AP08": [], "CM20CS10": [],
|
||||
"RCH40pRCH40 E2": ["RCH40 E2"], "RCH40&RCH40 E2": ["RCH40 E2"],
|
||||
}
|
||||
REMOVE = {
|
||||
"Third-Party Dante or Analog Microphone", "Third-Party Dante or Analog Speaker",
|
||||
"Yealink Room Designer", "Yealink Room Designer 2", "Yealink RoomConnect",
|
||||
"USB Connector", "Host Wi-Fi", "Wireless Content Sharing Dongle",
|
||||
"Yealink (unknown)", "MeetingBar (unknown)", "MeetingBoard (unknown)",
|
||||
}
|
||||
|
||||
|
||||
def canon(name):
|
||||
n = (name or "").strip()
|
||||
n = re.sub(r"\s*\((?:1|2|3|Only.*?|included.*?)\)\s*$", "", n, flags=re.I)
|
||||
n = re.sub(r"\s*\[\d+\]\s*$", "", n)
|
||||
return n.strip()
|
||||
|
||||
|
||||
def role_of(name, old_role):
|
||||
n = (name or "").lower()
|
||||
if n.startswith("meetingbar") or n.startswith("meetingboard") or n.startswith("pvb"):
|
||||
return "codec"
|
||||
if any(x in n for x in ("meetingeye", "mcore", "mvc", "pvt", "vc8", "vp59")):
|
||||
return "codec"
|
||||
if n.startswith("uvc") or "smartvision" in n or "mb-cam" in n or "cam50" in n:
|
||||
return "camera"
|
||||
if any(x in n for x in ("vcm", "cm20", "cm50", "mspeaker", "pa20", "cp50", "cp70", "cp90", "cp96", "cpe", "cpw", "cs10", "ap08", "mspeech")):
|
||||
return "audio"
|
||||
if "ctp" in n or "mtouch" in n:
|
||||
return "touch"
|
||||
if any(x in n for x in ("vch", "wpp", "avbridge", "avhub", "roomcast", "byod-box")):
|
||||
return "sharing_hub"
|
||||
if "display" in n or "etv" in n or "телевизор" in n or "проектор" in n:
|
||||
return "display"
|
||||
if any(x in n for x in ("rch", "ax83", "ax86", "switch")):
|
||||
return "switch"
|
||||
if any(x in n for x in ("mount", "mtower", "mb-fs")):
|
||||
return "mount"
|
||||
if any(x in n for x in ("yps", "power", "розетка", "заряд")):
|
||||
return "power"
|
||||
if any(x in n for x in ("sip-t", "t88", "w70", "wh6", "uh3", "uh4", "bh7", "cp9", "cp7", "ehs")):
|
||||
return "phone"
|
||||
return old_role or "unknown"
|
||||
|
||||
|
||||
def group_of(name, role, domain, protocols):
|
||||
n = (name or "").lower()
|
||||
if domain == "telephony":
|
||||
return "T_telephony"
|
||||
if role == "codec" and any(x in n for x in ("meetingeye", "mcore", "mvc", "pvt", "pvb", "vc8", "vp59")):
|
||||
return "A_integration_terminals"
|
||||
if n.startswith("meetingbar") or n.startswith("meetingboard"):
|
||||
return "B_video_bars"
|
||||
if n.startswith("uvc") or "smartvision" in n or "mb-cam" in n or "cam50" in n:
|
||||
return "D_usb_byod"
|
||||
if any(x in n for x in ("vch", "wpp", "byod")):
|
||||
return "D_usb_byod"
|
||||
if any(x in n for x in ("vcm", "cm20", "cm50", "mspeaker", "pa20", "cp50", "cp70", "cp90", "cp96", "cpe", "cpw", "cs10", "ap08", "mspeech")):
|
||||
return "E_audio"
|
||||
if "ctp" in n or "mtouch" in n:
|
||||
return "E_control"
|
||||
if "display" in n or "etv" in n or "телевизор" in n or "проектор" in n:
|
||||
return "E_display"
|
||||
if any(x in n for x in ("rch", "ax83", "ax86")):
|
||||
return "E_infra"
|
||||
if any(x in n for x in ("mount", "mtower", "mb-fs")):
|
||||
return "E_mount"
|
||||
if any(x in n for x in ("yps", "power", "розетка", "заряд")):
|
||||
return "E_power"
|
||||
return "E_other"
|
||||
|
||||
|
||||
def line_of(group, domain, role, name):
|
||||
if domain == "telephony":
|
||||
return "telephony." + ("dect" if any(x in name.lower() for x in ("w70", "ax8", "w53", "w80", "w90")) else
|
||||
"headset" if role in ("headset",) or any(x in name.lower() for x in ("uh", "bh", "ehs")) else
|
||||
"conference" if name.lower().startswith("cp") else "sip")
|
||||
return {
|
||||
"A_integration_terminals": "vcs.terminals",
|
||||
"B_video_bars": "vcs.bar" if name.lower().startswith("meetingbar") else "vcs.board",
|
||||
"D_usb_byod": "vcs.usb_byod",
|
||||
"E_audio": "vcs.audio",
|
||||
"E_control": "vcs.panels",
|
||||
"E_display": "passive.display",
|
||||
"E_infra": "infrastructure.switch",
|
||||
"E_mount": "passive.mount",
|
||||
"E_power": "passive.power",
|
||||
}.get(group, "vcs.other")
|
||||
|
||||
|
||||
def form_of(name, role, group):
|
||||
n = (name or "").lower()
|
||||
if n.startswith("meetingbar"):
|
||||
return "bar"
|
||||
if n.startswith("meetingboard"):
|
||||
return "board"
|
||||
if group == "A_integration_terminals":
|
||||
return "terminal"
|
||||
if role in ("camera", "audio", "touch", "display", "mount", "switch", "power", "phone"):
|
||||
return role
|
||||
return "accessory"
|
||||
|
||||
|
||||
out, removed, split = [], [], []
|
||||
seen = set()
|
||||
for d in devs:
|
||||
name = d.get("model") or ""
|
||||
if name in REMOVE:
|
||||
removed.append(name)
|
||||
continue
|
||||
names = SPLIT.get(name, [name])
|
||||
if name in SPLIT:
|
||||
split.append((name, names))
|
||||
for nm in names:
|
||||
nm = canon(nm)
|
||||
if not nm or nm in seen:
|
||||
continue
|
||||
# drop suffix aliases to canonical
|
||||
seen.add(nm)
|
||||
protocols = d.get("protocols") or []
|
||||
domain = "telephony" if (d.get("domain") == "telephony" or nm.lower().startswith(("sip-t", "t88", "w70", "ax8", "cp9", "uh", "bh", "ehs"))) else d.get("domain") or "vcs"
|
||||
role = role_of(nm, d.get("role"))
|
||||
grp = group_of(nm, role, domain, protocols)
|
||||
rec = {
|
||||
"id": d.get("id", "unknown") if nm == name else ("gen." + re.sub(r"[^a-z0-9]+", "-", nm.lower()).strip("-")),
|
||||
"vendor": d.get("vendor", "yealink"), "model": nm, "aliases": d.get("aliases") or [],
|
||||
"domain": domain, "line": line_of(grp, domain, role, nm),
|
||||
"group": grp, "role": role, "form_factor": form_of(nm, role, grp),
|
||||
"native_vcs": grp in ("A_integration_terminals", "B_video_bars", "C_sip_h323", "T_telephony"),
|
||||
"protocols": protocols, "protocols_status": d.get("protocols_status", "unknown"),
|
||||
"source": d.get("source") or {"kind": "catalog", "verified": False},
|
||||
"version": "2026-11-18",
|
||||
}
|
||||
out.append(rec)
|
||||
|
||||
# group C only with confirmed protocols; none expected
|
||||
for r in out:
|
||||
if any(x in (r.get("protocols") or []) for x in ("SIP", "H.323")) and r["form_factor"] in ("bar", "terminal"):
|
||||
r["group"] = "C_sip_h323"
|
||||
r["line"] = "vcs.sip"
|
||||
|
||||
# dedupe by model, keep first
|
||||
final, seen2 = [], set()
|
||||
for r in out:
|
||||
if r["model"] in seen2:
|
||||
continue
|
||||
seen2.add(r["model"])
|
||||
final.append(r)
|
||||
|
||||
yaml.safe_dump({"version": "2026-11-18", "status": "p0-stage", "devices": final},
|
||||
open(OUT, "w", encoding="utf-8"), allow_unicode=True, sort_keys=False)
|
||||
|
||||
groups = Counter(r["group"] for r in final)
|
||||
domains = Counter(r["domain"] for r in final)
|
||||
vendors = Counter(r["vendor"] for r in final)
|
||||
orig = len(devs)
|
||||
lines = ["# P0-stage каталога — 18.11.2026", "",
|
||||
"Прод **не изменён**. Выход: `catalog-p0-2026-11-18.yaml`.", "",
|
||||
"| | |", "|---|---|",
|
||||
"| Было в normalized | %d |" % orig,
|
||||
"| Стало | %d |" % len(final),
|
||||
"| Удалено placeholder | %d |" % len(removed),
|
||||
"| Склеек разделено | %d |" % len(split), "",
|
||||
"## Группы", "| Группа | Кол-во |", "|---|---|"]
|
||||
for k, n in groups.most_common():
|
||||
lines.append("| %s | %d |" % (k, n))
|
||||
lines += ["", "## Домены", "| Домен | Кол-во |", "|---|---|"]
|
||||
for k, n in domains.most_common():
|
||||
lines.append("| %s | %d |" % (k, n))
|
||||
lines += ["", "## Вендоры", "| Вендор | Кол-во |", "|---|---|"]
|
||||
for k, n in vendors.most_common():
|
||||
lines.append("| %s | %d |" % (k, n))
|
||||
lines += ["", "## Удалённые placeholder", *["- " + x for x in removed]]
|
||||
lines += ["", "## Разделённые склейки", *["- %s → %s" % (a, ", ".join(b)) for a, b in split]]
|
||||
lines += ["", "## Группа C", "Подтверждённых SIP/H.323 баров: **%d**." % sum(1 for r in final if r["group"] == "C_sip_h323")]
|
||||
open(REP, "w", encoding="utf-8").write("\n".join(lines) + "\n")
|
||||
|
||||
# diff: removed names and added names vs source models
|
||||
old_names = {d.get("model") for d in devs}
|
||||
new_names = {r["model"] for r in final}
|
||||
diff = ["# P0 diff (staging vs normalized)", "",
|
||||
"## Удалено", *["- " + x for x in sorted(old_names - new_names)],
|
||||
"", "## Добавлено", *["- " + x for x in sorted(new_names - old_names)]]
|
||||
open(GOLD, "w", encoding="utf-8").write("\n".join(diff) + "\n")
|
||||
print("stage", len(final), "groups", dict(groups), "domains", dict(domains), "removed", len(removed))
|
||||
Reference in new issue
Block a user