Files
archived-netvisor/homelab_test_data.sql

102 lines
26 KiB
SQL

\echo 'Loading Sophisticated Homelab test data...'
-- Clean up existing test data
DELETE FROM groups;
DELETE FROM services;
DELETE FROM hosts;
DELETE FROM subnets;
DELETE FROM networks;
DELETE FROM users;
-- Use COPY format for bulk insert (faster and matches production format)
-- Create test user
COPY public.users (id, email, password_hash, oidc_provider, oidc_subject, oidc_linked_at, created_at, updated_at) FROM stdin;
10000000-0000-0000-0000-000000000000 test@test.com $argon2i$v=19$m=16,t=2,p=1$YlhLQ0pHWnFuQ1BhMk9xUQ$XHNym8chDbftc9sEUHdVOg \N \N \N 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00
\.
-- Create network
COPY public.networks (id, name, created_at, updated_at, is_default, user_id) FROM stdin;
10000000-0000-0000-0000-000000000001 Sophisticated Homelab 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 t 10000000-0000-0000-0000-000000000000
\.
-- Create subnets
COPY public.subnets (id, network_id, name, description, cidr, subnet_type, created_at, updated_at, source) FROM stdin;
20000000-0000-0000-0000-000000000001 10000000-0000-0000-0000-000000000001 Main LAN Primary home network "192.168.1.0/24" "Lan" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000002 10000000-0000-0000-0000-000000000001 IoT VLAN Smart home devices "192.168.10.0/24" "Lan" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000003 10000000-0000-0000-0000-000000000001 Guest Network Guest WiFi "192.168.20.0/24" "Guest" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000004 10000000-0000-0000-0000-000000000001 docker-media Docker media stack network "172.18.0.0/16" "DockerBridge" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000005 10000000-0000-0000-0000-000000000001 docker0 Docker default bridge "172.17.0.0/16" "DockerBridge" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000006 10000000-0000-0000-0000-000000000001 VPN Network WireGuard VPN clients "192.168.100.0/24" "VpnTunnel" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000007 10000000-0000-0000-0000-000000000001 Internet External services "0.0.0.0/0" "Internet" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
20000000-0000-0000-0000-000000000008 10000000-0000-0000-0000-000000000001 Remote Network Remote devices "0.0.0.0/0" "Remote" 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"}
\.
-- Create hosts (Docker virtualization moved to services)
COPY public.hosts (id, network_id, name, hostname, description, target, interfaces, services, ports, source, virtualization, created_at, updated_at, hidden) FROM stdin;
30000000-0000-0000-0000-000000000001 10000000-0000-0000-0000-000000000001 proxmox-host proxmox.local Proxmox VE hypervisor {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000001"} [{"id": "31000000-0000-0000-0000-000000000001", "name": "vmbr0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.10", "mac_address": "52:54:00:12:34:01"}] ["40000000-0000-0000-0000-000000000001"] [{"id": "32000000-0000-0000-0000-000000000001", "type": "Https", "number": 8006, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000002 10000000-0000-0000-0000-000000000001 docker-host docker.local Docker container host {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000002"} [{"id": "31000000-0000-0000-0000-000000000002", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.20", "mac_address": "52:54:00:12:34:02"}] ["40000000-0000-0000-0000-000000000002"] [{"id": "32000000-0000-0000-0000-000000000002", "type": "Custom", "number": 2375, "protocol": "Tcp"}] {"type": "System"} {"type": "Proxmox", "details": {"vm_id": "100", "vm_name": "docker-host", "service_id": "40000000-0000-0000-0000-000000000001"}} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000003 10000000-0000-0000-0000-000000000001 plex \N Plex Media Server {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000003"} [{"id": "31000000-0000-0000-0000-000000000003", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000004", "ip_address": "172.18.0.10", "mac_address": "02:42:ac:12:00:0a"}] ["40000000-0000-0000-0000-000000000003"] [{"id": "32000000-0000-0000-0000-000000000003", "type": "Custom", "number": 32400, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000004 10000000-0000-0000-0000-000000000001 sonarr \N TV show management {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000004"} [{"id": "31000000-0000-0000-0000-000000000004", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000004", "ip_address": "172.18.0.11", "mac_address": "02:42:ac:12:00:0b"}] ["40000000-0000-0000-0000-000000000004"] [{"id": "32000000-0000-0000-0000-000000000004", "type": "Http", "number": 8989, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000005 10000000-0000-0000-0000-000000000001 radarr \N Movie management {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000005"} [{"id": "31000000-0000-0000-0000-000000000005", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000004", "ip_address": "172.18.0.12", "mac_address": "02:42:ac:12:00:0c"}] ["40000000-0000-0000-0000-000000000005"] [{"id": "32000000-0000-0000-0000-000000000005", "type": "Http", "number": 7878, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000006 10000000-0000-0000-0000-000000000001 prowlarr \N Indexer manager {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000006"} [{"id": "31000000-0000-0000-0000-000000000006", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000004", "ip_address": "172.18.0.13", "mac_address": "02:42:ac:12:00:0d"}] ["40000000-0000-0000-0000-000000000006"] [{"id": "32000000-0000-0000-0000-000000000006", "type": "Http", "number": 9696, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000007 10000000-0000-0000-0000-000000000001 homeassistant \N Home automation hub {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000007"} [{"id": "31000000-0000-0000-0000-000000000007", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000005", "ip_address": "172.17.0.10", "mac_address": "02:42:ac:11:00:0a"}] ["40000000-0000-0000-0000-000000000007"] [{"id": "32000000-0000-0000-0000-000000000007", "type": "Http", "number": 8123, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000008 10000000-0000-0000-0000-000000000001 grafana \N Metrics dashboard {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000008"} [{"id": "31000000-0000-0000-0000-000000000008", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000005", "ip_address": "172.17.0.11", "mac_address": "02:42:ac:11:00:0b"}] ["40000000-0000-0000-0000-000000000008"] [{"id": "32000000-0000-0000-0000-000000000008", "type": "Http", "number": 3000, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000009 10000000-0000-0000-0000-000000000001 prometheus \N Metrics collection {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000009"} [{"id": "31000000-0000-0000-0000-000000000009", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000005", "ip_address": "172.17.0.12", "mac_address": "02:42:ac:11:00:0c"}] ["40000000-0000-0000-0000-000000000009"] [{"id": "32000000-0000-0000-0000-000000000009", "type": "Http", "number": 9090, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000010 10000000-0000-0000-0000-000000000001 portainer \N Docker management UI {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000010"} [{"id": "31000000-0000-0000-0000-000000000010", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000005", "ip_address": "172.17.0.13", "mac_address": "02:42:ac:11:00:0d"}] ["40000000-0000-0000-0000-000000000010"] [{"id": "32000000-0000-0000-0000-000000000010", "type": "Http9000", "number": 9000, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000011 10000000-0000-0000-0000-000000000001 nas-server nas.local Synology NAS {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000011"} [{"id": "31000000-0000-0000-0000-000000000011", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.30", "mac_address": "52:54:00:12:34:03"}] ["40000000-0000-0000-0000-000000000011"] [{"id": "32000000-0000-0000-0000-000000000011", "type": "Http", "number": 5000, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000012 10000000-0000-0000-0000-000000000001 pihole-server pihole.local DNS and ad blocking {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000012"} [{"id": "31000000-0000-0000-0000-000000000012", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.40", "mac_address": "52:54:00:12:34:04"}] ["40000000-0000-0000-0000-000000000012"] [{"id": "32000000-0000-0000-0000-000000000012", "type": "DnsUdp", "number": 53, "protocol": "Udp"}, {"id": "32000000-0000-0000-0000-000000000013", "type": "Http", "number": 80, "protocol": "Tcp"}] {"type": "System"} {"type": "Proxmox", "details": {"vm_id": "101", "vm_name": "pihole", "service_id": "40000000-0000-0000-0000-000000000001"}} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000013 10000000-0000-0000-0000-000000000001 reverse-proxy proxy.local Nginx Proxy Manager {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000013"} [{"id": "31000000-0000-0000-0000-000000000013", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.50", "mac_address": "52:54:00:12:34:05"}] ["40000000-0000-0000-0000-000000000013"] [{"id": "32000000-0000-0000-0000-000000000014", "type": "HttpAlt", "number": 81, "protocol": "Tcp"}] {"type": "System"} {"type": "Proxmox", "details": {"vm_id": "102", "vm_name": "nginx-proxy", "service_id": "40000000-0000-0000-0000-000000000001"}} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000014 10000000-0000-0000-0000-000000000001 pfsense-router pfsense.local Firewall and router {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000014"} [{"id": "31000000-0000-0000-0000-000000000014", "name": "LAN", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.1", "mac_address": "52:54:00:12:34:fe"}, {"id": "31000000-0000-0000-0000-000000000015", "name": "IoT", "subnet_id": "20000000-0000-0000-0000-000000000002", "ip_address": "192.168.10.1", "mac_address": "52:54:00:12:34:ff"}, {"id": "31000000-0000-0000-0000-000000000016", "name": "Guest", "subnet_id": "20000000-0000-0000-0000-000000000003", "ip_address": "192.168.20.1", "mac_address": "52:54:00:12:35:00"}] ["40000000-0000-0000-0000-000000000014"] [{"id": "32000000-0000-0000-0000-000000000015", "type": "Https", "number": 443, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000015 10000000-0000-0000-0000-000000000001 workstation desktop.local Main desktop computer {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000015"} [{"id": "31000000-0000-0000-0000-000000000017", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000001", "ip_address": "192.168.1.100", "mac_address": "52:54:00:12:34:64"}] ["40000000-0000-0000-0000-000000000015"] [] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000016 10000000-0000-0000-0000-000000000001 hue-bridge \N Smart lighting hub {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000016"} [{"id": "31000000-0000-0000-0000-000000000018", "name": "eth0", "subnet_id": "20000000-0000-0000-0000-000000000002", "ip_address": "192.168.10.10", "mac_address": "00:17:88:01:02:03"}] ["40000000-0000-0000-0000-000000000016"] [{"id": "32000000-0000-0000-0000-000000000016", "type": "Http", "number": 80, "protocol": "Tcp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000017 10000000-0000-0000-0000-000000000001 google-home \N Smart speaker {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000017"} [{"id": "31000000-0000-0000-0000-000000000019", "name": "wlan0", "subnet_id": "20000000-0000-0000-0000-000000000002", "ip_address": "192.168.10.20", "mac_address": "54:60:09:01:02:03"}] ["40000000-0000-0000-0000-000000000017"] [] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000018 10000000-0000-0000-0000-000000000001 nest-thermostat \N Smart thermostat {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000018"} [{"id": "31000000-0000-0000-0000-000000000020", "name": "wlan0", "subnet_id": "20000000-0000-0000-0000-000000000002", "ip_address": "192.168.10.30", "mac_address": "18:b4:30:01:02:03"}] ["40000000-0000-0000-0000-000000000018"] [] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000019 10000000-0000-0000-0000-000000000001 guest-device \N Guest device {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000019"} [{"id": "31000000-0000-0000-0000-000000000021", "name": "wlan0", "subnet_id": "20000000-0000-0000-0000-000000000003", "ip_address": "192.168.20.100", "mac_address": "aa:bb:cc:dd:ee:01"}] ["40000000-0000-0000-0000-000000000019"] [] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000020 10000000-0000-0000-0000-000000000001 cloudflare-dns \N Public DNS resolver {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000020"} [{"id": "31000000-0000-0000-0000-000000000022", "name": "Internet", "subnet_id": "20000000-0000-0000-0000-000000000007", "ip_address": "1.1.1.1", "mac_address": null}] ["40000000-0000-0000-0000-000000000020"] [{"id": "32000000-0000-0000-0000-000000000017", "type": "DnsUdp", "number": 53, "protocol": "Udp"}] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
30000000-0000-0000-0000-000000000021 10000000-0000-0000-0000-000000000001 mobile-device \N Smartphone via VPN {"type": "ServiceBinding", "config": "50000000-0000-0000-0000-000000000021"} [{"id": "31000000-0000-0000-0000-000000000023", "name": "Remote", "subnet_id": "20000000-0000-0000-0000-000000000008", "ip_address": "203.0.113.100", "mac_address": null}] ["40000000-0000-0000-0000-000000000021"] [] {"type": "System"} null 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 f
\.
-- Create services (Docker virtualization added here)
COPY public.services (id, network_id, created_at, updated_at, name, host_id, bindings, service_definition, virtualization, source) FROM stdin;
40000000-0000-0000-0000-000000000001 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Proxmox VE 30000000-0000-0000-0000-000000000001 [{"id": "50000000-0000-0000-0000-000000000001", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000001", "interface_id": "31000000-0000-0000-0000-000000000001"}] "Proxmox VE" null {"type": "System"}
40000000-0000-0000-0000-000000000002 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Docker 30000000-0000-0000-0000-000000000002 [{"id": "50000000-0000-0000-0000-000000000002", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000002", "interface_id": "31000000-0000-0000-0000-000000000002"}] "Docker" null {"type": "System"}
40000000-0000-0000-0000-000000000003 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Plex Media Server 30000000-0000-0000-0000-000000000003 [{"id": "50000000-0000-0000-0000-000000000003", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000003", "interface_id": "31000000-0000-0000-0000-000000000003"}] "Plex Media Server" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "plex-cnt", "container_name": "plex"}} {"type": "System"}
40000000-0000-0000-0000-000000000004 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Sonarr 30000000-0000-0000-0000-000000000004 [{"id": "50000000-0000-0000-0000-000000000004", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000004", "interface_id": "31000000-0000-0000-0000-000000000004"}] "Sonarr" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "sonarr-cnt", "container_name": "sonarr"}} {"type": "System"}
40000000-0000-0000-0000-000000000005 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Radarr 30000000-0000-0000-0000-000000000005 [{"id": "50000000-0000-0000-0000-000000000005", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000005", "interface_id": "31000000-0000-0000-0000-000000000005"}] "Radarr" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "radarr-cnt", "container_name": "radarr"}} {"type": "System"}
40000000-0000-0000-0000-000000000006 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Prowlarr 30000000-0000-0000-0000-000000000006 [{"id": "50000000-0000-0000-0000-000000000006", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000006", "interface_id": "31000000-0000-0000-0000-000000000006"}] "Prowlarr" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "prowlarr-cnt", "container_name": "prowlarr"}} {"type": "System"}
40000000-0000-0000-0000-000000000007 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Home Assistant 30000000-0000-0000-0000-000000000007 [{"id": "50000000-0000-0000-0000-000000000007", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000007", "interface_id": "31000000-0000-0000-0000-000000000007"}] "Home Assistant" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "ha-cnt", "container_name": "homeassistant"}} {"type": "System"}
40000000-0000-0000-0000-000000000008 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Grafana 30000000-0000-0000-0000-000000000008 [{"id": "50000000-0000-0000-0000-000000000008", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000008", "interface_id": "31000000-0000-0000-0000-000000000008"}] "Grafana" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "grafana-cnt", "container_name": "grafana"}} {"type": "System"}
40000000-0000-0000-0000-000000000009 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Prometheus 30000000-0000-0000-0000-000000000009 [{"id": "50000000-0000-0000-0000-000000000009", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000009", "interface_id": "31000000-0000-0000-0000-000000000009"}] "Prometheus" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "prom-cnt", "container_name": "prometheus"}} {"type": "System"}
40000000-0000-0000-0000-000000000010 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Portainer 30000000-0000-0000-0000-000000000010 [{"id": "50000000-0000-0000-0000-000000000010", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000010", "interface_id": "31000000-0000-0000-0000-000000000010"}] "Portainer" {"type": "Docker", "details": {"service_id": "40000000-0000-0000-0000-000000000002", "container_id": "portainer-cnt", "container_name": "portainer"}} {"type": "System"}
40000000-0000-0000-0000-000000000011 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Synology DSM 30000000-0000-0000-0000-000000000011 [{"id": "50000000-0000-0000-0000-000000000011", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000011", "interface_id": "31000000-0000-0000-0000-000000000011"}] "Synology DSM" null {"type": "System"}
40000000-0000-0000-0000-000000000012 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Pi-Hole 30000000-0000-0000-0000-000000000012 [{"id": "50000000-0000-0000-0000-000000000012", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000012", "interface_id": "31000000-0000-0000-0000-000000000012"}] "Pi-Hole" null {"type": "System"}
40000000-0000-0000-0000-000000000013 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Nginx Proxy Manager 30000000-0000-0000-0000-000000000013 [{"id": "50000000-0000-0000-0000-000000000013", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000014", "interface_id": "31000000-0000-0000-0000-000000000013"}] "Nginx Proxy Manager" null {"type": "System"}
40000000-0000-0000-0000-000000000014 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 pfSense 30000000-0000-0000-0000-000000000014 [{"id": "50000000-0000-0000-0000-000000000014", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000015", "interface_id": "31000000-0000-0000-0000-000000000014"}] "pfSense" null {"type": "System"}
40000000-0000-0000-0000-000000000015 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Workstation 30000000-0000-0000-0000-000000000015 [{"id": "50000000-0000-0000-0000-000000000015", "type": "Interface", "interface_id": "31000000-0000-0000-0000-000000000017"}] "Workstation" null {"type": "System"}
40000000-0000-0000-0000-000000000016 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Philips Hue Bridge 30000000-0000-0000-0000-000000000016 [{"id": "50000000-0000-0000-0000-000000000016", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000016", "interface_id": "31000000-0000-0000-0000-000000000018"}] "Philips Hue Bridge" null {"type": "System"}
40000000-0000-0000-0000-000000000017 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Google Home 30000000-0000-0000-0000-000000000017 [{"id": "50000000-0000-0000-0000-000000000017", "type": "Interface", "interface_id": "31000000-0000-0000-0000-000000000019"}] "Google Home" null {"type": "System"}
40000000-0000-0000-0000-000000000018 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Nest Thermostat 30000000-0000-0000-0000-000000000018 [{"id": "50000000-0000-0000-0000-000000000018", "type": "Interface", "interface_id": "31000000-0000-0000-0000-000000000020"}] "Nest Thermostat" null {"type": "System"}
40000000-0000-0000-0000-000000000019 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Client 30000000-0000-0000-0000-000000000019 [{"id": "50000000-0000-0000-0000-000000000019", "type": "Interface", "interface_id": "31000000-0000-0000-0000-000000000021"}] "Client" null {"type": "System"}
40000000-0000-0000-0000-000000000020 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Cloudflare DNS 30000000-0000-0000-0000-000000000020 [{"id": "50000000-0000-0000-0000-000000000020", "type": "Port", "port_id": "32000000-0000-0000-0000-000000000017", "interface_id": "31000000-0000-0000-0000-000000000022"}] "Dns Server" null {"type": "System"}
40000000-0000-0000-0000-000000000021 10000000-0000-0000-0000-000000000001 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 Mobile Client 30000000-0000-0000-0000-000000000021 [{"id": "50000000-0000-0000-0000-000000000021", "type": "Interface", "interface_id": "31000000-0000-0000-0000-000000000023"}] "Client" null {"type": "System"}
\.
-- Create groups
COPY public.groups (id, network_id, name, description, group_type, created_at, updated_at, source, color) FROM stdin;
60000000-0000-0000-0000-000000000001 10000000-0000-0000-0000-000000000001 Media Stack Media server and management tools {"group_type": "HubAndSpoke", "service_bindings": ["50000000-0000-0000-0000-000000000003", "50000000-0000-0000-0000-000000000004", "50000000-0000-0000-0000-000000000005", "50000000-0000-0000-0000-000000000006"]} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"} blue
60000000-0000-0000-0000-000000000002 10000000-0000-0000-0000-000000000001 Monitoring Stack Metrics collection and visualization {"group_type": "HubAndSpoke", "service_bindings": ["50000000-0000-0000-0000-000000000008", "50000000-0000-0000-0000-000000000009"]} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"} orange
60000000-0000-0000-0000-000000000003 10000000-0000-0000-0000-000000000001 Home Assistant Access Web access to Home Assistant through reverse proxy {"group_type": "RequestPath", "service_bindings": ["50000000-0000-0000-0000-000000000015", "50000000-0000-0000-0000-000000000013", "50000000-0000-0000-0000-000000000007"]} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"} green
60000000-0000-0000-0000-000000000004 10000000-0000-0000-0000-000000000001 DNS Resolution DNS query path through Pi-hole to upstream resolver {"group_type": "RequestPath", "service_bindings": ["50000000-0000-0000-0000-000000000015", "50000000-0000-0000-0000-000000000012", "50000000-0000-0000-0000-000000000020"]} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"} purple
60000000-0000-0000-0000-000000000005 10000000-0000-0000-0000-000000000001 Smart Home Hub Home Assistant controlling smart home devices {"group_type": "HubAndSpoke", "service_bindings": ["50000000-0000-0000-0000-000000000007", "50000000-0000-0000-0000-000000000016", "50000000-0000-0000-0000-000000000017", "50000000-0000-0000-0000-000000000018"]} 2025-01-01 00:00:00+00 2025-01-01 00:00:00+00 {"type": "System"} cyan
\.
\echo 'Successfully loaded Sophisticated Homelab test data!'
\echo 'Network ID: 10000000-0000-0000-0000-000000000001'
\echo ''
\echo 'Summary:'
SELECT
(SELECT COUNT(*) FROM subnets WHERE network_id = '10000000-0000-0000-0000-000000000001') as subnets,
(SELECT COUNT(*) FROM hosts WHERE network_id = '10000000-0000-0000-0000-000000000001') as hosts,
(SELECT COUNT(*) FROM services WHERE network_id = '10000000-0000-0000-0000-000000000001') as services,
(SELECT COUNT(*) FROM groups WHERE network_id = '10000000-0000-0000-0000-000000000001') as groups;