Skip to content

Commit

Permalink
rename propolis-server-config and add spec helper
Browse files Browse the repository at this point in the history
Now that config TOMLs no longer configure Propolis servers, rename
the propolis-server-config crate to propolis-config-toml, then add code
to convert a config TOML into a set of instance spec configuration
options. Most of this code already existed in propolis-server's config
TOML processor, which is now deleted.

Also tweak a couple of field names in the SoftNPU port spec type to
clarify that the name that a port has *within a SoftNPU setup* is
distinct from its instance spec component key.
  • Loading branch information
gjcolombo committed Dec 2, 2024
1 parent 8740130 commit add77d2
Show file tree
Hide file tree
Showing 15 changed files with 448 additions and 448 deletions.
25 changes: 14 additions & 11 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ cpuid_profile_config = { path = "crates/cpuid-profile-config" }
dladm = { path = "crates/dladm" }
nvpair = { path = "crates/nvpair" }
nvpair_sys = { path = "crates/nvpair/sys" }
propolis-server-config = { path = "crates/propolis-server-config" }
propolis-config-toml = { path = "crates/propolis-config-toml" }
propolis_api_types = { path = "crates/propolis-api-types" }
propolis_types = { path = "crates/propolis-types" }
rfb = { path = "crates/rfb" }
Expand Down
3 changes: 2 additions & 1 deletion bin/propolis-server/src/lib/spec/api_spec_v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl From<Spec> for InstanceSpecV0 {
&mut spec,
port_name.clone(),
ComponentV0::SoftNpuPort(SoftNpuPortSpec {
name: port_name,
link_name: port.link_name,
backend_name: port.backend_name.clone(),
}),
);
Expand Down Expand Up @@ -346,6 +346,7 @@ impl TryFrom<InstanceSpecV0> for Spec {
})?;

let port = SoftNpuPort {
link_name: port.link_name,
backend_name: port.backend_name,
backend_spec,
};
Expand Down
Loading

0 comments on commit add77d2

Please sign in to comment.