-- Migration 081 — Cisco NCS 540/540X, N560 IMA, ASR-9900-RP; upgrade ASR-9902/9903 + NCS1001/1002
--
-- All URLs verified HTTP 200 (2026-04-21).
--
-- N560 IMA modules: official Cisco TD CDN (524xxx range, 38–213KB JPEG).
--   The four IMA line-card modules documented in the NCS 560 Hardware Guide.
--
-- N540 fixed-port models (6Z / FH-AGG / FH-CSR):
--   6Z models: Cisco TD CDN (369xxx range, 15–20KB JPEG).
--   Fronthaul models (FH-AGG, FH-CSR): manualslib.com product photo CDN (46KB JPEG).
--     Both FH variants share the same physical 1U chassis; a single photo covers
--     both the Aggregation and Cell-Site Router SKUs.
--
-- N540 high-density model (24Q8L2DD):
--   manualslib.com product-images CDN (44KB JPEG, confirmed 200 OK).
--
-- N540X series: Cisco TD CDN (521xxx / 522xxx range, 27–54KB JPEG).
--   Six of the eight N540X models have individual front-panel TD photos.
--   N540X-12Z16G-SYS-A/D: eBay product listing CDN (128–218KB JPEG, confirmed 200 OK).
--     These are the only accessible high-quality photos for these two variants;
--     eBay CDN serves them from the ebayimg.com host, which has been stable.
--   N540X-16Z8Q2C-D: eBay product listing CDN (63KB JPEG).
--   N540X-ACC-SYS: signellent.com (Cisco reseller) product image (193KB PNG).
--
-- ASR-9900 Route Processors (SE / TR):
--   brightstarsystems.com (Cisco refurb reseller) product images (13–14KB JPEG).
--     No accessible Cisco official CDN image found for these RP modules.
--
-- Upgrades (models already have images; switching to official Cisco CDN):
--   ASR-9902 / ASR-9903: Cisco support CDN (80–124KB JPEG, official).
--     Migration 073 used tempestns.com; upgrading to cisco.com/c/dam/assets/support/.
--   NCS1001-K9 / NCS1002-K9: Cisco support CDN (20–30KB JPEG, official).
--     Migration 078 used router-switch.com; upgrading to cisco.com/c/dam/assets/support/.
--
-- Still pending (no confident image found):
--   N540-24Q2C2DD-SYS: TD image range could not be pinpointed without browsing docs.

-- ── Cisco NCS 560 — Interface Module Adapters (IMA) ──────────────────────────

-- N560-IMA-1W — NCS 560 1-port 100G WAN IMA (line card for NCS 560-4/560-7)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/524001-525000/524070.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-560-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N560-IMA-1W'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N560-IMA-2C — NCS 560 2-port 100G CFP2 IMA
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/524001-525000/524626.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-560-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N560-IMA-2C'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N560-IMA-2C-DD — NCS 560 2-port 100G CFP2 + QSFP-DD IMA
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/524001-525000/524146.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-560-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N560-IMA-2C-DD'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N560-IMA-8Q/4L — NCS 560 8-port 40G QSFP + 4-port 100G CFP IMA
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/524001-525000/524763.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-560-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N560-IMA-8Q/4L'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ── Cisco NCS 540 — Fixed-Port Models ────────────────────────────────────────

