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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! Branching and deleting a workspace's Linux machine on the member device
//! that holds it (`docs/app-model/environments.md`, "Members that take work").
//!
//! A workspace's VM lives on one VM host, whose disk holds it. When the
//! workspace's host branches the workspace, the branch's machine is made on
//! that same host as a copy of the source's disk; when the host deletes a
//! workspace, its machine goes first. The host asks the member device of that
//! VM host over the device action service, as the device it is, the way it asks for a
//! shell command ([`environment_commands`](super::environment_commands)):
//!
//! - [`branch_target`] names a branch, an action of the branch's environment
//! ([`RESOURCE`]): the workspace asked in is the branch, and the argument is
//! a [`BranchMachine`] naming the source. It succeeds with a
//! [`MachineBranched`] once the branch's disk is there, or saying the source
//! had no machine, so nothing was copied.
//! - [`delete_target`] names a deletion of the workspace's own machine: its
//! disk and snapshot go. It succeeds once they are gone, a workspace that
//! had none included.
//!
//! Only the workspace's host asks, as a device of the operator the member's
//! own identity belongs to, as for a run: a branch is paid for by the account
//! the request names, which only the host knows, and the workspace a machine
//! is branched into or deleted for is the caller's, never one the request
//! names.
use ;
use RemoteActionTarget;
use crateActionAddress;
/// The provider the member answers a workspace's machine under: the one its
/// runs are.
pub const PROVIDER: &str = PROVIDER;
/// The resource branching or deleting one is an action of: the workspace's
/// environment.
pub const RESOURCE: &str = RESOURCE;
/// Make the workspace's machine a copy of another workspace's.
pub const BRANCH: &str = "branch-machine";
/// Delete the workspace's machine, its disk and its snapshot.
pub const DELETE: &str = "delete-machine";
/// What [`BRANCH`] is invoked on.
/// What [`DELETE`] is invoked on.
/// The machine of the workspace asked in, to make from another's.
/// How a branch of a machine went.
/// What [`DELETE`] takes: nothing but the workspace it is asked in.