Prevent multiple --allow flags (#35)

* Prevent multiple --allow flags

* --allow: better value name instead of just <ALLOW>
This commit is contained in:
Nikolay Edigaryev
2024-03-11 23:02:59 +04:00
committed by GitHub
parent a92f4e0c99
commit 4a13c5922b
4 changed files with 200 additions and 134 deletions
+4 -2
View File
@@ -32,7 +32,7 @@ struct Args {
#[clap(long, help = "MAC address to enforce for the VM")]
vm_mac_address: mac_address::MacAddress,
#[clap(long, arg_enum, help = "type of network to use for the VM", default_value_t=NetType::Nat)]
#[clap(long, value_enum, help = "type of network to use for the VM", default_value_t=NetType::Nat)]
vm_net_type: NetType,
#[clap(
@@ -51,7 +51,9 @@ struct Args {
#[clap(
long,
help = "comma-separated list of CIDRs to allow the traffic to (e.g. --allow=192.168.0.0/24)",
use_value_delimiter = true
value_name = "comma-separated CIDRs",
use_value_delimiter = true,
action = clap::ArgAction::Set
)]
allow: Vec<Ipv4Net>,