Skip to content

Commit 91a79a4

Browse files
committed
Move nexus::internal_api::params into nexus-types
1 parent d59a27c commit 91a79a4

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

nexus/src/internal_api/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
44

55
pub mod http_entrypoints;
6-
pub mod params;
6+
7+
pub use nexus_types::internal_api::params;

nexus/types/src/external_api/shared.rs

-4
Original file line numberDiff line numberDiff line change
@@ -272,15 +272,11 @@ pub enum IpKind {
272272

273273
#[cfg(test)]
274274
mod test {
275-
use super::IdentityType;
276275
use super::Policy;
277276
use super::MAX_ROLE_ASSIGNMENTS_PER_RESOURCE;
278-
use crate::external_api::shared;
279277
use crate::external_api::shared::IpRange;
280278
use crate::external_api::shared::Ipv4Range;
281279
use crate::external_api::shared::Ipv6Range;
282-
use anyhow::anyhow;
283-
use omicron_common::api::external::Error;
284280
use serde::Deserialize;
285281
use std::net::Ipv4Addr;
286282
use std::net::Ipv6Addr;

nexus/types/src/identity.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait Resource {
3131
fn identity(&self) -> IdentityMetadata {
3232
IdentityMetadata {
3333
id: self.id(),
34-
name: self.name().clone().into(),
34+
name: self.name().clone(),
3535
description: self.description().to_string(),
3636
time_created: self.time_created(),
3737
time_modified: self.time_modified(),

nexus/types/src/internal_api/mod.rs

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
// This Source Code Form is subject to the terms of the Mozilla Public
2+
// License, v. 2.0. If a copy of the MPL was not distributed with this
3+
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4+
5+
pub mod params;

nexus/types/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44

55
pub mod external_api;
66
pub mod identity;
7+
pub mod internal_api;

0 commit comments

Comments
 (0)