commit | 63ce82e3fdd4721f89daf975d51e70610f47e3a1 | [log] [tgz] |
---|---|---|
author | Scott Baker <smbaker@gmail.com> | Wed May 15 09:01:42 2019 -0700 |
committer | Scott Baker <smbaker@gmail.com> | Wed May 15 11:03:33 2019 -0700 |
tree | af7ee5720b08188cd00c3e47f470a1611f331a26 | |
parent | 6cf525aa945510281e449387d9a4640ec99bb9d8 [diff] |
SEBA-580 Add bash completion; Add Git Dirty to version; Add config comamnd Change-Id: I847dc309a41d74d80e427106bcc839b8db3f9a2c
cordctl
is a command-line tool for interacting with XOS. XOS is part of the SEBA NEM and part of CORD, so by extension this tool is useful for interacting with SEBA and CORD deployments. cordctl
makes use of gRPC to connect to XOS and may by used for administration of a remote pod, assuming the appropriate firewall rules are configured. Typically XOS exposes its gRPC API on port 30011
.
Typically a configuration file should be placed at ~/.cord/config
as cordctl
will automatically look in that location. Alternatively, the -c
command-line option may be used to specify a different config file location. Below is a sample config file:
server: 10.201.101.33:30011 username: admin@opencord.org password: letmein grpc: timeout: 10s
The server
, username
, and password
parameters are essential to configure access to the XOS container running on your pod.
The -h
option can be used at multiple levels to get help, for example:
# Show help for global options ./cordctl -h # Show help for model-related commands ./cordctl model -h # Show help for the model list command ./cordctl model list -h
cordctl
supports shell completion for the bash
shell. To enable shell Completion you can use the following command on most *nix based system.
source <(cordctl completion bash)
If this does not work on your system, as is the case with the standard bash shell on MacOS, then you can try the following command:
source /dev/stdin <<<"$(cordctl completion bash)"
If you which to make bash
shell completion automatic when you login to your account you can append the output of cordctl completion bash
to your $HOME/.bashrc
:
cordctl completion bash >> $HOME/.bashrc
To run unit tests, go-junit-report
and gocover-obertura
tools must be installed. One way to do this is to install them with go get
, and then ensure your GOPATH
is part of your PATH
(editing your ~/.profile
as necessary).
go get -u github.com/jstemmer/go-junit-report go get -u github.com/t-yuki/gocover-cobertura