Skip to content

Commit 82eca42

Browse files
committed
wip: remove separate bootagent crate
1 parent 6711dd2 commit 82eca42

File tree

14 files changed

+345
-521
lines changed

14 files changed

+345
-521
lines changed

Cargo.lock

Lines changed: 0 additions & 108 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sandpolis-agent/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ pub mod agent;
1313

1414
pub mod messages;
1515

16+
pub mod uefi;
17+
1618
#[derive(Default)]
1719
pub struct AgentLayerData {}
1820

sandpolis-agent/src/messages.rs

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,122 @@ pub struct UpdateRequest;
1111

1212
#[derive(Serialize, Deserialize)]
1313
pub enum UpdateResponse {}
14+
15+
/// Request that the boot agent be started.
16+
#[derive(Serialize, Deserialize)]
17+
pub struct LaunchBootAgentRequest {
18+
/// The UUID of the partition containing the boot agent
19+
pub target_uuid: String,
20+
}
21+
22+
#[derive(Serialize, Deserialize)]
23+
pub enum LaunchBootAgentResponse {
24+
Ok,
25+
AccessDenied,
26+
}
27+
28+
/// Request a boot agent be uninstalled from the system.
29+
#[derive(Serialize, Deserialize)]
30+
pub struct UninstallBootAgentRequest {
31+
/// The UUID of the partition containing the boot agent
32+
pub target_uuid: String,
33+
}
34+
35+
#[derive(Serialize, Deserialize)]
36+
pub enum UninstallBootAgentResponse {
37+
Ok,
38+
AccessDenied,
39+
}
40+
41+
/// Scan for installed boot agents.
42+
pub struct ScanBootAgentRequest {}
43+
44+
// Response listing boot agent installations.
45+
//
46+
// Sources : client, server
47+
// Destinations : agent
48+
//
49+
// message RS_FindBootAgents {
50+
51+
// message BootAgentInstallation {
52+
53+
// // The partition UUID
54+
// repeated string partition_uuid = 1;
55+
56+
// // The partition size in bytes
57+
// int64 size = 2;
58+
59+
// // The boot agent's version string
60+
// string version = 3;
61+
// }
62+
63+
// repeated BootAgentInstallation installation = 1;
64+
// }
65+
66+
/// Request a boot agent be installed on the system.
67+
#[derive(Serialize, Deserialize)]
68+
pub struct InstallBootAgentRequest {
69+
/// The UUID of the target partition
70+
pub partition_uuid: String,
71+
72+
/// The MAC address of the network interface to use for connections
73+
pub interface_mac: String,
74+
75+
/// Whether DHCP will be used
76+
pub use_dhcp: bool,
77+
78+
/// A static IP address as an alternative to DHCP
79+
pub static_ip: String,
80+
81+
/// The netmask corresponding to the static IP
82+
pub netmask: String,
83+
84+
/// The gateway IP
85+
pub gateway_ip: String,
86+
}
87+
88+
#[derive(Serialize, Deserialize)]
89+
pub enum InstallBootAgentResponse {
90+
Ok,
91+
AccessDenied,
92+
}
93+
94+
// Response listing boot agent installation candidates.
95+
//
96+
// Sources : agent
97+
// Destinations : client, server
98+
// Request : RQ_FindBootAgents
99+
//
100+
// message RS_FindBootAgentCandidates {
101+
102+
// message DeviceCandidate {
103+
104+
// // The device's UUID
105+
// string device_uuid = 1;
106+
107+
// // The size of the device in bytes
108+
// int64 device_size = 2;
109+
110+
// // The device name
111+
// string device_name = 3;
112+
// }
113+
114+
// message PartitionCandidate {
115+
116+
// // The partition's UUID
117+
// string partition_uuid = 1;
118+
119+
// // The size of the partition in bytes
120+
// int64 partition_size = 2;
121+
122+
// // The device name upon which the partition exists
123+
// string device_name = 3;
124+
125+
// // The amount of free space remaining on the device's ESP
126+
// int64 esp_free_space = 4;
127+
// }
128+
129+
// repeated DeviceCandidate device_candidate = 1;
130+
131+
// repeated PartitionCandidate partition_candidate = 2;
132+
// }

0 commit comments

Comments
 (0)