Skip to content

Commit

Permalink
license as MPL-2.0 (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco authored Nov 25, 2021
1 parent 439169b commit f3a7e0f
Show file tree
Hide file tree
Showing 159 changed files with 957 additions and 0 deletions.
373 changes: 373 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions api_identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version = "0.1.0"
authors = ["David Pacheco <[email protected]>"]
edition = "2018"
repository = "https://github.com/oxidecomputer/omicron/"
license = "MPL-2.0"

[lib]
proc-macro = true
Expand Down
4 changes: 4 additions & 0 deletions api_identity/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

// Copyright 2020 Oxide Computer Company
/*!
* This macro is a helper to generate an accessor for the identity of any
Expand Down
1 change: 1 addition & 0 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "omicron-common"
version = "0.1.0"
edition = "2018"
license = "MPL-2.0"

[dependencies]
anyhow = "1.0"
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/external/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Error handling facilities for the Oxide control plane
*
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/external/http_pagination.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Pagination support
*
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Data structures and related facilities for representing resources in the API
*
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/internal/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Internally facing APIs.
pub mod nexus;
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/internal/nexus.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! APIs exposed by Nexus.
use crate::api::external::{
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/internal/sled_agent.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! APIs exposed by Sled Agent.
use crate::api::{external, internal};
Expand Down
4 changes: 4 additions & 0 deletions common/src/api/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! APIs, both internal and external.
pub mod external;
Expand Down
4 changes: 4 additions & 0 deletions common/src/backoff.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Module providing utilities for retrying operations with exponential backoff.
*/
Expand Down
4 changes: 4 additions & 0 deletions common/src/bin/omicron-package.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Utility for bundling target binaries as tarfiles.
*/
Expand Down
4 changes: 4 additions & 0 deletions common/src/cmd.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Facilities used by the command-line tools
*/
Expand Down
4 changes: 4 additions & 0 deletions common/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Common objects used for configuration
*/
Expand Down
4 changes: 4 additions & 0 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* # Oxide Control Plane
*
Expand Down
4 changes: 4 additions & 0 deletions common/src/packaging.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Utilities for packaging and unpackaging control plane services.
*/
Expand Down
1 change: 1 addition & 0 deletions nexus-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "nexus-client"
version = "0.1.0"
edition = "2018"
license = "MPL-2.0"

[dependencies]
anyhow = "1.0"
Expand Down
4 changes: 4 additions & 0 deletions nexus-client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Interface for making API requests to the Oxide control plane at large
* from within the control plane
Expand Down
1 change: 1 addition & 0 deletions nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
name = "omicron-nexus"
version = "0.1.0"
edition = "2018"
license = "MPL-2.0"

[build-dependencies.omicron-rpaths]
path = "../rpaths"
Expand Down
4 changes: 4 additions & 0 deletions nexus/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

// See omicron-rpaths for documentation.
// NOTE: This file MUST be kept in sync with the other build.rs files in this
// repository.
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authn/external/cookies.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

use anyhow::Context;
use async_trait::async_trait;
use cookie::{Cookie, CookieJar, ParseError};
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authn/external/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Authentication for requests to the external HTTP API
use crate::authn;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authn/external/session_cookie.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! authn scheme for console that looks up cookie values in a session table
use super::cookies::parse_cookies;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authn/external/spoof.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Custom, test-only authn scheme that trusts whatever the client says
use super::super::Details;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authn/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Authentication facilities
//!
//! In the limit, we'll want all operations in Nexus to have an associated
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authz/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Authorization facilities
use crate::authn;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/authz/oso_types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Types and impls used for integration with Oso
// Most of the types here are used in the Polar configuration, which means they
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/bin/nexus.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Executable program to run Nexus, the heart of the control plane
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Interfaces for parsing configuration files and working with a nexus server
* configuration
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/context.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Shared state used by API request handlers
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/collection_insert.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! CTE implementation for inserting a row representing a child resource of a
//! collection. This atomically
//! 1) checks if the collection exists and is not soft deleted, and fails
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Nexus database configuration
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/datastore.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Primary control plane interface for database read and write operations
*/
Expand Down
1 change: 1 addition & 0 deletions nexus/src/db/db-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "db-macros"
version = "0.1.0"
authors = ["Sean Klein <[email protected]>"]
edition = "2018"
license = "MPL-2.0"

[lib]
proc-macro = true
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/db-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Database-related macro implementations.
//!
//! Diesel provides facilities for mapping structures to SQL tables, but these
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/error.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Error handling and conversions.
use async_bb8_diesel::{ConnectionError, PoolError, PoolResult};
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/identity.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Identity-related traits which may be derived for DB structures.
// Copyright 2021 Oxide Computer Company
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Facilities for working with the Omicron database
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/model.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Structures stored to the database.
use crate::db::collection_insert::DatastoreCollection;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/pagination.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Interface for paginating database queries.
use diesel::dsl::{Asc, Desc, Gt, Lt};
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/pool.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Database connection pooling
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/saga_recovery.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Handles recovery of sagas
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/saga_types.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Types used for sagas
*
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/schema.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Describes the Diesel database schema.
//!
//! NOTE: Should be kept up-to-date with dbinit.sql.
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/sec_store.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Implementation of [`steno::SecStore`] backed by Omicron's database
*/
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/test_utils/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

mod unpluggable_sec_store;

pub use unpluggable_sec_store::UnpluggableCockroachDbSecStore;
4 changes: 4 additions & 0 deletions nexus/src/db/test_utils/unpluggable_sec_store.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! Test-only helper function for detaching storage.
use crate::db;
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/db/update_and_check.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

//! CTE implementation for "UPDATE with extended return status".
use async_bb8_diesel::{AsyncRunQueryDsl, ConnectionManager, PoolError};
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/external_api/console_api.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Handler functions (entrypoints) for console-related routes.
*
Expand Down
4 changes: 4 additions & 0 deletions nexus/src/external_api/http_entrypoints.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at https://mozilla.org/MPL/2.0/.

/*!
* Handler functions (entrypoints) for external HTTP APIs
*/
Expand Down
Loading

0 comments on commit f3a7e0f

Please sign in to comment.