Skip to content

Commit

Permalink
xapirpc: move to 0.3.0 and rationalise cli
Browse files Browse the repository at this point in the history
Signed-off-by: Marcello Seri <marcello.seri@citrix.com>
  • Loading branch information
Marcello Seri committed Feb 16, 2018
1 parent 203c844 commit 4489e47
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Marcello Seri"]
name = "xapirpc"
version = "0.2.0"
version = "0.3.0"
homepage = "https://github.com/mseri/xapirpc-rs"
repository = "https://github.com/mseri/xapirpc-rs.git"
readme = "README.md"
Expand Down
17 changes: 12 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,30 @@

Minimal CLI client for xapi rpc calls.
The ouptu is in json, so can be piped to `jq` or other json tools for further filtering.

```
Dummy xapi xmlrpc CLI client 0.1
Marcello S. <marcello.seri@citrix.com>
xapirpc --help
Minimal xapi xmlrpc CLI client
CLI interface to interrogate an instance of XenServer via xmlrpc
USAGE:
xapirpc [OPTIONS] <CLASS> <METHOD> [ARGS]...
xapirpc [FLAGS] [OPTIONS] <CLASS> <METHOD> [ARGS]...
FLAGS:
--compact Output the result as non-prettified json.
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
--host <HOST> XenServer host. Can be passed with the HOST env variable. [env:XAPI_HOST: ]
-p, --pass <PASSWORD> XenServer host user password. Can be passed with the XAPI_PASSWORD env variable.
[env:XAPI_PASSWORD: ]
-u, --user <USER> XenServer host user name. Can be passed with the XAPI_USER env variable. [env:XAPI_USER: ]
ARGS:
<CLASS> Case sensitive value for the xapi class.
<METHOD> Case sensitive value for the xapi method.
<ARGS>... Ordered list of arguments for the call (if any). Do not pass a session.
```

To try it, clone this repository and build with `cargo build --release`
To try it, clone this repository and build with `cargo build --release` or install it using `cargo install xapirpc --force`.
4 changes: 1 addition & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ fn as_json(value: &Value) -> json::Value {
}

fn main() {
let matches = App::new("Dummy xapi xmlrpc CLI client")
.version("0.1")
.author("Marcello S. <marcello.seri@citrix.com>")
let matches = App::new("Minimal xapi xmlrpc CLI client")
.about("CLI interface to interrogate an instance of XenServer via xmlrpc")
.arg(Arg::with_name("host")
.long("host")
Expand Down

0 comments on commit 4489e47

Please sign in to comment.