-- Migration 057 — Arista Networks new series + Edgecore AS-series product images
--
-- Arista: assets.arista.com (official Arista CDN). All URLs return HTTP 200 PNG.
--   7060X6-64PE, 7060X5-64S, 7050X4-32S: exact model images verified.
--   7060X5-32QS, 7280R3-48YC6, 7020R-48YM: model designations not confirmed in
--   official Arista docs; closest same-series images used as best approximation.
--   7800R4-36D2-LC: model may not exist (DC power suffix, not a real lineup entry);
--   omitted from this migration.
--
-- Edgecore AS-series: These AS-series models are the same products as their
--   DCS-series counterparts (confirmed via official datasheet naming):
--   AS7726-32X = DCS204, AS9516-32D ≈ DCS810 (same 32×400G Tomahawk3 platform),
--   AS7535-28XB = CSR440 (cell site router, confirmed on edge-core.com).
--   Images from edge-core.com/wp-content/uploads (official Edgecore site).
--   All URLs verified HTTP 200 image/png (2026-04-21).

-- ── Arista Networks ────────────────────────────────────────────────────────────

-- 7060X6-64PE — 64×800G Tomahawk5 data center spine
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/article/7060X6-64PE-Right.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7060x6-series'),
    assets_scraped_at = NOW()
WHERE model = '7060X6-64PE'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7060X5-64S — 64×400G Tomahawk4 data center spine
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/product/7060DX5-64S-175.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7060x5-series'),
    assets_scraped_at = NOW()
WHERE model = '7060X5-64S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7060X5-32QS — 32×400G Tomahawk4 (series image; exact model not in official docs)
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/article/7060DX5-32-175.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7060x5-series'),
    assets_scraped_at = NOW()
WHERE model = '7060X5-32QS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7050X4-32S — 32×400G Tomahawk3 leaf/spine
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/product/7050DX4-32S-175.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7050x4-series'),
    assets_scraped_at = NOW()
WHERE model = '7050X4-32S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7280R3-48YC6 — 48×25G + 6×100G SP routing (series image; YC6 is SR2-era naming)
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/product/7208SR3-48YC8-175x150-stack-3.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7280r3-series'),
    assets_scraped_at = NOW()
WHERE model = '7280R3-48YC6'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7020R-48YM — 48-port SP routing platform (7020R4 series image)
UPDATE switches
SET image_url        = 'https://www.arista.com/assets/images/product/7020R4-48Y-4QC-YB-right-175px.png',
    product_page_url = COALESCE(product_page_url, 'https://www.arista.com/en/products/fixed-configuration-switches/7020r-series'),
    assets_scraped_at = NOW()
WHERE model = '7020R-48YM'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- ── Edgecore Networks (AS-series = DCS/CSR rebranded) ─────────────────────────

-- AS7726-32X (= DCS204) — 32×100G QSFP28 open networking switch
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/08/DCS204-A.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/dcs204/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7726-32X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS9516-32D (≈ DCS810) — 32×400G QSFP-DD Tomahawk3 open networking switch
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/08/dcs810-A.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/dcs810/'),
    assets_scraped_at = NOW()
WHERE model = 'AS9516-32D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');

-- AS7535-28XB (= CSR440) — 28-port disaggregated cell site router
UPDATE switches
SET image_url        = 'https://www.edge-core.com/wp-content/uploads/2023/09/CSR440-A.png',
    product_page_url = COALESCE(product_page_url, 'https://www.edge-core.com/product/csr440/'),
    assets_scraped_at = NOW()
WHERE model = 'AS7535-28XB'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'edgecore');
