Skip to content

Commit

Permalink
Merge branch 'main' into hide-internal-silos-in-utilization
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Jan 31, 2024
2 parents f0dda10 + 6491841 commit f72e63f
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion end-to-end-tests/src/instance_launch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async fn instance_launch() -> Result<()> {
network_interfaces: InstanceNetworkInterfaceAttachment::Default,
external_ips: vec![ExternalIpCreate::Ephemeral { pool: None }],
user_data: String::new(),
ssh_keys: Some(vec![oxide_client::types::NameOrId::Name(
ssh_public_keys: Some(vec![oxide_client::types::NameOrId::Name(
ssh_key_name.clone(),
)]),
start: true,
Expand Down
2 changes: 1 addition & 1 deletion nexus/db-queries/src/db/queries/external_ip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ mod tests {
ncpus: InstanceCpuCount(omicron_common::api::external::InstanceCpuCount(1)).into(),
memory: ByteCount(omicron_common::api::external::ByteCount::from_gibibytes_u32(1)).into(),
hostname: "test".into(),
ssh_keys: None,
ssh_public_keys: None,
user_data: vec![],
network_interfaces: Default::default(),
external_ips: vec![],
Expand Down
2 changes: 1 addition & 1 deletion nexus/db-queries/src/db/queries/network_interface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1740,7 +1740,7 @@ mod tests {
memory: ByteCount::from_gibibytes_u32(4),
hostname: "inst".to_string(),
user_data: vec![],
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces: InstanceNetworkInterfaceAttachment::None,
external_ips: vec![],
disks: vec![],
Expand Down
4 changes: 2 additions & 2 deletions nexus/src/app/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ impl super::Nexus {
.lookup_for(authz::Action::ListChildren)
.await?;

let ssh_keys = match &params.ssh_keys {
let ssh_keys = match &params.ssh_public_keys {
Some(keys) => Some(
self.db_datastore
.ssh_keys_batch_lookup(opctx, &authz_user, keys)
Expand All @@ -354,7 +354,7 @@ impl super::Nexus {
serialized_authn: authn::saga::Serialized::for_opctx(opctx),
project_id: authz_project.id(),
create_params: params::InstanceCreate {
ssh_keys,
ssh_public_keys: ssh_keys,
..params.clone()
},
boundary_switches: self
Expand Down
4 changes: 2 additions & 2 deletions nexus/src/app/sagas/instance_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ async fn sic_associate_ssh_keys(
&opctx,
&authz_user,
instance_id,
&saga_params.create_params.ssh_keys.map(|k| {
&saga_params.create_params.ssh_public_keys.map(|k| {
// Before the instance_create saga is kicked off all entries
// in `ssh_keys` are validated and converted to `Uuids`.
k.iter()
Expand Down Expand Up @@ -1104,7 +1104,7 @@ pub mod test {
memory: ByteCount::from_gibibytes_u32(4),
hostname: String::from("inst"),
user_data: vec![],
ssh_keys: None,
ssh_public_keys: None,
network_interfaces:
params::InstanceNetworkInterfaceAttachment::Default,
external_ips: vec![params::ExternalIpCreate::Ephemeral {
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/instance_delete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ mod test {
memory: ByteCount::from_gibibytes_u32(4),
hostname: String::from("inst"),
user_data: vec![],
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces:
params::InstanceNetworkInterfaceAttachment::Default,
external_ips: vec![params::ExternalIpCreate::Ephemeral {
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/instance_migrate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ mod tests {
memory: ByteCount::from_gibibytes_u32(2),
hostname: String::from(INSTANCE_NAME),
user_data: b"#cloud-config".to_vec(),
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces:
params::InstanceNetworkInterfaceAttachment::None,
external_ips: vec![],
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/instance_start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ mod test {
memory: ByteCount::from_gibibytes_u32(2),
hostname: String::from(INSTANCE_NAME),
user_data: b"#cloud-config".to_vec(),
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces:
params::InstanceNetworkInterfaceAttachment::None,
external_ips: vec![],
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/sagas/snapshot_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1944,7 +1944,7 @@ mod test {
user_data:
b"#cloud-config\nsystem_info:\n default_user:\n name: oxide"
.to_vec(),
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces:
params::InstanceNetworkInterfaceAttachment::None,
disks: disks_to_attach,
Expand Down
2 changes: 1 addition & 1 deletion nexus/test-utils/src/resource_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ pub async fn create_instance_with(
user_data:
b"#cloud-config\nsystem_info:\n default_user:\n name: oxide"
.to_vec(),
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces: nics.clone(),
external_ips,
disks,
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/integration_tests/endpoints.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ pub static DEMO_INSTANCE_CREATE: Lazy<params::InstanceCreate> =
memory: ByteCount::from_gibibytes_u32(16),
hostname: String::from("demo-instance"),
user_data: vec![],
ssh_keys: Some(Vec::new()),
ssh_public_keys: Some(Vec::new()),
network_interfaces: params::InstanceNetworkInterfaceAttachment::Default,
external_ips: vec![params::ExternalIpCreate::Ephemeral {
pool: Some(DEMO_IP_POOL_NAME.clone().into()),
Expand Down
Loading

0 comments on commit f72e63f

Please sign in to comment.