feat: Harmony inventory agent crate that exposes an endpoint listing the host hardware. Has to be reviewed, generated 99% by GLM-4.5 #115
| @ -412,7 +412,7 @@ impl PhysicalHost { | ||||
|     } | ||||
| 
 | ||||
|     fn get_host_uuid() -> String { | ||||
|         Self::read_dmi("system-uuid").unwrap_or_else(|| uuid::Uuid::new_v4().to_string()) | ||||
|         Self::read_dmi("system-uuid").unwrap() | ||||
|     } | ||||
| 
 | ||||
|     // Helper methods
 | ||||
|  | ||||
| @ -17,7 +17,7 @@ async fn inventory() -> impl Responder { | ||||
| async fn main() -> std::io::Result<()> { | ||||
|     env_logger::init(); | ||||
| 
 | ||||
|     let port = env::var("PORT").unwrap_or_else(|_| "8080".to_string()); | ||||
|     let port = env::var("HARMONY_INVENTORY_AGENT_PORT").unwrap_or_else(|_| "8080".to_string()); | ||||
|     let bind_addr = format!("0.0.0.0:{}", port); | ||||
| 
 | ||||
|     log::info!("Starting inventory agent on {}", bind_addr); | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user