]> git.proxmox.com Git - pve-installer.git/commitdiff
assistant: rename identifiers command to system-info
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 19 Apr 2024 16:33:15 +0000 (18:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 22 Apr 2024 12:31:37 +0000 (14:31 +0200)
better fits to what it does and to the device-info sibling command.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
proxmox-auto-install-assistant/src/main.rs

index 34e93cbc4f520475ce8fb365adfb35490c619ed1..0f9ac572962102cdfe41e93d633fb96e04cb4c79 100644 (file)
@@ -39,7 +39,7 @@ enum Commands {
     ValidateAnswer(CommandValidateAnswer),
     DeviceMatch(CommandDeviceMatch),
     DeviceInfo(CommandDeviceInfo),
-    Identifiers(CommandIdentifiers),
+    SystemInfo(CommandSystemInfo),
 }
 
 /// Show device information that can be used for filters
@@ -146,10 +146,13 @@ struct CommandPrepareISO {
     tmp: Option<String>,
 }
 
-/// Show identifiers for the current machine. This information is part of the POST request to fetch
-/// an answer file.
+/// Show the system information that can be used to identify a host.
+///
+/// The shown information is sent as POST HTTP request when fetching the answer file for the
+/// automatic installation through HTTP, You can, for example, use this to return a dynamically
+/// assembled answer file.
 #[derive(Args, Debug)]
-struct CommandIdentifiers {}
+struct CommandSystemInfo {}
 
 #[derive(Args, Debug)]
 struct GlobalOpts {
@@ -190,7 +193,7 @@ fn main() {
         Commands::ValidateAnswer(args) => validate_answer(args),
         Commands::DeviceInfo(args) => info(args),
         Commands::DeviceMatch(args) => match_filter(args),
-        Commands::Identifiers(args) => show_identifiers(args),
+        Commands::SystemInfo(args) => show_system_info(args),
     };
     if let Err(err) = res {
         eprintln!("{err}");
@@ -266,10 +269,10 @@ fn validate_answer(args: &CommandValidateAnswer) -> Result<()> {
     Ok(())
 }
 
-fn show_identifiers(_args: &CommandIdentifiers) -> Result<()> {
+fn show_system_info(_args: &CommandSystemInfo) -> Result<()> {
     match SysInfo::as_json_pretty() {
         Ok(res) => println!("{res}"),
-        Err(err) => eprintln!("Error fetching system identifiers: {err}"),
+        Err(err) => eprintln!("Error fetching system info: {err}"),
     }
     Ok(())
 }