forked from NationTech/harmony
chore(harmony): Use Cargo workspaces for core harmony and client specific implementation
This commit is contained in:
6
harmony-rs/fqm/Cargo.toml
Normal file
6
harmony-rs/fqm/Cargo.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "fqm"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
21
harmony-rs/fqm/src/inventory.rs
Normal file
21
harmony-rs/fqm/src/inventory.rs
Normal file
@@ -0,0 +1,21 @@
|
||||
use crate::domain::{
|
||||
hardware::{Location, Host, HostCategory},
|
||||
inventory::Inventory,
|
||||
};
|
||||
|
||||
pub fn get_fqm_inventory() -> Inventory {
|
||||
Inventory {
|
||||
location: Location::new(
|
||||
"1134 Grande Allée Ouest 1er étage, Québec, Qc".into(),
|
||||
"FQM 1134 1er étage".into(),
|
||||
),
|
||||
host: vec![Host {
|
||||
category: HostCategory::Server,
|
||||
network: vec![],
|
||||
storage: vec![],
|
||||
labels: vec![],
|
||||
}],
|
||||
switch: vec![],
|
||||
firewall: vec![],
|
||||
}
|
||||
}
|
||||
14
harmony-rs/fqm/src/lib.rs
Normal file
14
harmony-rs/fqm/src/lib.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
pub fn add(left: usize, right: usize) -> usize {
|
||||
left + right
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn it_works() {
|
||||
let result = add(2, 2);
|
||||
assert_eq!(result, 4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user