Skip to content

Commit

Permalink
[π˜€π—½π—Ώ] initial version
Browse files Browse the repository at this point in the history
Created using spr 1.3.5
  • Loading branch information
sunshowers committed Dec 13, 2023
2 parents 76a35f2 + 99ac94f commit 6814fef
Show file tree
Hide file tree
Showing 30 changed files with 935 additions and 239 deletions.
34 changes: 34 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ members = [
"test-utils",
"tufaceous-lib",
"tufaceous",
"update-common",
"update-engine",
"wicket-common",
"wicket-dbg",
Expand Down Expand Up @@ -130,6 +131,7 @@ default-members = [
"test-utils",
"tufaceous-lib",
"tufaceous",
"update-common",
"update-engine",
"wicket-common",
"wicket-dbg",
Expand Down Expand Up @@ -382,6 +384,7 @@ trybuild = "1.0.85"
tufaceous = { path = "tufaceous" }
tufaceous-lib = { path = "tufaceous-lib" }
unicode-width = "0.1.11"
update-common = { path = "update-common" }
update-engine = { path = "update-engine" }
usdt = "0.3"
uuid = { version = "1.6.1", features = ["serde", "v4"] }
Expand Down
3 changes: 2 additions & 1 deletion common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,8 @@ pub enum ResourceType {
Oximeter,
MetricProducer,
RoleBuiltin,
UpdateArtifact,
TufRepo,
TufArtifact,
SwitchPort,
SystemUpdate,
ComponentUpdate,
Expand Down
3 changes: 3 additions & 0 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@ assert_matches.workspace = true
async-trait.workspace = true
base64.workspace = true
buf-list.workspace = true
bytes.workspace = true
cancel-safe-futures.workspace = true
camino.workspace = true
camino-tempfile.workspace = true
clap.workspace = true
chrono.workspace = true
crucible-agent-client.workspace = true
Expand Down Expand Up @@ -85,6 +87,7 @@ oximeter.workspace = true
oximeter-instruments = { workspace = true, features = ["http-instruments"] }
oximeter-producer.workspace = true
rustls = { workspace = true }
update-common.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions nexus/db-model/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ mod sled_underlay_subnet_allocation;
mod snapshot;
mod ssh_key;
mod switch;
mod tuf_repo;
mod unsigned;
mod update_artifact;
mod user_builtin;
mod virtual_provisioning_collection;
mod virtual_provisioning_resource;
Expand Down Expand Up @@ -163,7 +163,7 @@ pub use switch::*;
pub use switch_interface::*;
pub use switch_port::*;
pub use system_update::*;
pub use update_artifact::*;
pub use tuf_repo::*;
pub use user_builtin::*;
pub use virtual_provisioning_collection::*;
pub use virtual_provisioning_resource::*;
Expand Down
42 changes: 35 additions & 7 deletions nexus/db-model/src/schema.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1133,18 +1133,46 @@ table! {
}

table! {
update_artifact (name, version, kind) {
name -> Text,
version -> Text,
kind -> crate::KnownArtifactKindEnum,
tuf_repo (id) {
id -> Uuid,
time_created -> Timestamptz,
sha256 -> Text,
targets_role_version -> Int8,
valid_until -> Timestamptz,
target_name -> Text,
target_sha256 -> Text,
target_length -> Int8,
system_version -> Text,
source_file -> Text,
}
}

table! {
tuf_artifact (name, version, kind) {
name -> Text,
version -> Text,
kind -> Text,
time_created -> Timestamptz,
sha256 -> Text,
artifact_length -> Int8,
}
}

table! {
tuf_repo_artifact (tuf_repo_id, tuf_artifact_name, tuf_artifact_version, tuf_artifact_kind) {
tuf_repo_id -> Uuid,
tuf_artifact_name -> Text,
tuf_artifact_version -> Text,
tuf_artifact_kind -> Text,
}
}

allow_tables_to_appear_in_same_query!(
tuf_repo,
tuf_repo_artifact,
tuf_artifact
);
joinable!(tuf_repo_artifact -> tuf_repo (tuf_repo_id));
// Can't specify joinable for a composite primary key (tuf_repo_artifact ->
// tuf_artifact).

table! {
system_update (id) {
id -> Uuid,
Expand Down
2 changes: 2 additions & 0 deletions nexus/db-model/src/semver_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ use serde::{Deserialize, Serialize};
Serialize,
Deserialize,
PartialEq,
Eq,
Hash,
Display,
)]
#[diesel(sql_type = sql_types::Text)]
Expand Down
Loading

0 comments on commit 6814fef

Please sign in to comment.