driver_tools/subcommands/test_node/
args.rs

1// Copyright 2022 The Fuchsia Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5use super::subcommands::add::args::AddTestNodeCommand;
6use super::subcommands::remove::args::RemoveTestNodeCommand;
7use argh::{ArgsInfo, FromArgs};
8
9#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
10#[argh(subcommand, name = "test-node", description = "Commands to interact with test nodes.")]
11pub struct TestNodeCommand {
12    /// if this exists, the user will be prompted for a component to select.
13    #[argh(switch, short = 's', long = "select")]
14    pub select: bool,
15
16    #[argh(subcommand)]
17    pub subcommand: TestNodeSubcommand,
18}
19
20#[derive(ArgsInfo, FromArgs, Debug, PartialEq)]
21#[argh(subcommand)]
22pub enum TestNodeSubcommand {
23    Add(AddTestNodeCommand),
24    Remove(RemoveTestNodeCommand),
25}