-- N540-24Q8L2DD-SYS — NCS 540 24×40G QSFP + 8×100G CFP + 2×400G QSFP-DD
-- Image from manualslib.com product CDN (44KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://static-data2.manualslib.com/product-images/a39/2295025/cisco-n540-24q8l2dd-sys-network-router.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-24Q8L2DD-SYS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540-6Z14S-SYS-D — NCS 540 6×100G QSFP28 + 14×10G SFP+ (DC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/300001-400000/360001-370000/369001-370000/369645.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-6Z14S-SYS-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540-6Z18G-SYS-A — NCS 540 6×100G QSFP28 + 18×1G RJ-45 (AC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/300001-400000/360001-370000/369001-370000/369646.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-6Z18G-SYS-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540-6Z18G-SYS-D — NCS 540 6×100G QSFP28 + 18×1G RJ-45 (DC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/300001-400000/360001-370000/369001-370000/369649.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-6Z18G-SYS-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540-FH-AGG-SYS — NCS 540 Fronthaul Aggregation Router (1U fixed-port)
-- Image: manualslib.com NCS 540 Fronthaul product photo (46KB JPEG)
UPDATE switches
SET image_url        = 'https://static-data2.manualslib.com/product-images/7d8/2545792/cisco-n540-front-haul-network-router.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-FH-AGG-SYS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540-FH-CSR-SYS — NCS 540 Fronthaul Cell-Site Router (same 1U chassis)
-- Both FH-AGG and FH-CSR share the same physical form factor; using the same photo.
UPDATE switches
SET image_url        = 'https://static-data2.manualslib.com/product-images/7d8/2545792/cisco-n540-front-haul-network-router.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540-FH-CSR-SYS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ── Cisco NCS 540X — Extended-Capability Models ───────────────────────────────

-- N540X-4Z14G2Q-A — NCS 540X 4×100G QSFP28 + 14×1G + 2×40G (AC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/522001-523000/522022.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-4Z14G2Q-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-4Z14G2Q-D — NCS 540X 4×100G QSFP28 + 14×1G + 2×40G (DC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/521001-522000/521064.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-4Z14G2Q-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-6Z18G-SYS-A — NCS 540X 6×100G + 18×1G (AC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/521001-522000/521065.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-6Z18G-SYS-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-6Z18G-SYS-D — NCS 540X 6×100G + 18×1G (DC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/521001-522000/521066.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-6Z18G-SYS-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-8Z16G-SYS-A — NCS 540X 8×100G QSFP28 + 16×1G (AC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/521001-522000/521472.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-8Z16G-SYS-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-8Z16G-SYS-D — NCS 540X 8×100G QSFP28 + 16×1G (DC power)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/en/us/td/i/500001-600000/520001-530000/521001-522000/521471.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-8Z16G-SYS-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-12Z16G-SYS-A — NCS 540X 12×100G QSFP28 + 16×1G (AC power)
-- Image: eBay product listing CDN (128KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://i.ebayimg.com/images/g/xa4AAOSwhG5m~Czd/s-l1600.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-12Z16G-SYS-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-12Z16G-SYS-D — NCS 540X 12×100G QSFP28 + 16×1G (DC power)
-- Image: eBay product listing CDN (218KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://i.ebayimg.com/images/g/g70AAOSw1EFi3uN1/s-l1600.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-12Z16G-SYS-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-16Z8Q2C-D — NCS 540X 16×100G QSFP28 + 8×40G + 2×100G (DC power)
-- Image: eBay product listing CDN (63KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://i.ebayimg.com/images/g/dmgAAOSwykNjqeQG/s-l1600.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-16Z8Q2C-D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N540X-ACC-SYS — NCS 540X Access Router variant (1U, smaller form factor)
-- Image: signellent.com (authorized Cisco reseller) product page (193KB PNG)
UPDATE switches
SET image_url        = 'https://signellent.com/wp-content/uploads/2024/12/N540X-ACC-SYS-1.png',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-540-series-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'N540X-ACC-SYS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ── Cisco ASR 9900 — Route Processor Modules ──────────────────────────────────

-- ASR-9900-RP-SE — ASR 9900 Route Processor (storage-enhanced variant)
-- Image: brightstarsystems.com Cisco refurb reseller (14KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://brightstarsystems.com/wp-content/uploads/product_images/ASR-9900-RP-SE.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9900-series-aggregation-services-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'ASR-9900-RP-SE'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ASR-9900-RP-TR — ASR 9900 Route Processor (transport variant)
-- Image: brightstarsystems.com Cisco refurb reseller (13KB JPEG, confirmed 200 OK)
UPDATE switches
SET image_url        = 'https://brightstarsystems.com/wp-content/uploads/product_images/ASR-9900-RP-TR.jpg',
    product_page_url = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9900-series-aggregation-services-routers/models-comparison.html'),
    assets_scraped_at = NOW()
WHERE model = 'ASR-9900-RP-TR'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ── Cisco Upgrades — Switching to official Cisco CDN ─────────────────────────
-- These models already have third-party images (from migrations 073 and 078).
-- Upgrading to official cisco.com/c/dam/assets/support/ CDN images.

-- ASR-9902 — upgrade from tempestns.com to official Cisco support CDN (80KB JPEG)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/assets/support/product-images/model/routers-asr-9902-router-model.jpg',
    assets_scraped_at = NOW()
WHERE model = 'ASR-9902'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ASR-9903 — upgrade from tempestns.com to official Cisco support CDN (124KB JPEG)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/assets/support/product-images/model/routers-asr-9903-router-model.jpg',
    assets_scraped_at = NOW()
WHERE model = 'ASR-9903'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- NCS1001-K9 — upgrade from router-switch.com to official Cisco support CDN (20KB JPEG)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/assets/support/product-images/model/optical-networking-network-convergence-system-1001.jpg',
    assets_scraped_at = NOW()
WHERE model = 'NCS1001-K9'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- NCS1002-K9 — upgrade from router-switch.com to official Cisco support CDN (30KB JPEG)
UPDATE switches
SET image_url        = 'https://www.cisco.com/c/dam/assets/support/product-images/model/optical-networking-network-convergence-system-1002.jpg',
    assets_scraped_at = NOW()
WHERE model = 'NCS1002-K9'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
