1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-FileCopyrightText: 2026 RAprogramm <andrey.rozanov.vl@gmail.com>
// SPDX-License-Identifier: MIT
//! Server image subcommands.
use clap::Subcommand;
/// Disk image subcommands.
#[derive(Subcommand, Debug)]
pub enum ImageCommands {
/// List all disk images.
List,
/// Show detailed info for an image.
Info {
/// Image ID.
#[arg(long)]
id: String
},
/// Create a new image.
Create {
/// Image name.
#[arg(long)]
name: String,
/// Location where the image is created.
#[arg(long)]
location: String
},
/// Update an image's name.
Set {
/// Image ID.
#[arg(long)]
id: String,
/// New image name.
#[arg(long)]
name: Option<String>
},
/// Delete an image by ID.
Delete {
/// Image ID.
#[arg(long)]
id: String
},
/// Upload a local image file to an image.
Upload {
/// Image ID.
#[arg(long)]
id: String,
/// Path to the local image file.
#[arg(long)]
file: String
}
}