forked from DGNum/colmena
Remove another ugly toJSON hack
This commit is contained in:
parent
111bc9dea7
commit
f9f4dd5f63
1 changed files with 3 additions and 5 deletions
|
@ -219,11 +219,9 @@ impl Hive {
|
||||||
|
|
||||||
/// Retrieve deployment info for a single node.
|
/// Retrieve deployment info for a single node.
|
||||||
pub async fn deployment_info_single(&self, node: &NodeName) -> NixResult<Option<NodeConfig>> {
|
pub async fn deployment_info_single(&self, node: &NodeName) -> NixResult<Option<NodeConfig>> {
|
||||||
let expr = format!("toJSON (hive.nodes.\"{}\".config.deployment or null)", node.as_str());
|
let expr = format!("hive.nodes.\"{}\".config.deployment or null", node.as_str());
|
||||||
let s: String = self.nix_instantiate(&expr).eval_with_builders().await?
|
self.nix_instantiate(&expr).eval_with_builders().await?
|
||||||
.capture_json().await?;
|
.capture_json().await
|
||||||
|
|
||||||
Ok(serde_json::from_str(&s).unwrap())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Retrieve deployment info for a list of nodes.
|
/// Retrieve deployment info for a list of nodes.
|
||||||
|
|
Loading…
Add table
Reference in a new issue