From 4deda4fc6a684e3aaf8f6b561fe554e3f74e6474 Mon Sep 17 00:00:00 2001 From: Will Chandler Date: Thu, 8 Aug 2024 09:13:36 -0400 Subject: [PATCH] Accept profile argument in all subcommands The `profile` argument is associated with the top-level `oxide` command, meaning it must be applied before a subcommand is registered. It would be convenient to be able to specify this arg at any point in the command, such as when repeating the same command against different profiles. Set `global` to `true` for `profile` to allow this behavior. --- cli/docs/cli.json | 1284 +++++++++++++++++++++++++++++++++++++++- cli/src/cli_builder.rs | 2 +- 2 files changed, 1270 insertions(+), 16 deletions(-) diff --git a/cli/docs/cli.json b/cli/docs/cli.json index f9a9ad6a..dabac39f 100644 --- a/cli/docs/cli.json +++ b/cli/docs/cli.json @@ -70,6 +70,10 @@ "long": "paginate", "help": "Make additional HTTP requests to fetch all pages of results" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "raw-field", "short": "f", @@ -81,6 +85,12 @@ "name": "auth", "about": "Login, logout, and get the status of your authentication.", "long_about": "Login, logout, and get the status of your authentication.\n\nManage `oxide`'s authentication state.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "login", @@ -99,6 +109,10 @@ { "long": "no-browser", "help": "Print the authentication URL rather than opening a browser window" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -116,18 +130,34 @@ "long": "force", "short": "f", "help": "Skip confirmation prompt" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "status", "about": "Verifies and displays information about your authentication state.", - "long_about": "Verifies and displays information about your authentication state.\n\nThis command validates the authentication state for each profile in the\ncurrent configuration." + "long_about": "Verifies and displays information about your authentication state.\n\nThis command validates the authentication state for each profile in the\ncurrent configuration.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "certificate", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -156,6 +186,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "service", "values": [ @@ -172,6 +206,10 @@ "args": [ { "long": "certificate" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -184,6 +222,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -201,6 +243,10 @@ "args": [ { "long": "certificate" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -211,6 +257,10 @@ "about": "Generate shell completion scripts for Oxide CLI commands.", "long_about": "Generate shell completion scripts for Oxide CLI commands.\n\nThis command generates scripts for various shells that can be used to\nenable completion.\n\n## Installation\n\n### Bash\n\nAdd this to your `~/.bash_profile`:\n\n```sh\neval \"$(oxide completion -s bash)\"\n```\n\n### Zsh\n\nGenerate an `_oxide` completion script and put it somewhere in your\n`$fpath`, for example:\n\n```sh\noxide completion -s zsh > ~/.zfunc/_oxide\n```\n\nand check that you have the following lines in your `~/.zshrc`:\n\n```sh\nautoload -U compinit\ncompinit -i\n```\n\n### Fish\n\nGenerate an `oxide.fish` completion script:\n\n```sh\noxide completion -s fish > ~/.config/fish/completions/oxide.fish\n```\n\n### PowerShell\n\nOpen your profile script with:\n\n```sh\nmkdir -Path (Split-Path -Parent $profile)\nnotepad $profile\n```\n\nAdd the following line and save the file:\n\n```powershell\nInvoke-Expression -Command $(oxide completion -s powershell | Out-String)\n```\n\n### Elvish\n\nGenerate an `oxide.elv` completion script and put it in a module search\ndirectory, for example:\n\n```sh\noxide completion -s elvish > ~/.local/share/elvish/lib/oxide.elv\n```\n\nand import this by adding the following to `~/.config/elvish/rc.elv`\n\n```\nuse oxide\n```", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "shell", "short": "s", @@ -227,6 +277,12 @@ }, { "name": "current-user", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "groups", @@ -236,6 +292,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -246,6 +306,12 @@ }, { "name": "ssh-key", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -266,6 +332,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "public-key", "help": "SSH public key, e.g., `\"ssh-ed25519 AAAAC3NzaC...\"`" @@ -277,6 +347,10 @@ "about": "Delete SSH public key", "long_about": "Delete an SSH public key associated with the currently authenticated user.", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "ssh-key", "help": "Name or ID of the SSH key" @@ -292,6 +366,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -307,6 +385,10 @@ "about": "Fetch SSH public key", "long_about": "Fetch SSH public key associated with the currently authenticated user.", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "ssh-key", "help": "Name or ID of the SSH key" @@ -317,12 +399,24 @@ }, { "name": "view", - "about": "Fetch user for current session" + "about": "Fetch user for current session", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "disk", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -342,6 +436,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -360,6 +458,10 @@ "long": "disk", "help": "Name or ID of the disk" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -411,6 +513,10 @@ "long": "path", "help": "Path to the file to import" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -437,6 +543,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -456,6 +566,10 @@ "long": "disk", "help": "Name or ID of the disk" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -471,6 +585,10 @@ "long": "disk", "help": "Name or ID of the disk" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -499,6 +617,10 @@ { "long": "offset" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -515,6 +637,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -531,6 +657,12 @@ }, { "name": "metrics", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -566,6 +698,10 @@ ], "help": "Query result order" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -586,6 +722,10 @@ "long": "disk", "help": "Name or ID of the disk" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -596,13 +736,31 @@ }, { "name": "docs", - "about": "Generate CLI docs in JSON format" + "about": "Generate CLI docs in JSON format", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "experimental", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "probe", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -625,6 +783,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -642,6 +804,10 @@ "long": "probe", "help": "Name or ID of the probe" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -656,6 +822,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -678,6 +848,10 @@ "long": "probe", "help": "Name or ID of the probe" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -688,6 +862,12 @@ }, { "name": "timeseries", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "dashboard", @@ -697,6 +877,10 @@ "long": "interval", "short": "i", "help": "The interval on which to update the dashboard display, in seconds" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -713,6 +897,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "query", "help": "A timeseries query string, written in the Oximeter query language." @@ -721,6 +909,12 @@ }, { "name": "schema", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -729,6 +923,10 @@ { "long": "limit", "help": "Maximum number of items returned by a single call" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -740,6 +938,12 @@ }, { "name": "floating-ip", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "attach", @@ -769,6 +973,10 @@ "long": "parent", "help": "Name or ID of the resource that this IP address should be attached to" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -801,6 +1009,10 @@ "long": "pool", "help": "The parent IP pool that a floating IP is pulled from. If unset, the default pool is selected." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -815,6 +1027,10 @@ "long": "floating-ip", "help": "Name or ID of the floating IP" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -829,6 +1045,10 @@ "long": "floating-ip", "help": "Name or ID of the floating IP" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -843,6 +1063,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -879,6 +1103,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -893,6 +1121,10 @@ "long": "floating-ip", "help": "Name or ID of the floating IP" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -903,6 +1135,12 @@ }, { "name": "group", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -912,6 +1150,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -924,6 +1166,12 @@ }, { "name": "image", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -948,6 +1196,10 @@ "long": "os", "help": "The family of the operating system (e.g. Debian, Ubuntu, etc.)" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -967,6 +1219,10 @@ "long": "image", "help": "Name or ID of the image" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -982,6 +1238,10 @@ "long": "image", "help": "Name or ID of the image" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -997,6 +1257,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1020,6 +1284,10 @@ "long": "image", "help": "Name or ID of the image" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1035,6 +1303,10 @@ "long": "image", "help": "Name or ID of the image" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1045,6 +1317,12 @@ }, { "name": "instance", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -1073,6 +1351,10 @@ { "long": "ncpus" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1099,6 +1381,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1107,6 +1393,12 @@ }, { "name": "disk", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "attach", @@ -1128,6 +1420,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1154,6 +1450,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1172,6 +1472,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1190,6 +1494,12 @@ }, { "name": "external-ip", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "attach-ephemeral", @@ -1211,6 +1521,10 @@ "long": "pool", "help": "Name or ID of the IP pool used to allocate an address" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1225,6 +1539,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1239,6 +1557,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1275,6 +1597,10 @@ "long": "ncpus", "help": "Instance CPU count" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Project for image and instance" @@ -1297,6 +1623,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1313,6 +1643,12 @@ }, { "name": "nic", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -1340,6 +1676,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `instance` is provided as a `Name`" @@ -1367,6 +1707,10 @@ "long": "interface", "help": "Name or ID of the network interface" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `instance` is provided as a `Name`" @@ -1385,6 +1729,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `instance` is provided as a `Name`" @@ -1433,6 +1781,10 @@ ], "help": "Make a secondary interface the instance's primary interface.\n\nIf applied to a secondary interface, that interface will become the primary on the next reboot of the instance. Note that this may have implications for routing between instances, as the new primary interface will be on a distinct subnet from the previous primary interface.\n\nNote that this can only be used to select a new primary interface for an instance. Requests to change the primary interface into a secondary will return an error." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `instance` is provided as a `Name`" @@ -1451,6 +1803,10 @@ "long": "interface", "help": "Name or ID of the network interface" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `instance` is provided as a `Name`" @@ -1467,6 +1823,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1476,6 +1836,12 @@ { "name": "serial", "about": "Connect to or retrieve data from the instance's serial console.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "console", @@ -1501,6 +1867,10 @@ "short": "m", "help": "The number of bytes from the most recent output to retrieve as context before connecting to the interactive session directly" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "short": "p", @@ -1538,6 +1908,10 @@ "short": "m", "help": "Maximum number of bytes of buffered serial console contents to return. If the requested range (starting at --byte-offset) runs to the end of the available buffer, the data returned will be shorter (and if --json is provided, the actual final offset will be provided)" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "short": "p", @@ -1549,6 +1923,12 @@ }, { "name": "ssh-key", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -1563,6 +1943,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1587,6 +1971,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1601,6 +1989,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1615,6 +2007,10 @@ "long": "instance", "help": "Name or ID of the instance" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -1625,6 +2021,12 @@ }, { "name": "ip-pool", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -1643,6 +2045,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1653,6 +2059,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1664,6 +2074,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -1676,6 +2090,12 @@ }, { "name": "range", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -1699,6 +2119,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1714,6 +2138,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1738,6 +2166,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -1745,9 +2177,21 @@ }, { "name": "service", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "range", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -1767,6 +2211,10 @@ }, { "long": "last" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1778,6 +2226,10 @@ { "long": "limit", "help": "Maximum number of items returned by a single call" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -1800,17 +2252,33 @@ }, { "long": "last" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "view", - "about": "Fetch Oxide service IP pool" + "about": "Fetch Oxide service IP pool", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "silo", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "link", @@ -1837,6 +2305,10 @@ "long": "pool", "help": "Name or ID of the IP pool" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo" } @@ -1854,6 +2326,10 @@ "long": "pool", "help": "Name or ID of the IP pool" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -1870,6 +2346,10 @@ { "long": "pool" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo" } @@ -1899,6 +2379,10 @@ { "long": "pool" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo" } @@ -1927,6 +2411,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1937,6 +2425,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -1947,6 +2439,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -1955,10 +2451,22 @@ { "name": "ping", "about": "Ping API", - "long_about": "Always responds with Ok if it responds at all." + "long_about": "Always responds with Ok if it responds at all.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -1971,17 +2479,33 @@ { "long": "json-body-template", "help": "XXX" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "view", - "about": "Fetch current silo's IAM policy" + "about": "Fetch current silo's IAM policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "project", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -2000,6 +2524,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -2007,6 +2535,10 @@ "name": "delete", "about": "Delete project", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2015,6 +2547,12 @@ }, { "name": "ip-pool", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2024,6 +2562,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2041,6 +2583,10 @@ { "long": "pool", "help": "Name or ID of the IP pool" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -2054,6 +2600,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2066,6 +2616,12 @@ }, { "name": "policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -2079,6 +2635,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2089,6 +2649,10 @@ "name": "view", "about": "Fetch project's IAM policy", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2115,6 +2679,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2125,6 +2693,10 @@ "name": "view", "about": "Fetch project", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2135,6 +2707,12 @@ }, { "name": "silo", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -2171,6 +2749,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -2179,6 +2761,10 @@ "about": "Delete a silo", "long_about": "Delete a silo by name or ID.", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2187,6 +2773,12 @@ }, { "name": "idp", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2196,6 +2788,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2212,9 +2808,21 @@ }, { "name": "local", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "user", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -2233,6 +2841,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2243,6 +2855,10 @@ "name": "delete", "about": "Delete user", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2266,6 +2882,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2282,6 +2902,12 @@ }, { "name": "saml", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -2319,6 +2945,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2341,6 +2971,10 @@ "name": "view", "about": "Fetch SAML IdP", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "provider", "help": "Name or ID of the SAML identity provider" @@ -2357,6 +2991,12 @@ }, { "name": "ip-pool", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2367,6 +3007,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2392,6 +3036,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2404,6 +3052,12 @@ }, { "name": "policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -2417,6 +3071,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2427,6 +3085,10 @@ "name": "view", "about": "Fetch silo IAM policy", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2437,6 +3099,12 @@ }, { "name": "quotas", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2446,6 +3114,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2475,6 +3147,10 @@ "long": "memory", "help": "The amount of RAM (in bytes) available for running instances in the Silo" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2489,6 +3165,10 @@ "name": "view", "about": "Fetch resource quotas for silo", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2499,6 +3179,12 @@ }, { "name": "user", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2508,6 +3194,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2524,6 +3214,10 @@ "name": "view", "about": "Fetch built-in (system) user", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2538,6 +3232,12 @@ }, { "name": "utilization", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2547,6 +3247,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2561,6 +3265,10 @@ "name": "view", "about": "Fetch current utilization for given silo", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2574,6 +3282,10 @@ "about": "Fetch silo", "long_about": "Fetch silo by name or ID.", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "silo", "help": "Name or ID of the silo" @@ -2584,6 +3296,12 @@ }, { "name": "snapshot", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -2608,6 +3326,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2618,6 +3340,10 @@ "name": "delete", "about": "Delete snapshot", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2636,6 +3362,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2654,6 +3384,10 @@ "name": "view", "about": "Fetch snapshot", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -2668,12 +3402,30 @@ }, { "name": "system", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "hardware", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "disk", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2683,6 +3435,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2698,6 +3454,10 @@ { "long": "disk-id", "help": "ID of the physical disk" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -2705,6 +3465,12 @@ }, { "name": "rack", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2714,6 +3480,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2726,6 +3496,10 @@ "name": "view", "about": "Fetch rack", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "The rack's unique ID." @@ -2736,6 +3510,12 @@ }, { "name": "sled", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -2752,6 +3532,10 @@ { "long": "part" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "serial" } @@ -2765,6 +3549,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sled-id", "help": "ID of the sled" @@ -2785,6 +3573,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sled-id", "help": "ID of the sled" @@ -2805,6 +3597,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2820,6 +3616,10 @@ { "long": "limit", "help": "Maximum number of items returned by a single call" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -2835,6 +3635,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sled-id", "help": "ID of the sled" @@ -2853,6 +3657,10 @@ "name": "view", "about": "Fetch sled", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sled-id", "help": "ID of the sled" @@ -2863,6 +3671,12 @@ }, { "name": "switch", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -2872,6 +3686,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2884,6 +3702,10 @@ "name": "view", "about": "Fetch switch", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "switch-id", "help": "ID of the switch" @@ -2894,6 +3716,12 @@ }, { "name": "switch-port", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "apply-settings", @@ -2915,6 +3743,10 @@ "long": "port-settings", "help": "A name or id to use when applying switch port settings." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "A rack id to use when selecting switch ports." @@ -2933,6 +3765,10 @@ "long": "port", "help": "A name to use when selecting switch ports." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "A rack id to use when selecting switch ports." @@ -2951,6 +3787,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -2965,7 +3805,13 @@ }, { "name": "show-status", - "about": "Get the status of switch ports." + "about": "Get the status of switch ports.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "status", @@ -2975,6 +3821,10 @@ "long": "port", "help": "A name to use when selecting switch ports." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "A rack id to use when selecting switch ports." @@ -2991,10 +3841,22 @@ }, { "name": "networking", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "addr", "about": "Manage switch port addresses.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -3046,6 +3908,10 @@ ], "help": "Port to add the port to" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to add the address to" @@ -3110,6 +3976,10 @@ ], "help": "Port to remove the address from" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to remove the address from" @@ -3128,9 +3998,21 @@ }, { "name": "address-lot", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "block", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -3144,6 +4026,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -3179,6 +4065,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -3189,6 +4079,10 @@ { "long": "address-lot", "help": "Name or ID of the address lot" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -3200,6 +4094,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -3214,6 +4112,12 @@ }, { "name": "allow-list", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -3232,17 +4136,33 @@ { "long": "json-body-template", "help": "XXX" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "view", - "about": "Get user-facing services IP allowlist" + "about": "Get user-facing services IP allowlist", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "bfd", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "disable", @@ -3256,6 +4176,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "remote", "help": "Address of the remote peer to disable a BFD session for." @@ -3294,6 +4218,10 @@ ], "help": "Select either single-hop (RFC 5881) or multi-hop (RFC 5883)" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "remote", "help": "Address of the remote peer to establish a BFD session with." @@ -3310,12 +4238,24 @@ }, { "name": "status", - "about": "Get BFD status" + "about": "Get BFD status", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] }, { "name": "bgp", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "announce", @@ -3336,11 +4276,21 @@ { "long": "prefix", "help": "The prefix to announce" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "announce-set", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "delete", @@ -3349,6 +4299,10 @@ { "long": "name-or-id", "help": "A name or id to use when selecting BGP port settings" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -3359,6 +4313,10 @@ { "long": "name-or-id", "help": "A name or id to use when selecting BGP port settings" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -3380,6 +4338,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -3387,6 +4349,12 @@ }, { "name": "config", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -3413,6 +4381,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "vrf", "help": "Optional virtual routing and forwarding identifier for this BGP configuration." @@ -3426,6 +4398,10 @@ { "long": "name-or-id", "help": "A name or id to use when selecting BGP config." + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -3441,6 +4417,10 @@ "long": "name-or-id", "help": "A name or id to use when selecting BGP config." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -3516,6 +4496,10 @@ ], "help": "Port to add the port to" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to add the address to" @@ -3537,11 +4521,21 @@ { "long": "asn", "help": "The ASN to filter on. Required." + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "imported", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "ipv4", @@ -3550,6 +4544,10 @@ { "long": "asn", "help": "The ASN to filter on. Required." + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -3559,6 +4557,12 @@ "name": "peer", "about": "Manage BGP peers.", "long_about": "Manage BGP peers.\n\nThis command provides add and delete subcommands for managing BGP peers.\nBGP peer configuration is a part of a switch port settings configuration.\nThe peer add and remove subcommands perform read-modify-write operations\non switch port settings objects to manage BGP peer configurations.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -3662,6 +4666,10 @@ ], "help": "Port to add the peer to" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to add the peer to" @@ -3730,6 +4738,10 @@ ], "help": "Port to remove the peer from" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to remove the peer from" @@ -3749,11 +4761,23 @@ { "name": "show-status", "about": "Get the status of BGP on the rack.", - "long_about": "Get the status of BGP on the rack.\n\nThis will show the peering status for all peers on all switches." + "long_about": "Get the status of BGP on the rack.\n\nThis will show the peering status for all peers on all switches.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "status", - "about": "Get BGP peer status" + "about": "Get BGP peer status", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "withdraw", @@ -3767,6 +4791,10 @@ { "long": "prefix", "help": "The prefix to withdraw" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -3776,6 +4804,12 @@ "name": "link", "about": "Manage switch port links.", "long_about": "Manage switch port links.\n\nLinks carry layer-2 Ethernet properties for a lane or set of lanes on a\nswitch port. Lane geometry is defined in physical port settings. At the\npresent time only single lane configurations are supported, and thus only\na single link per physical port is supported.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "add", @@ -3831,6 +4865,10 @@ ], "help": "Port to add the link to" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to add the link to" @@ -3891,6 +4929,10 @@ ], "help": "Port to remove the link from" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack", "help": "Id of the rack to remove the link from" @@ -3909,6 +4951,12 @@ }, { "name": "loopback-address", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -3942,6 +4990,10 @@ "long": "mask", "help": "The subnet mask to use for the address." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "The containing the switch this loopback address will be configured on." @@ -3960,6 +5012,10 @@ "long": "address", "help": "The IP address and subnet mask to use when selecting the loopback address." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "rack-id", "help": "The rack to use when selecting the loopback address." @@ -3982,6 +5038,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -3994,6 +5054,12 @@ }, { "name": "switch-port-settings", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -4012,6 +5078,10 @@ }, { "long": "name" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -4022,6 +5092,10 @@ { "long": "port-settings", "help": "An optional name or id to use when selecting port settings." + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, @@ -4037,6 +5111,10 @@ "long": "port-settings", "help": "An optional name or id to use when selecting port settings." }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -4049,7 +5127,13 @@ }, { "name": "show", - "about": "Get the configuration of switch ports." + "about": "Get the configuration of switch ports.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "view", @@ -4058,6 +5142,10 @@ { "long": "port", "help": "A name or id to use when selecting switch port settings info objects." + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] } @@ -4067,6 +5155,12 @@ }, { "name": "policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -4079,12 +5173,22 @@ { "long": "json-body-template", "help": "XXX" + }, + { + "long": "profile", + "help": "Configuration profile to use for commands" } ] }, { "name": "view", - "about": "Fetch top-level IAM policy" + "about": "Fetch top-level IAM policy", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] } ] } @@ -4092,6 +5196,12 @@ }, { "name": "user", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -4104,6 +5214,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "sort-by", "values": [ @@ -4116,14 +5230,32 @@ }, { "name": "utilization", - "about": "Fetch resource utilization for user's current silo" + "about": "Fetch resource utilization for user's current silo", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "version", - "about": "Prints version information about the CLI." + "about": "Prints version information about the CLI.", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ] }, { "name": "vpc", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -4150,6 +5282,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -4160,6 +5296,10 @@ "name": "delete", "about": "Delete VPC", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -4172,6 +5312,12 @@ }, { "name": "firewall-rules", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "update", @@ -4186,6 +5332,10 @@ "long": "json-body-template", "help": "XXX" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4200,6 +5350,10 @@ "name": "view", "about": "List firewall rules", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4220,6 +5374,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -4236,6 +5394,12 @@ }, { "name": "router", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -4255,6 +5419,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4269,6 +5437,10 @@ "name": "delete", "about": "Delete router", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4291,6 +5463,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4311,6 +5487,12 @@ }, { "name": "route", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -4330,6 +5512,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4348,6 +5534,10 @@ "name": "delete", "about": "Delete route", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4375,6 +5565,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4415,6 +5609,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4437,6 +5635,10 @@ "name": "view", "about": "Fetch route", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4475,6 +5677,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4493,6 +5699,10 @@ "name": "view", "about": "Fetch router", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4511,6 +5721,12 @@ }, { "name": "subnet", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "create", @@ -4542,6 +5758,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4556,6 +5776,10 @@ "name": "delete", "about": "Delete subnet", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4578,6 +5802,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4598,6 +5826,12 @@ }, { "name": "nic", + "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + } + ], "subcommands": [ { "name": "list", @@ -4607,6 +5841,10 @@ "long": "limit", "help": "Maximum number of items returned by a single call" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4653,6 +5891,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4671,6 +5913,10 @@ "name": "view", "about": "Fetch subnet", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project, only required if `vpc` is provided as a `Name`" @@ -4708,6 +5954,10 @@ { "long": "name" }, + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" @@ -4722,6 +5972,10 @@ "name": "view", "about": "Fetch VPC", "args": [ + { + "long": "profile", + "help": "Configuration profile to use for commands" + }, { "long": "project", "help": "Name or ID of the project" diff --git a/cli/src/cli_builder.rs b/cli/src/cli_builder.rs index 5a979530..e5f77b58 100644 --- a/cli/src/cli_builder.rs +++ b/cli/src/cli_builder.rs @@ -27,7 +27,7 @@ struct OxideCli { pub debug: bool, /// Configuration profile to use for commands - #[clap(long)] + #[clap(long, global = true)] pub profile: Option, /// Directory to use for configuration