first commit

This commit is contained in:
mega 2026-03-19 11:32:17 +00:00
commit 4b98219bf7
144 changed files with 31561 additions and 0 deletions

61
simulators/config.py Normal file
View file

@ -0,0 +1,61 @@
import os
MQTT_HOST = os.getenv("MQTT_HOST", "localhost")
MQTT_PORT = int(os.getenv("MQTT_PORT", "1883"))
# The simulated data center topology
TOPOLOGY = {
"site_id": "sg-01",
"rooms": [
{
"room_id": "hall-a",
"racks": [f"SG1A01.{i:02d}" for i in range(1, 21)] + [f"SG1A02.{i:02d}" for i in range(1, 21)],
"crac_id": "crac-01",
},
{
"room_id": "hall-b",
"racks": [f"SG1B01.{i:02d}" for i in range(1, 21)] + [f"SG1B02.{i:02d}" for i in range(1, 21)],
"crac_id": "crac-02",
},
],
"ups_units": ["ups-01", "ups-02"],
"generators": ["gen-01"],
"ats_units": ["ats-01"],
"chillers": ["chiller-01"],
"vesda_zones": [
{"zone_id": "vesda-hall-a", "room_id": "hall-a"},
{"zone_id": "vesda-hall-b", "room_id": "hall-b"},
],
"leak_sensors": [
{
"sensor_id": "leak-01",
"floor_zone": "crac-zone-a",
"under_floor": True,
"near_crac": True,
"room_id": "hall-a",
},
{
"sensor_id": "leak-02",
"floor_zone": "server-row-b1",
"under_floor": True,
"near_crac": False,
"room_id": "hall-b",
},
{
"sensor_id": "leak-03",
"floor_zone": "ups-room",
"under_floor": False,
"near_crac": False,
"room_id": None,
},
],
"switches": [
{"switch_id": "sw-core-01", "name": "Core Switch — Hall A", "model": "Cisco Catalyst C9300-48P", "room_id": "hall-a", "rack_id": "SG1A01.01", "port_count": 48, "role": "core"},
{"switch_id": "sw-core-02", "name": "Core Switch — Hall B", "model": "Arista 7050CX3-32S", "room_id": "hall-b", "rack_id": "SG1B01.01", "port_count": 32, "role": "core"},
{"switch_id": "sw-edge-01", "name": "Edge / Uplink Switch", "model": "Juniper EX4300-48T", "room_id": "hall-a", "rack_id": "SG1A01.05", "port_count": 48, "role": "edge"},
],
"particle_sensors": [
{"room_id": "hall-a"},
{"room_id": "hall-b"},
],
}