cloudstack-cloudmonkey.git
12 days agofix: reuse cmk's CLI params to call piped cmd (#114) main
Claudio Netto [Tue, 20 Sep 2022 06:27:56 +0000 (03:27 -0300)] 
fix: reuse cmk's CLI params to call piped cmd (#114)

11 months agoadmin: update version to next milestone v6.3.0
Rohit Yadav [Wed, 27 Oct 2021 11:49:31 +0000 (17:19 +0530)] 
admin: update version to next milestone v6.3.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
11 months agoAdd arm64 build (#108)
Marcus Sorensen [Tue, 26 Oct 2021 18:06:44 +0000 (12:06 -0600)] 
Add arm64 build (#108)

Signed-off-by: Marcus Sorensen <mls@apple.com>
Co-authored-by: Marcus Sorensen <mls@apple.com>
11 months agoFixed csv output (#106) (#107)
Petr Novák [Thu, 14 Oct 2021 11:34:39 +0000 (13:34 +0200)] 
Fixed csv output (#106) (#107)

csv output processed by Writer from encoder/csv

11 months agoFixed typo. (#101)
Sina Kashipazha [Tue, 5 Oct 2021 11:38:11 +0000 (13:38 +0200)] 
Fixed typo. (#101)

11 months agoPrevent incorrect timeout value from being set (#103)
Pearl Dsilva [Tue, 5 Oct 2021 11:37:51 +0000 (17:07 +0530)] 
Prevent incorrect timeout value from being set (#103)

12 months agocmk: fix formating using gofmt 6.2.0
Rohit Yadav [Wed, 22 Sep 2021 10:38:57 +0000 (16:08 +0530)] 
cmk: fix formating using gofmt

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
12 months agoUpdate CHANGES.md - 6.2.0 changes (#97)
Pearl Dsilva [Tue, 21 Sep 2021 12:04:32 +0000 (17:34 +0530)] 
Update CHANGES.md - 6.2.0 changes (#97)

12 months agoshow meaningful metadata for id autocompletion in some cases (#96)
Abhishek Kumar [Tue, 21 Sep 2021 06:38:27 +0000 (12:08 +0530)] 
show meaningful metadata for id autocompletion in some cases (#96)

* show hypervisor,version for listhypervisorcapabilities autocompletion

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
* fix for listGuestOsMappings

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
13 months agoDisplay output in human readable format (#95)
Pearl Dsilva [Tue, 31 Aug 2021 05:38:08 +0000 (11:08 +0530)] 
Display output in human readable format (#95)

13 months agoMake auto completion optional (#91)
Pearl Dsilva [Mon, 9 Aug 2021 10:47:56 +0000 (16:17 +0530)] 
Make auto completion optional (#91)

* Make auto completion optional

* default autocompletion to true in absense of config

13 months agoFix mapping of default output type to json (#93)
Pearl Dsilva [Mon, 9 Aug 2021 10:46:43 +0000 (16:16 +0530)] 
Fix mapping of default output type to json (#93)

13 months agoValidate user access to config file IF it exists (#88)
Pearl Dsilva [Mon, 9 Aug 2021 06:59:59 +0000 (12:29 +0530)] 
Validate user access to config file IF it exists (#88)

13 months agoChange version references to 6.2.0 (#89)
Pearl Dsilva [Mon, 9 Aug 2021 06:59:32 +0000 (12:29 +0530)] 
Change version references to 6.2.0 (#89)

* Fix cmk version

* Validate user access to config file IF it exists

13 months agoAvoids adding newline to list/map output data for output format other than 'text...
Pearl Dsilva [Tue, 3 Aug 2021 07:36:58 +0000 (13:06 +0530)] 
Avoids adding newline to list/map output data for output format other than 'text' (#87)

13 months agoPrint map in readable format when display format is set to text (#86)
Pearl Dsilva [Tue, 3 Aug 2021 07:07:02 +0000 (12:37 +0530)] 
Print map in readable format when display format is set to text (#86)

13 months agoUpdate README.md
Rohit Yadav [Tue, 3 Aug 2021 05:41:50 +0000 (11:11 +0530)] 
Update README.md

Travis .org domain moved to .com

13 months agoPrevent ACS commands starting with sync to get redirected to API discovery (#82)
Pearl Dsilva [Tue, 3 Aug 2021 05:34:59 +0000 (11:04 +0530)] 
Prevent ACS commands starting with sync to get redirected to API discovery (#82)

* Prevent ACS commands starting with sync to get redirected to API discovery

* change check

13 months agoVerify user access to config file (#80)
Pearl Dsilva [Tue, 3 Aug 2021 05:34:27 +0000 (11:04 +0530)] 
Verify user access to config file (#80)

13 months agoValidate args passed - fail fast in case of invalid args (#79)
Pearl Dsilva [Tue, 3 Aug 2021 05:33:50 +0000 (11:03 +0530)] 
Validate args passed - fail fast in case of invalid args (#79)

16 months agoInclusivity changes for CloudStack - Renamed default git branch name from 'master...
sureshanaparti [Thu, 13 May 2021 08:48:46 +0000 (14:18 +0530)] 
Inclusivity changes for CloudStack - Renamed default git branch name from 'master' to 'main' and some offensive words/terms as appropriate. (#76)

18 months agoAdded new option to change default cmk config file. (#70)
Sina Kashipazha [Thu, 18 Mar 2021 10:21:02 +0000 (11:21 +0100)] 
Added new option to change default cmk config file. (#70)

Cloudmonkey command lets us use a different config file rather than the default one. This pull request added the same functionality to the cmk command.

     cmk -c ./my-config

2 years agosnap: snapcraft update
Rohit Yadav [Wed, 29 Jul 2020 06:09:26 +0000 (11:39 +0530)] 
snap: snapcraft update

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agoREADME: add docker badge 6.1.0
Rohit Yadav [Thu, 18 Jun 2020 07:16:53 +0000 (12:46 +0530)] 
README: add docker badge

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agochanges: update changelog, bump version for next release v6.1.0
Rohit Yadav [Thu, 18 Jun 2020 07:12:13 +0000 (12:42 +0530)] 
changes: update changelog, bump version for next release v6.1.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agocmd: don't sort header when filter keys are specified
Rohit Yadav [Thu, 18 Jun 2020 06:14:33 +0000 (11:44 +0530)] 
cmd: don't sort header when filter keys are specified

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agooutput: display key in filtered output for csv, column and table
Rohit Yadav [Thu, 18 Jun 2020 05:37:03 +0000 (11:07 +0530)] 
output: display key in filtered output for csv, column and table

Fixes #63

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agoconfig: allow web-proxy support
Rohit Yadav [Thu, 18 Jun 2020 05:06:46 +0000 (10:36 +0530)] 
config: allow web-proxy support

Now any of the following env variables may be exported before using
cmk with any http/https proxy:

export http_proxy='http://user:password@server:3128'
export https_proxy='http://user:password@server:3128'
export HTTP_PROXY='http://user:password@server:3128'
export HTTPS_PROXY='http://user:password@server:3128'

Or, run cmk like following:

HTTP_PROXY="http://IP:port" cmk

Fixes #49

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
2 years agoMakefile: Statically building the binary to not depend on gcc compiler (#59)
Khosrow Moossavi [Wed, 17 Jun 2020 02:57:58 +0000 (22:57 -0400)] 
Makefile: Statically building the binary to not depend on gcc compiler (#59)

This is to statically build the cmk binary. It means it doesn't depend on gcc being present to work. The use case is that the cmk binary without this won't work in any alpine docker image.

2 years agoUpdate CHANGES.md
Rohit Yadav [Mon, 2 Mar 2020 09:14:35 +0000 (14:44 +0530)] 
Update CHANGES.md

2 years agocmk: add Dockerfile
Rohit Yadav [Thu, 24 Oct 2019 10:29:29 +0000 (15:59 +0530)] 
cmk: add Dockerfile

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agooutput: jsonify when value is slice or map
Rohit Yadav [Mon, 19 Aug 2019 06:09:54 +0000 (11:39 +0530)] 
output: jsonify when value is slice or map

Fixes #46 - output value as json when the value of key/row is slice or
map for nested structures.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agotravis: fix module enable
Rohit Yadav [Wed, 10 Jul 2019 17:40:34 +0000 (23:10 +0530)] 
travis: fix module enable

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agotravis: enable go v1.12
Rohit Yadav [Tue, 25 Jun 2019 11:22:08 +0000 (16:52 +0530)] 
travis: enable go v1.12

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agocompleter: on hostid autocompletion use type=Routing
Rohit Yadav [Tue, 25 Jun 2019 10:04:08 +0000 (15:34 +0530)] 
completer: on hostid autocompletion use type=Routing

This fixes the issue that hostid autocompletion only shows Routing
resources (hypervisor hosts) except for the provisionCertificate API.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agocmd: fix bug around required params check
Rohit Yadav [Thu, 20 Jun 2019 09:53:48 +0000 (15:23 +0530)] 
cmd: fix bug around required params check

This fixes issue for map type of required parameters as seen in the
createTags API where previously an API request would fail when
tags[0].<something> was passed.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agosnapcraft fixes
Rohit Yadav [Sat, 6 Apr 2019 16:59:44 +0000 (22:29 +0530)] 
snapcraft fixes

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agosnapcraft: update with customised go binary building
Rohit Yadav [Sat, 6 Apr 2019 16:34:12 +0000 (22:04 +0530)] 
snapcraft: update with customised go binary building

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoMakefile: split the dist to dist-linux
Rohit Yadav [Sat, 6 Apr 2019 16:03:55 +0000 (21:33 +0530)] 
Makefile: split the dist to dist-linux

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agosnapcraft badge
Rohit Yadav [Sat, 6 Apr 2019 00:12:10 +0000 (05:42 +0530)] 
snapcraft badge

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agosnapcraft file
Rohit Yadav [Fri, 5 Apr 2019 23:03:10 +0000 (04:33 +0530)] 
snapcraft file

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoperformrelease: emit sha512 based checksum file
Rohit Yadav [Tue, 26 Mar 2019 08:07:19 +0000 (13:37 +0530)] 
performrelease: emit sha512 based checksum file

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agocmd: remove `paramcompletion` option which is shipped enabled by default
Rohit Yadav [Thu, 14 Mar 2019 07:54:48 +0000 (13:24 +0530)] 
cmd: remove `paramcompletion` option which is shipped enabled by default

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoconfig: bump version to next 6.1.0-alpha
Rohit Yadav [Thu, 14 Mar 2019 07:54:01 +0000 (13:24 +0530)] 
config: bump version to next 6.1.0-alpha

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoconfig: Fix prompt to use the same profile name as loaded
Rohit Yadav [Wed, 13 Mar 2019 09:54:23 +0000 (15:24 +0530)] 
config: Fix prompt to use the same profile name as loaded

When -p <profilename> is passed via cmd line, cloudmonkey indeed uses
the correctly passed profile name but in shell/interactive mode it
does not print it correctly.

Fixes #47

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoabout: bump version to 6.0.0 6.0.0
Rohit Yadav [Tue, 5 Mar 2019 11:56:48 +0000 (17:26 +0530)] 
about: bump version to 6.0.0

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agocli: fix auto-completion bug
Rohit Yadav [Tue, 5 Mar 2019 11:17:21 +0000 (16:47 +0530)] 
cli: fix auto-completion bug

Refactors the logic that finds the auto-completion API.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agonetwork: get content from file when arg=@/path is provided (#43)
Rohit Yadav [Tue, 5 Mar 2019 09:47:56 +0000 (15:17 +0530)] 
network: get content from file when arg=@/path is provided (#43)

This adds feature similar to `curl` where you can pass content of a file
via the `arg=@/path/to/file` syntax. This can be useful while uploading
custom certificate via cloudmonkey.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoconfig: add help docs for `set` commands (#40)
Rohit Yadav [Tue, 5 Mar 2019 09:19:54 +0000 (14:49 +0530)] 
config: add help docs for `set` commands (#40)

This fixes #40, adds human readable docs for set commands and prints
error when an invalid command is added.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoconfig: Implement per profile based api cache (#39)
Rohit Yadav [Tue, 5 Mar 2019 08:48:18 +0000 (14:18 +0530)] 
config: Implement per profile based api cache (#39)

This fixes #39 and implements logic to have separate api cache on per
profile basis. On changing server profile, user won't need to run
sync, any previously sync-ed cache will be re-used.

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoMakefile: emit builds for various platforms and architectures
Rohit Yadav [Tue, 29 Jan 2019 06:42:13 +0000 (12:12 +0530)] 
Makefile: emit builds for various platforms and architectures

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agovendor: fix issue in readline option selector
Rohit Yadav [Tue, 29 Jan 2019 06:14:30 +0000 (11:44 +0530)] 
vendor: fix issue in readline option selector

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agoMakefile: emit build for arm32 (raspberrypi)
Rohit Yadav [Tue, 29 Jan 2019 06:14:09 +0000 (11:44 +0530)] 
Makefile: emit build for arm32 (raspberrypi)

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: in case of no possible arg values, return empty string
Rohit Yadav [Mon, 31 Dec 2018 13:07:41 +0000 (18:37 +0530)] 
cli: in case of no possible arg values, return empty string

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: reimplement CLI completer using chzyer/readline (#38)
Rohit Yadav [Sat, 29 Dec 2018 22:23:37 +0000 (03:53 +0530)] 
cli: reimplement CLI completer using chzyer/readline (#38)

This moves the prompt implementation back to chzyer/readline with the following changes:
- Use a `tab-tab` and `enter` based approach similar to zsh
- Use readline based selector that removes option values in parenthesis
- Removes old go-prompt implementation and manual history utils
- Heuristics based API arg completion when there is no obvious API by arg name
- Better autocompletion for API args and its response key filter args

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: debug cmdline args input comma separated for readability
Rohit Yadav [Sat, 15 Dec 2018 21:48:52 +0000 (03:18 +0530)] 
cmk: debug cmdline args input comma separated for readability

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agohistory: ignore duplicate and empty inputs for shell history
Rohit Yadav [Sat, 15 Dec 2018 21:48:11 +0000 (03:18 +0530)] 
history: ignore duplicate and empty inputs for shell history

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agooutput: Fix json output to not do html escape
Rohit Yadav [Sat, 15 Dec 2018 20:52:03 +0000 (02:22 +0530)] 
output: Fix json output to not do html escape

Also updates dependencies using `go mod vendor`.

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agovendor: update dependencies
Rohit Yadav [Sat, 15 Dec 2018 20:50:47 +0000 (02:20 +0530)] 
vendor: update dependencies

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoconfig: Fixes #35 fix panic due to inappropriate config loading
Rohit Yadav [Fri, 7 Dec 2018 21:50:38 +0000 (03:20 +0530)] 
config: Fixes #35 fix panic due to inappropriate config loading

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
3 years agoREADME: fix golang version
Rohit Yadav [Wed, 5 Dec 2018 11:09:10 +0000 (16:39 +0530)] 
README: fix golang version

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agonetwork: remove nested quotes in parameters
Rohit Yadav [Mon, 3 Dec 2018 11:51:07 +0000 (17:21 +0530)] 
network: remove nested quotes in parameters

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: use cyan as selected colour, don't bolden the input
Rohit Yadav [Sat, 1 Dec 2018 18:16:04 +0000 (23:46 +0530)] 
cli: use cyan as selected colour, don't bolden the input

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agovendor: update vendoring dependencies
Rohit Yadav [Sat, 1 Dec 2018 17:51:59 +0000 (23:21 +0530)] 
vendor: update vendoring dependencies

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agonetwork: fix segfault
Rohit Yadav [Fri, 30 Nov 2018 19:35:57 +0000 (01:05 +0530)] 
network: fix segfault

Fixes segfault issue when response is invalid (nil).

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: add git sha and build timestamp from makefile
Rohit Yadav [Fri, 30 Nov 2018 19:18:29 +0000 (00:48 +0530)] 
cmk: add git sha and build timestamp from makefile

With this change `cmk -v` will output git sha and build timestamp.

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agoconfig: bump internal version to 6.0.0-beta2
Rohit Yadav [Fri, 30 Nov 2018 18:58:42 +0000 (00:28 +0530)] 
config: bump internal version to 6.0.0-beta2

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: only show autocompletion options when tab is pressed
Rohit Yadav [Fri, 30 Nov 2018 18:53:49 +0000 (00:23 +0530)] 
cli: only show autocompletion options when tab is pressed

This adds constraint that the autocompletion options are only shown
when tab is pressed.

Fixes #31.

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: allow parameter completion to be disables
Rohit Yadav [Fri, 30 Nov 2018 18:21:54 +0000 (23:51 +0530)] 
cli: allow parameter completion to be disables

This adds the `paramcompletion` setting from python based cloudmonkey
to allow disabling of go-prompt based parameter completion logic.
This also ensure that when cursor is moved back completion won't be
shown to minimize distraction.

Fixes #32

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agoconfig: add debuggability using -d flag
Rohit Yadav [Fri, 30 Nov 2018 18:20:34 +0000 (23:50 +0530)] 
config: add debuggability using -d flag

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agoconfig: create home configdir if not exist (#30)
Pierre-Luc Dion [Fri, 30 Nov 2018 02:37:29 +0000 (21:37 -0500)] 
config: create home configdir if not exist (#30)

Fixes #29

3 years agocli: implement heuristics based completer as a fallback
Rohit Yadav [Thu, 25 Oct 2018 06:09:37 +0000 (11:39 +0530)] 
cli: implement heuristics based completer as a fallback

This implements a API heuristics based options API arg completer based
on the related API name for an arg, or if a list API exists whose name
contains the arg name.

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: implement file lock for config read/write
Rohit Yadav [Sun, 21 Oct 2018 19:15:58 +0000 (00:45 +0530)] 
cmk: implement file lock for config read/write

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: implement command line flags support and usage doc
Rohit Yadav [Sun, 21 Oct 2018 19:15:20 +0000 (00:45 +0530)] 
cmk: implement command line flags support and usage doc

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: implement command line history support
Rohit Yadav [Sun, 21 Oct 2018 19:14:46 +0000 (00:44 +0530)] 
cli: implement command line history support

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocli: fix pipe based output in shell
Rohit Yadav [Sun, 21 Oct 2018 19:14:14 +0000 (00:44 +0530)] 
cli: fix pipe based output in shell

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: shlex input, new columnar output, refactorings
Rohit Yadav [Sun, 21 Oct 2018 19:13:11 +0000 (00:43 +0530)] 
cmk: shlex input, new columnar output, refactorings

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agotravis: fix build go mod vendor
Rohit Yadav [Sun, 21 Oct 2018 02:26:34 +0000 (07:56 +0530)] 
travis: fix build go mod vendor

This updates by adding changes in vendor from `go mod vendor` and
explicitly enables Go 1.11.1 modules.

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: rewrite CLI using go-prompt
Rohit Yadav [Sat, 20 Oct 2018 23:44:26 +0000 (05:14 +0530)] 
cmk: rewrite CLI using go-prompt

- Remove readline/prompt-ui based implementation
- Simplify autocompletion logic
- Migrate to go mod
- Update all dependencies

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agoMakefile: use -mod=vendor to build using vendor
Rohit Yadav [Sat, 20 Oct 2018 18:50:35 +0000 (00:20 +0530)] 
Makefile: use -mod=vendor to build using vendor

3 years agocmk: disable search bar by default on tab-tab completion
Rohit Yadav [Sat, 20 Oct 2018 04:25:05 +0000 (09:55 +0530)] 
cmk: disable search bar by default on tab-tab completion

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agovendor: update dependencies
Rohit Yadav [Sat, 20 Oct 2018 04:19:27 +0000 (09:49 +0530)] 
vendor: update dependencies

Signed-off-by: Rohit Yadav <rohit@apache.org>
3 years agocmk: switch to go mod
Rohit Yadav [Fri, 19 Oct 2018 18:02:30 +0000 (23:32 +0530)] 
cmk: switch to go mod

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agonetwork: fix variable name to fix lint error
Rohit Yadav [Tue, 18 Sep 2018 11:21:26 +0000 (16:51 +0530)] 
network: fix variable name to fix lint error

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agonetwork: handle login session management and expiry
Rohit Yadav [Tue, 21 Aug 2018 19:42:15 +0000 (01:12 +0530)] 
network: handle login session management and expiry

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agonetwork: Fixes #24 split args to API in two parts
Rohit Yadav [Thu, 16 Aug 2018 08:23:05 +0000 (13:53 +0530)] 
network: Fixes #24 split args to API in two parts

This fixes issue of passing args which has `=` like:
update configuration name=ldap.basedn value="ou=People,dc=ldap,dc=corp,dc=company,dc=com"

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agooutput: fix lint issue to fix build failures
Rohit Yadav [Mon, 2 Jul 2018 07:56:30 +0000 (13:26 +0530)] 
output: fix lint issue to fix build failures

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agooutput: implement and refactor json, csv, table, text outputs
Rohit Yadav [Tue, 26 Jun 2018 11:11:26 +0000 (16:41 +0530)] 
output: implement and refactor json, csv, table, text outputs

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agocmk: rename references to `cmk` and update README
Rohit Yadav [Tue, 26 Jun 2018 09:08:46 +0000 (14:38 +0530)] 
cmk: rename references to `cmk` and update README

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agoconfig: fix lint issue and travis failures
Rohit Yadav [Tue, 26 Jun 2018 08:56:02 +0000 (14:26 +0530)] 
config: fix lint issue and travis failures

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agonetwork: expire cookie jar based on initial log-in cookies
Rohit Yadav [Mon, 25 Jun 2018 18:47:16 +0000 (00:17 +0530)] 
network: expire cookie jar based on initial log-in cookies

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agoconfig: several refactorings and interactive fixes
Rohit Yadav [Mon, 25 Jun 2018 18:10:29 +0000 (23:40 +0530)] 
config: several refactorings and interactive fixes

This also enables log in attempt and reuse of http client once a user
successfully logs in. This speeds up the CLI experience when username
and password credentials are used instead of api/secret keys.

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agocmd: handle errors well, throw non-zero exit code on error
Rohit Yadav [Mon, 25 Jun 2018 10:48:06 +0000 (16:18 +0530)] 
cmd: handle errors well, throw non-zero exit code on error

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agoMakefile: Fix gopath in command (#21)
dahn [Sat, 23 Jun 2018 19:17:35 +0000 (21:17 +0200)] 
Makefile: Fix gopath in command (#21)

Fixes build failures in some environments.

4 years agonetwork: Fix glint error
Rohit Yadav [Sat, 23 Jun 2018 19:12:24 +0000 (00:42 +0530)] 
network: Fix glint error

Rename to jobID

4 years agoconfig: add inbuilt API precache
Rohit Yadav [Sat, 23 Jun 2018 15:59:33 +0000 (21:29 +0530)] 
config: add inbuilt API precache

This adds API precache based on 4.11.1 which is used in environments
without any existing API cache.

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agocmd: on async job error, also print job response
Rohit Yadav [Sat, 23 Jun 2018 15:36:27 +0000 (21:06 +0530)] 
cmd: on async job error, also print job response

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agonetwork: implement asyncblock for polling job results
Rohit Yadav [Sat, 23 Jun 2018 15:14:04 +0000 (20:44 +0530)] 
network: implement asyncblock for polling job results

This implements async blocking if config option is enabled by polling
the async job id and showing a cursor.

Add vendor dependency: briandowns/spinner

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agoconfig: enable asyncblock by default, fix double space
Rohit Yadav [Sat, 23 Jun 2018 15:11:46 +0000 (20:41 +0530)] 
config: enable asyncblock by default, fix double space

Signed-off-by: Rohit Yadav <rohit@apache.org>
4 years agoconfig: change default prompt to :cat:
Rohit Yadav [Wed, 20 Jun 2018 07:46:28 +0000 (13:16 +0530)] 
config: change default prompt to :cat:

In loving memory of my kitten 'Happy' 🐈,
from henceforth please keep the default prompt to the change introduced
in this commit.

Signed-off-by: Rohit Yadav <rohit@apache.org>