Thomas Lamprecht
dc7a5b3491
api: rustfmt
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-04-14 13:33:01 +02:00
Dominik Csapak
984ddb2ff2
api: admin/datastore: add tar support for pxar_file_download
...
by using the newly added 'create_tar' and the 'ZstdEncoder'
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-13 10:08:26 +02:00
Dominik Csapak
b7c3eaa981
api: admin/datastore: enable streaming for some api calls
...
namely /admin/datastore/{store}/snapshots
and /nodes/{node}/tasks
since those are api calls where the result can get quite large
with this change, the serialization is now streaming instead of making
a `Value` in memory.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-04-13 08:13:42 +02:00
Hannes Laimer
5fd823c3f2
api: add get_active_operations endpoint
...
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-04-12 15:29:14 +02:00
Hannes Laimer
e9d2fc9362
datastore: add check for maintenance in lookup
...
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
2022-04-12 15:29:14 +02:00
Stefan Sterz
171a00ca97
tape, docs, api: fix miscellaneous typos
...
Signed-off-by: Stefan Sterz <s.sterz@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-03-11 12:52:06 +01:00
Dietmar Maurer
e705b3057f
rename cached_traffic_control.rs to traffic_control_cache.rs, improve dev docs
...
Keep things inside crate::traffic_control_cache (do not pollute root namespace).
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2022-02-14 13:45:44 +01:00
Dominik Csapak
f27b6086b1
api/admin/datastore: rrd: do not include io_ticks for zfs datastores
...
since it is not possible to collect them, do not return them here either
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2022-01-11 11:42:09 +01:00
Dietmar Maurer
b44483a853
datastore status: do not count empty groups
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2022-01-07 08:40:22 +01:00
Fabian Grünbichler
aa174e8e8a
tree-wide: drop redundant clones
...
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 15:02:07 +01:00
Fabian Grünbichler
9a37bd6c84
tree-wide: fix needless borrows
...
found and fixed via clippy
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2021-12-30 13:55:33 +01:00
Wolfgang Bumiller
e25982f24e
remove unused identity macro
...
this is not required anymore by the sortable macro
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-11-29 11:24:02 +01:00
Dietmar Maurer
25877d05ac
update to proxmox-sys 0.2 crate
...
- imported pbs-api-types/src/common_regex.rs from old proxmox crate
- use hex crate to generate/parse hex digest
- remove all reference to proxmox crate (use proxmox-sys and
proxmox-serde instead)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-24 10:32:27 +01:00
Dietmar Maurer
92a8f0bc82
depend on proxmox-async 0.2
2021-11-20 17:14:02 +01:00
Dietmar Maurer
9a1b24b6b1
use new proxmox-async crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 18:03:22 +01:00
Dietmar Maurer
d5790a9f27
use new proxmox-sys crate
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-19 11:06:35 +01:00
Dietmar Maurer
26e949d5fe
traffic-control api: return current traffic with config
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-18 12:24:33 +01:00
Dietmar Maurer
24f9af9e0f
add missing file from previous commit
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-14 18:49:29 +01:00
Dietmar Maurer
a0172d766b
traffic-controls: add API/CLI to show current traffic
...
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-11-14 17:21:45 +01:00
Dominik Csapak
9b1e2ae83c
api: admin/datastore: reuse 'is_protected' implementation
...
we already have that
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 12:54:54 +02:00
Dominik Csapak
8292d3d20e
api2/admin/datastore: add get/set_protection
...
for gettin/setting the protected flag for snapshots (akin to notes)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:11 +02:00
Dominik Csapak
5cc7d89139
api2: datastore/delete_group: throw error for partially removed group
...
when a group could not be completely removed due to protected snapshot,
throw an error
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:31:07 +02:00
Dominik Csapak
02db72678f
add protected info of snapshots to api and task logs
...
adds the info that a snapshot is protected to:
* snapshot list
* manual pruning (also dry-run)
* prune jobs
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-28 11:30:51 +02:00
Dietmar Maurer
e0a19d3313
use new fsync parameter to replace_file and atomic_open_or_create
...
Depend on proxmox 0.15.0 and proxmox-openid 0.8.1
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
2021-10-21 07:28:32 +02:00
Dietmar Maurer
c68fa58a59
remove proxmox-rrd-api-types crate, s/RRDTimeFrameResolution/RRDTimeFrame/
...
Because the types used inside the RRD have other requirements
than the API types:
- other serialization format
- the API may not support all RRD features
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-10-13 13:36:02 +02:00
Wolfgang Bumiller
6ef1b649d9
update to first proxmox crate split
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-10-11 11:58:49 +02:00
Dietmar Maurer
d1c3bc5350
split out RRD api types into proxmox-rrd-api-types crate
2021-10-06 09:49:51 +02:00
Dietmar Maurer
09340f28f5
move RRD code into proxmox-rrd crate
2021-10-06 08:13:28 +02:00
Dietmar Maurer
53daae8e89
proxmox-rest-server: cleanup formatter, improve docs
...
Use trait for OutputFormatter. This is functionally equivalent,
but more rust-like...
2021-09-28 07:45:50 +02:00
Dietmar Maurer
8a23ea4656
move src/backup/read_chunk.rs to pbs-datastore/src/local_chunk_reader.rs
2021-09-27 11:10:14 +02:00
Dietmar Maurer
6d5d305d9d
move src/backup/datastore.rs into pbs_datastore crate
2021-09-27 09:11:38 +02:00
Dietmar Maurer
1ec0d70d09
cleanup worker task logging
...
In order to avoid name conflicts with WorkerTaskContext
- renamed WorkerTask::log to WorkerTask::log_message
Note: Methods have different fuction signatures
Also renamed WorkerTask::warn to WorkerTask::log_warning for
consistency reasons.
Use the task_log!() and task_warn!() macros more often.
2021-09-24 10:34:11 +02:00
Dietmar Maurer
b9700a9fe5
move worker_task.rs into proxmox-rest-server crate
...
Also moved pbs-datastore/src/task.rs to pbs-tools, which now depends on 'log'.
2021-09-24 10:28:17 +02:00
Dietmar Maurer
049a22a3a3
src/server/worker_task.rs: Avoid using pbs-api-type::Authid
...
Because we want to move worker_task.rs into proxmox-rest-server crate.
2021-09-23 11:59:25 +02:00
Dominik Csapak
bfa942c0cf
api: make some workers log on CLI
...
some workers did not log when called via cli
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 15:10:37 +02:00
Dietmar Maurer
1b552c109d
move src/server/formatter.rs to proxmox-rest-server crate
...
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
fd6d243843
move ApiConfig, FileLogger and CommandoSocket to proxmox-rest-server workspace
...
ApiConfig: avoid using pbs_config::backup_user()
CommandoSocket: avoid using pbs_config::backup_user()
FileLogger: avoid using pbs_config::backup_user()
- use atomic_open_or_create_file()
Auth Trait: moved definitions to proxmox-rest-server/src/lib.rs
- removed CachedUserInfo patrameter
- return user as String (not Authid)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2021-09-21 08:46:41 +02:00
Dietmar Maurer
6227654ad8
more api type cleanups: avoid re-exports
2021-09-10 12:25:32 +02:00
Dietmar Maurer
89725197c0
move PruneOptions to pbs_api_types workspace
2021-09-10 09:21:27 +02:00
Dietmar Maurer
e7d4be9d85
move datastore config to pbs_config workspace
2021-09-10 08:40:58 +02:00
Dietmar Maurer
ba3d7e19fb
move user configuration to pbs_config workspace
...
Also moved memcom.rs and cached_user_info.rs
2021-09-10 07:09:04 +02:00
Dietmar Maurer
8cc3760e74
move acl to pbs_config workspaces, pbs_api_types cleanups
2021-09-09 10:50:08 +02:00
Dietmar Maurer
802189f7f5
move verify.rs to pbs_config workspace
2021-09-08 08:01:07 +02:00
Dietmar Maurer
a4e5a0fc9f
move sync.rs to pbs_config workspace
2021-09-08 06:57:23 +02:00
Dietmar Maurer
e3619d4101
moved tape_job.rs to pbs_config workspace
2021-09-07 12:40:15 +02:00
Wolfgang Bumiller
86582454e8
make api2::helpers::list_dir_content a CatalogReader method
...
this is its natural place and everything required is already
part of the catalog module
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-31 11:29:17 +02:00
Wolfgang Bumiller
013b1e8bca
move some more API types
...
ArchiveEntry -> pbs-datastore
RestoreDaemonStatus -> pbs-api-types
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-31 11:29:17 +02:00
Wolfgang Bumiller
b2065dc7d2
cleanup proxmox_backup::backup module
...
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-30 14:14:04 +02:00
Wolfgang Bumiller
7b570c177d
move some API return types to pbs-api-types
...
they'll be required by the api client
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-08-30 11:39:01 +02:00
Wolfgang Bumiller
fc5870be53
move channel/stream helpers to pbs-tools
...
pbs_tools
::blocking: std/async wrapping with block_in_place
::stream: stream <-> AsyncRead/AsyncWrite wrapping
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2021-07-20 11:27:40 +02:00