wip: Trying to figure out a nice way to have inventory and topology bound, maybe creating nodes that have this only purpose would make sense
This commit is contained in:
		
							parent
							
								
									042ff7e7dd
								
							
						
					
					
						commit
						9d0aa406e4
					
				| @ -31,10 +31,10 @@ pub enum HostCategory { | ||||
| 
 | ||||
| #[derive(Debug, new, Clone)] | ||||
| pub struct NetworkInterface { | ||||
|     name: String, | ||||
|     mac_address: MacAddress, | ||||
|     speed: u64, | ||||
|     plugged_in: bool, | ||||
|     pub name: String, | ||||
|     pub mac_address: MacAddress, | ||||
|     pub speed: u64, | ||||
|     pub plugged_in: bool, | ||||
| } | ||||
| type MacAddress = String; | ||||
| 
 | ||||
|  | ||||
							
								
								
									
										18
									
								
								harmony-rs/harmony/src/infra/hp_ilo/mod.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								harmony-rs/harmony/src/infra/hp_ilo/mod.rs
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,18 @@ | ||||
| use derive_new::new; | ||||
| use crate::topology::{IpAddress, MacAddress, ManagementInterface}; | ||||
| 
 | ||||
| #[derive(new)] | ||||
| pub struct HPIlo { | ||||
|     ip_address: IpAddress, | ||||
|     mac_address: MacAddress, | ||||
| } | ||||
| 
 | ||||
| impl ManagementInterface for HPIlo { | ||||
|     fn boot_to_pxe(&self) { | ||||
|         todo!() | ||||
|     } | ||||
| 
 | ||||
|     fn get_ip(&self) -> IpAddress { | ||||
|         self.ip_address | ||||
|     } | ||||
| } | ||||
| @ -1,9 +1,10 @@ | ||||
| use derive_new::new; | ||||
| use crate::topology::{IpAddress, ManagementInterface}; | ||||
| use crate::topology::{IpAddress, MacAddress, ManagementInterface}; | ||||
| 
 | ||||
| #[derive(new)] | ||||
| pub struct IntelAmtManagement { | ||||
|     ip_address: IpAddress, | ||||
|     mac_address: MacAddress, | ||||
| } | ||||
| 
 | ||||
| impl ManagementInterface for IntelAmtManagement { | ||||
|  | ||||
| @ -1,3 +1,4 @@ | ||||
| pub mod executors; | ||||
| pub mod opnsense; | ||||
| pub mod intel_amt; | ||||
| pub mod hp_ilo; | ||||
|  | ||||
| @ -1,9 +1,10 @@ | ||||
| use derive_new::new; | ||||
| use crate::topology::{Backend, DhcpServer, DnsServer, Firewall, FirewallError, FirewallRule, Frontend, IpAddress, LoadBalancer, LoadBalancerError}; | ||||
| use crate::{hardware::NetworkInterface, topology::{Backend, DhcpServer, DnsServer, Firewall, FirewallError, FirewallRule, Frontend, IpAddress, LoadBalancer, LoadBalancerError}}; | ||||
| 
 | ||||
| #[derive(new, Clone)] | ||||
| pub struct OPNSenseFirewall { | ||||
|     ip_address: IpAddress, | ||||
|     interfaces: Vec<NetworkInterface>, | ||||
| } | ||||
| 
 | ||||
| impl Firewall for OPNSenseFirewall { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user