Add Pydantic models and FastAPI router structure for agent and backend
CI / basic-check (push) Has been cancelled
CI / basic-check (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from app.schemas import DiscoveryProfile, DiscoveryRun, Job, NetObject
|
||||
|
||||
NOW = datetime.now(timezone.utc)
|
||||
|
||||
OBJECTS = [
|
||||
NetObject(id='obj_1', name='Site HQ', slug='site-hq', type='site', status='active', created_at=NOW, updated_at=NOW),
|
||||
NetObject(id='obj_2', name='Rack A', slug='rack-a', type='rack', parent_id='obj_1', status='active', created_at=NOW, updated_at=NOW),
|
||||
NetObject(id='obj_3', name='Proxmox Host', slug='proxmox-host', type='physical_host', parent_id='obj_2', status='active', vendor='Lenovo', model='ThinkCentre', created_at=NOW, updated_at=NOW),
|
||||
]
|
||||
|
||||
JOBS = [
|
||||
Job(id='job_1', type='discovery.scan', status='pending', progress=0, created_at=NOW, payload={'subnet_ids': ['subnet_1'], 'profile_id': 'profile_1'})
|
||||
]
|
||||
|
||||
DISCOVERY_PROFILES = [
|
||||
DiscoveryProfile(id='profile_1', name='Fast LAN', strategy='fast', use_icmp=True, use_arp=True)
|
||||
]
|
||||
|
||||
DISCOVERY_RUNS = [
|
||||
DiscoveryRun(id='disc_1', profile_id='profile_1', subnet_ids=['subnet_1'], job_id='job_1', status='pending', created_at=NOW)
|
||||
]
|
||||
Reference in New Issue
Block a user