Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6bd0f0d
... it works! DiskRuntimeState is being 'selected'
smklein Sep 20, 2021
f6560d2
Also selecting on InstanceRuntimeState
smklein Sep 20, 2021
77dcebd
added define_identity macro; mostly switched project + instance
smklein Sep 21, 2021
c4fca67
Refactor generics into UpdateStatementExt container of associated types
smklein Sep 21, 2021
e56e90e
Merge branch 'diesel-selectable' into identity-metadata
smklein Sep 22, 2021
44795f7
Merge branch 'main' into diesel-selectable
smklein Sep 22, 2021
d841024
Merge branch 'diesel-selectable' into identity-metadata
smklein Sep 22, 2021
a88b63f
Add new derive macro for IdentityMetadata, use it
smklein Sep 22, 2021
ad29bca
fmt
smklein Sep 22, 2021
771af1d
Merge branch 'main' into identity-metadata
smklein Oct 5, 2021
c2c8424
Resource trait, renamed derive macro
smklein Oct 5, 2021
2aefcd3
Identity type checking via traits
smklein Oct 6, 2021
11860bb
Merge w/durable sleds
smklein Oct 6, 2021
3b2a639
Use traits: 'resource' for full metadata, 'asset' for no soft delete.
smklein Oct 6, 2021
635369f
Remove unnecessary dep
smklein Oct 6, 2021
0fcf9be
Unwrapping names strikes again! (Fixed)
smklein Oct 6, 2021
6f04d09
Merge branch 'main' into identity-metadata
smklein Oct 6, 2021
9a058f5
Remove macro from workspace Cargo.toml; it's just a local dep of Nexus
smklein Oct 6, 2021
f784bfe
Merge branch 'main' into identity-metadata
smklein Oct 8, 2021
38defab
Merge branch 'main' into identity-metadata
smklein Oct 8, 2021
19553af
Merge branch 'main' into identity-metadata
smklein Oct 13, 2021
0fc1f98
Merge branch 'main' into identity-metadata (organizations)
smklein Oct 14, 2021
e9ba000
Merge branch 'main' into identity-metadata (diesel uncommon)
smklein Oct 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
members = [
"common",
"nexus",
"nexus/src/db/db-macros",
"rpaths",
"sled-agent",
"oximeter/oximeter",
Expand All @@ -15,6 +16,7 @@ members = [
default-members = [
"common",
"nexus",
"nexus/src/db/db-macros",
"rpaths",
"sled-agent",
"oximeter/oximeter",
Expand Down
26 changes: 17 additions & 9 deletions common/src/sql/dbinit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,25 @@ CREATE DATABASE omicron;
CREATE USER omicron;
GRANT INSERT, SELECT, UPDATE, DELETE ON DATABASE omicron to omicron;

/*
* Racks
*/
CREATE TABLE omicron.public.Rack (
/* Identity metadata (asset) */
id UUID PRIMARY KEY,
time_created TIMESTAMPTZ NOT NULL,
time_modified TIMESTAMPTZ NOT NULL
);

/*
* Sleds
*/

CREATE TABLE omicron.public.Sled (
/* Identity metadata */
/* Identity metadata (asset) */
id UUID PRIMARY KEY,
time_created TIMESTAMPTZ NOT NULL,
time_modified TIMESTAMPTZ NOT NULL,
/* Indicates that the object has been deleted */
time_deleted TIMESTAMPTZ,

ip INET NOT NULL,
port INT4 NOT NULL
Expand Down Expand Up @@ -83,7 +91,7 @@ CREATE UNIQUE INDEX ON omicron.public.Organization (
*/

CREATE TABLE omicron.public.Project (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand Down Expand Up @@ -129,7 +137,7 @@ CREATE UNIQUE INDEX ON omicron.public.Project (
* like. Or changing # of CPUs or memory size.
*/
CREATE TABLE omicron.public.Instance (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand Down Expand Up @@ -191,7 +199,7 @@ CREATE UNIQUE INDEX ON omicron.public.Instance (
-- );

CREATE TABLE omicron.public.Disk (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand Down Expand Up @@ -274,7 +282,7 @@ CREATE INDEX ON omicron.public.MetricProducer (


CREATE TABLE omicron.public.Vpc (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand All @@ -293,7 +301,7 @@ CREATE UNIQUE INDEX ON omicron.public.Vpc (
time_deleted IS NULL;

CREATE TABLE omicron.public.VpcSubnet (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand All @@ -314,7 +322,7 @@ CREATE UNIQUE INDEX ON omicron.public.VpcSubnet (
time_deleted IS NULL;

CREATE TABLE omicron.public.NetworkInterface (
/* Identity metadata */
/* Identity metadata (resource) */
id UUID PRIMARY KEY,
name STRING(63) NOT NULL,
description STRING(512) NOT NULL,
Expand Down
1 change: 1 addition & 0 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ diesel = { git = "https://github.com/diesel-rs/diesel", rev = "a39dd2e", feature
futures = "0.3.15"
http = "0.2.5"
hyper = "0.14"
db-macros = { path = "src/db/db-macros" }
ipnetwork = "0.18"
lazy_static = "1.4.0"
libc = "0.2.103"
Expand Down
Loading