Skip to content

Commit f5166e1

Browse files
committed
try a weird way of bringing external/internal into nexus
1 parent 4a1267b commit f5166e1

File tree

13 files changed

+22
-20
lines changed

13 files changed

+22
-20
lines changed

omicron-nexus/src/db/datastore.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ use super::sql_operations::sql_insert_unique;
6262
use super::sql_operations::sql_insert_unique_idempotent_and_fetch;
6363
use super::sql_operations::sql_update_precond;
6464
use crate::db;
65-
use crate::params;
65+
use crate::external::params;
6666

6767
pub struct DataStore {
6868
pool: Arc<Pool>,

omicron-nexus/src/http_entrypoints_external.rs renamed to omicron-nexus/src/external/http_entrypoints.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
* Handler functions (entrypoints) for external HTTP APIs
33
*/
44

5-
use super::ServerContext;
5+
use crate::context::ServerContext;
66
use crate::db;
77

8-
use crate::params;
9-
use crate::views;
8+
use super::params;
9+
use super::views;
1010
use dropshot::endpoint;
1111
use dropshot::ApiDescription;
1212
use dropshot::HttpError;

omicron-nexus/src/external/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
pub mod http_entrypoints;
2+
pub mod params;
3+
mod views;
File renamed without changes.
File renamed without changes.

omicron-nexus/src/http_entrypoints_internal.rs renamed to omicron-nexus/src/internal/http_entrypoints.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Handler functions (entrypoints) for HTTP APIs internal to the control plane
33
*/
4-
use super::ServerContext;
4+
use super::super::ServerContext;
55

66
use dropshot::endpoint;
77
use dropshot::ApiDescription;

omicron-nexus/src/internal/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pub mod http_entrypoints;

omicron-nexus/src/lib.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,19 @@
1515
mod config;
1616
mod context;
1717
pub mod db; // Public only for some documentation examples
18-
mod http_entrypoints_external;
19-
mod http_entrypoints_internal;
18+
pub mod external;
19+
mod internal;
2020
mod nexus;
21-
pub mod params;
2221
mod saga_interface;
2322
mod sagas;
24-
pub mod views;
2523

2624
pub use config::Config;
2725
pub use context::ServerContext;
2826
pub use nexus::Nexus;
2927
pub use nexus::TestInterfaces;
3028

31-
use http_entrypoints_external::external_api;
32-
use http_entrypoints_internal::internal_api;
29+
use external::http_entrypoints::external_api;
30+
use internal::http_entrypoints::internal_api;
3331

3432
use slog::Logger;
3533
use std::sync::Arc;

omicron-nexus/src/nexus.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44

55
use crate::db;
6-
use crate::params;
6+
use crate::external::params;
77
use crate::saga_interface::SagaContext;
88
use crate::sagas;
99
use anyhow::Context;

omicron-nexus/tests/test_basic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ use omicron_common::api::external::IdentityMetadataCreateParams;
1717
use omicron_common::api::external::IdentityMetadataUpdateParams;
1818
use omicron_common::api::external::Name;
1919
use omicron_common::api::external::Sled;
20-
use omicron_nexus::params;
21-
use omicron_nexus::views::Project;
20+
use omicron_nexus::external::params;
21+
use omicron_nexus::external::views::Project;
2222
use std::convert::TryFrom;
2323
use uuid::Uuid;
2424

0 commit comments

Comments
 (0)