harmony/harmony-rs/fqm/src/inventory/mod.rs

83 lines
2.3 KiB
Rust

use harmony::{
hardware::{Host, HostCategory, Label, Location, NetworkInterface, Storage, StorageConnectionType, StorageKind},
inventory::Inventory,
};
pub fn get_inventory() -> Inventory {
Inventory {
location: Location::new(
"1134 Grande Allée Ouest 1er étage, Québec, Qc".into(),
"FQM 1134 1er étage".into(),
),
host: vec![],
switch: vec![],
firewall: vec![get_firewall_1()],
}
}
fn get_firewall_1() -> Host {
Host {
category: HostCategory::Firewall,
network: vec![
NetworkInterface::new(
"igb0".to_string(),
"00:90:7f:df:2c:1f".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb1".to_string(),
"00:90:7f:df:2c:20".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb2".to_string(),
"00:90:7f:df:2c:21".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb3".to_string(),
"00:90:7f:df:2c:22".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb4".to_string(),
"00:90:7f:df:2c:23".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb5".to_string(),
"00:90:7f:df:2c:24".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb6".to_string(),
"00:90:7f:df:2c:25".to_string(),
1_000_000_000,
true,
),
NetworkInterface::new(
"igb7".to_string(),
"00:90:7f:df:2c:26".to_string(),
1_000_000_000,
true,
),
],
storage: vec![Storage::new(
StorageConnectionType::Sata6g,
StorageKind::SSD,
240_000_000_000,
"TODO".to_string(),
)],
labels: vec![Label::new(
"operatingSystem".to_string(),
"opnsense".to_string(),
)],
}
}