all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH proxmox-backup-qemu] update to proxmox 0.6/proxmox-backup 0.9.4
@ 2020-10-30  9:55 Fabian Grünbichler
  2020-10-30 14:22 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Grünbichler @ 2020-10-30  9:55 UTC (permalink / raw)
  To: pve-devel

and implement the switch to Authid, which means API token support for
free.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
---
 Cargo.toml     | 4 ++--
 src/backup.rs  | 2 +-
 src/lib.rs     | 8 ++++----
 src/restore.rs | 2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/Cargo.toml b/Cargo.toml
index 5587c08..73f3d82 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -27,8 +27,8 @@ lazy_static = "1.4"
 libc = "0.2"
 once_cell = "1.3.1"
 openssl = "0.10"
-proxmox = { version = "0.5.0", features = [ "sortable-macro", "api-macro" ] }
-proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.9.2" }
+proxmox = { version = "0.6.0", features = [ "sortable-macro", "api-macro" ] }
+proxmox-backup = { git = "git://git.proxmox.com/git/proxmox-backup.git", tag = "v0.9.4" }
 #proxmox-backup = { path = "../proxmox-backup" }
 serde_json = "1.0"
 tokio = { version = "0.2.9", features = [ "blocking", "fs", "io-util", "macros", "rt-threaded", "signal", "stream", "tcp", "time", "uds" ] }
diff --git a/src/backup.rs b/src/backup.rs
index 9f6d176..184ac64 100644
--- a/src/backup.rs
+++ b/src/backup.rs
@@ -112,7 +112,7 @@ impl BackupTask {
                 .fingerprint(self.setup.fingerprint.clone())
                 .password(self.setup.password.clone());
 
-            let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.user, options)?;
+            let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.auth_id, options)?;
             let writer = BackupWriter::start(
                 http, self.crypt_config.clone(), &self.setup.store, "vm", &self.setup.backup_id,
                 self.setup.backup_time, false, false).await?;
diff --git a/src/lib.rs b/src/lib.rs
index 8511cbf..67c18fc 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -7,7 +7,7 @@ use std::os::raw::{c_uchar, c_char, c_int, c_void, c_long};
 use std::sync::{Arc, Mutex, Condvar};
 
 use proxmox::try_block;
-use proxmox_backup::api2::types::Userid;
+use proxmox_backup::api2::types::Authid;
 use proxmox_backup::backup::{CryptMode, BackupDir};
 use proxmox_backup::client::BackupRepository;
 
@@ -116,7 +116,7 @@ pub(crate) struct BackupSetup {
     pub host: String,
     pub port: u16,
     pub store: String,
-    pub user: Userid,
+    pub auth_id: Authid,
     pub chunk_size: u64,
     pub backup_type: String,
     pub backup_id: String,
@@ -223,7 +223,7 @@ pub extern "C" fn proxmox_backup_new(
         let setup = BackupSetup {
             host: repo.host().to_owned(),
             port: repo.port(),
-            user: repo.user().to_owned(),
+            auth_id: repo.auth_id().to_owned(),
             store: repo.store().to_owned(),
             chunk_size: if chunk_size > 0 { chunk_size } else { PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE },
             backup_type: String::from("vm"),
@@ -696,7 +696,7 @@ pub extern "C" fn proxmox_restore_new(
         let setup = BackupSetup {
             host: repo.host().to_owned(),
             port: repo.port(),
-            user: repo.user().to_owned(),
+            auth_id: repo.auth_id().to_owned(),
             store: repo.store().to_owned(),
             chunk_size: PROXMOX_BACKUP_DEFAULT_CHUNK_SIZE, // not used by restore
             backup_type,
diff --git a/src/restore.rs b/src/restore.rs
index 4387025..ad825bd 100644
--- a/src/restore.rs
+++ b/src/restore.rs
@@ -80,7 +80,7 @@ impl RestoreTask {
             .fingerprint(self.setup.fingerprint.clone())
             .password(self.setup.password.clone());
 
-        let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.user, options)?;
+        let http = HttpClient::new(&self.setup.host, self.setup.port, &self.setup.auth_id, options)?;
         let client = BackupReader::start(
             http,
             self.crypt_config.clone(),
-- 
2.20.1





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [pve-devel] applied: [PATCH proxmox-backup-qemu] update to proxmox 0.6/proxmox-backup 0.9.4
  2020-10-30  9:55 [pve-devel] [PATCH proxmox-backup-qemu] update to proxmox 0.6/proxmox-backup 0.9.4 Fabian Grünbichler
@ 2020-10-30 14:22 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2020-10-30 14:22 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

On 30.10.20 10:55, Fabian Grünbichler wrote:
> and implement the switch to Authid, which means API token support for
> free.
> 
> Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> ---
>  Cargo.toml     | 4 ++--
>  src/backup.rs  | 2 +-
>  src/lib.rs     | 8 ++++----
>  src/restore.rs | 2 +-
>  4 files changed, 8 insertions(+), 8 deletions(-)
> 
>

applied, thanks!





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-10-30 14:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-30  9:55 [pve-devel] [PATCH proxmox-backup-qemu] update to proxmox 0.6/proxmox-backup 0.9.4 Fabian Grünbichler
2020-10-30 14:22 ` [pve-devel] applied: " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal