use proxmox 0.1.9 with new cli command helpers
This commit is contained in:
		@ -34,7 +34,7 @@ pam = "0.7"
 | 
				
			|||||||
pam-sys = "0.5"
 | 
					pam-sys = "0.5"
 | 
				
			||||||
percent-encoding = "2.1"
 | 
					percent-encoding = "2.1"
 | 
				
			||||||
pin-utils = "0.1.0-alpha"
 | 
					pin-utils = "0.1.0-alpha"
 | 
				
			||||||
proxmox = { version = "0.1.8", features = [ "sortable-macro", "api-macro" ] }
 | 
					proxmox = { version = "0.1.9", features = [ "sortable-macro", "api-macro" ] }
 | 
				
			||||||
#proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] }
 | 
					#proxmox = { git = "ssh://gitolite3@proxdev.maurer-it.com/rust/proxmox", version = "0.1.2", features = [ "sortable-macro", "api-macro" ] }
 | 
				
			||||||
#proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro" ] }
 | 
					#proxmox = { path = "../proxmox/proxmox", features = [ "sortable-macro", "api-macro" ] }
 | 
				
			||||||
regex = "1.2"
 | 
					regex = "1.2"
 | 
				
			||||||
 | 
				
			|||||||
@ -132,7 +132,7 @@ impl Shell {
 | 
				
			|||||||
                    continue;
 | 
					                    continue;
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            let _ = handle_command(helper.cmd_def(), "", args);
 | 
					            let _ = handle_command(helper.cmd_def(), "", args, None);
 | 
				
			||||||
            self.rl.add_history_entry(line);
 | 
					            self.rl.add_history_entry(line);
 | 
				
			||||||
            self.update_prompt()?;
 | 
					            self.update_prompt()?;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
				
			|||||||
@ -83,7 +83,7 @@ fn main() -> Result<(), Error> {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        let args = shellword_split(&line)?;
 | 
					        let args = shellword_split(&line)?;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        let _ = handle_command(helper.cmd_def(), "", args);
 | 
					        let _ = handle_command(helper.cmd_def(), "", args, None);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        rl.add_history_entry(line);
 | 
					        rl.add_history_entry(line);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
				
			|||||||
@ -2378,5 +2378,7 @@ fn main() {
 | 
				
			|||||||
        .insert("catalog", catalog_mgmt_cli())
 | 
					        .insert("catalog", catalog_mgmt_cli())
 | 
				
			||||||
        .insert("task", task_mgmt_cli());
 | 
					        .insert("task", task_mgmt_cli());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
					    run_cli_command(cmd_def, Some(|future| {
 | 
				
			||||||
 | 
					        proxmox_backup::tools::runtime::main(future)
 | 
				
			||||||
 | 
					    }));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -465,7 +465,7 @@ fn main() {
 | 
				
			|||||||
                .completion_cb("remote-store", complete_remote_datastore_name)
 | 
					                .completion_cb("remote-store", complete_remote_datastore_name)
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
					    proxmox_backup::tools::runtime::main(run_async_cli_command(cmd_def));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// shell completion helper
 | 
					// shell completion helper
 | 
				
			||||||
 | 
				
			|||||||
@ -519,5 +519,5 @@ fn main() {
 | 
				
			|||||||
            .completion_cb("archive", tools::complete_file_name)
 | 
					            .completion_cb("archive", tools::complete_file_name)
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    proxmox_backup::tools::runtime::main(run_cli_command(cmd_def));
 | 
					    run_cli_command(cmd_def, None);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user