Skip to content

Commit

Permalink
chore(bors): merge pull request #789
Browse files Browse the repository at this point in the history
789: Cherry Pick PR 788 to 2.6 r=sinhaashish a=sinhaashish

This PR cherry-picks PR788 to release/2.6
commit [8ba9a32bd3e5](67531ea)

Co-authored-by: sinhaashish <[email protected]>
  • Loading branch information
mayastor-bors and sinhaashish committed Mar 21, 2024
2 parents 59db5f8 + 9ed7a5f commit 0058585
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions control-plane/plugin/src/resources/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,18 +220,17 @@ impl GetWithArgs for Node {
type Args = GetNodeArgs;
async fn get(id: &Self::ID, args: &Self::Args, output: &utils::OutputFormat) -> PluginResult {
match RestClient::client().nodes_api().get_node(id).await {
Ok(node) => {
let node_display =
NodeDisplayLabels::new(node.clone().into_body(), args.show_labels());
match output {
OutputFormat::Yaml | OutputFormat::Json => {
print_table(output, node_display.inner);
}
OutputFormat::None => {
print_table(output, node_display);
}
Ok(node) => match output {
OutputFormat::Yaml | OutputFormat::Json => {
print_table(output, node.clone().into_body());
}
}
OutputFormat::None => {
print_table(
output,
NodeDisplayLabels::new(node.into_body(), args.show_labels()),
);
}
},
Err(e) => {
return Err(Error::GetNodeError {
id: id.to_string(),
Expand Down

0 comments on commit 0058585

Please sign in to comment.