Skip to content

Commit 254c32b

Browse files
committed
Use global routes for single-resource operations, keep project-scoped routes for lists/creates
Migrate handlers, frontend endpoints, hooks, pages, and tests to the hybrid routing scheme where GET/DELETE/action on individual resources use global paths (e.g. /vms/{id}) while list and create operations remain under /projects/{id}/.
1 parent f2ae813 commit 254c32b

39 files changed

Lines changed: 1556 additions & 749 deletions

Cargo.lock

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

mvirt-api/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@ tonic-build = "0.12"
5353

5454
[dev-dependencies]
5555
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "sync", "time"] }
56-
reqwest = { version = "0.12", features = ["json"] }
56+
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
5757
tokio-test = "0.4"
5858
portpicker = "0.1"

mvirt-api/src/audit.rs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,39 @@ impl ApiAuditLogger {
229229
}
230230

231231
// Template events
232+
// Security group events
233+
pub fn security_group_created(&self, sg_id: &str, sg_name: &str) {
234+
self.log_async(
235+
LogLevel::Audit,
236+
format!("Security group created: {} ({})", sg_name, sg_id),
237+
vec![sg_id.to_string()],
238+
);
239+
}
240+
241+
pub fn security_group_deleted(&self, sg_id: &str) {
242+
self.log_async(
243+
LogLevel::Audit,
244+
format!("Security group deleted: {}", sg_id),
245+
vec![sg_id.to_string()],
246+
);
247+
}
248+
249+
pub fn security_group_rule_created(&self, sg_id: &str) {
250+
self.log_async(
251+
LogLevel::Audit,
252+
format!("Security group rule created on: {}", sg_id),
253+
vec![sg_id.to_string()],
254+
);
255+
}
256+
257+
pub fn security_group_rule_deleted(&self, sg_id: &str, rule_id: &str) {
258+
self.log_async(
259+
LogLevel::Audit,
260+
format!("Security group rule {} deleted from: {}", rule_id, sg_id),
261+
vec![sg_id.to_string()],
262+
);
263+
}
264+
232265
pub fn template_import_started(&self, job_id: &str) {
233266
self.log_async(
234267
LogLevel::Audit,

0 commit comments

Comments
 (0)