From b1007429449292fad3d9fc770c23fa38d0f782c3 Mon Sep 17 00:00:00 2001 From: ByteOtter Date: Tue, 16 Apr 2024 20:06:05 +0200 Subject: [PATCH] small updates to config module --- src/configuration/config_parser.rs | 3 ++- src/configuration/config_template.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/configuration/config_parser.rs b/src/configuration/config_parser.rs index f44a07d..a2b77b1 100644 --- a/src/configuration/config_parser.rs +++ b/src/configuration/config_parser.rs @@ -99,6 +99,7 @@ pub struct SystemConfig { // optional System information pub tenant_group: Option, pub tenant: Option, + pub location: Option, pub rack: Option, pub position: Option, } @@ -346,7 +347,7 @@ impl ConfigData { ); } - return Ok(()); + Ok(()) } /// Opens and reads the config file and writes the set parameters into a [`ConfigData`](struct.ConfigData) Object diff --git a/src/configuration/config_template.toml b/src/configuration/config_template.toml index e9fbc64..4dda218 100644 --- a/src/configuration/config_template.toml +++ b/src/configuration/config_template.toml @@ -15,7 +15,7 @@ device_type = 0 # ID of the type of the Device Type in NetBox device_role = 0 # ID of the device role in NetBox # Name of the network interface to set. (e.g eth0, etc) # If not set, the first active interface will be selected. -primary_network_interface = "" +primary_network_interface = "eth0" face = "" # Direction this device may face in (e.g front or rear) status = "active" # status of the device. default: active airflow = "Front to rear" # Direction of airflow