pub struct Cli {
pub global_opts: GlobalOpts,
pub command: TopLevelCommands,
}Expand description
OpenStack command line interface.
§Configuration
As all OpenStack tools it fully supports clouds.yaml
§Features
-
osc apias an API wrapper allowing user to perform any direct API call specifying service type, url, method and payload. This can be used for example when certain resource is not currently implemented natively. -
osc authwith subcommands for dealing explicitly with authentication (showing current auth info, renewing auth, MFA/SSO support) -
Every resource is having a service type in the command solving confusions like user groups vs volume groups
-
Every multi-word resource name is “-” separated (i.e. floating-ip, access-rule)
§Output
-
osc ... -o jsonas an explicit machine readable format output. It allows seeing raw resource json representation as send by the API without any processing on the client side.Note: the result is not the raw json response, but the raw json resource information found underneath expected resource key. This mode can be used i.e. to see fields that are not expected by the
oscand allows further easy machine processing with tools likejq -
osc ... -o widefor list operations to return all known fields. By default list operation will only return a subset of known generic resource fields to prevent multiline tables. This mode (together with not specifying-oparameter at all) is considered as an output for humans. Field names are not generally renamed and are names as the API returns them.
§Shell autocompletion
osc supports generation of the completion file for diverse shells. This can be enabled i.e.
by executing
echo 'source <(osc completion bash)' >>~/.bashrcFields§
§global_opts: GlobalOptsGlobal cli arguments and options
command: TopLevelCommandssubcommand
Implementations§
Source§impl Cli
impl Cli
Sourcepub async fn take_action(
&self,
client: &mut AsyncOpenStack,
) -> Result<(), OpenStackCliError>
pub async fn take_action( &self, client: &mut AsyncOpenStack, ) -> Result<(), OpenStackCliError>
Perform command action
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnwindSafe for Cli
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more