This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
The following commit(s) were added to refs/heads/master by this push:
new 9111c77 completer: on hostid autocompletion use type=Routing
9111c77 is described below
commit 9111c7788439a74b158963fb56685e7a24d163db
Author: Rohit Yadav <[email protected]>
AuthorDate: Tue Jun 25 15:34:08 2019 +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 <[email protected]>
---
cli/completer.go | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cli/completer.go b/cli/completer.go
index da3311c..ce2b7e2 100644
--- a/cli/completer.go
+++ b/cli/completer.go
@@ -360,6 +360,10 @@ func (t *autoCompleter) Do(line []rune, pos int) (options
[][]rune, offset int)
autocompleteAPIArgs =
append(autocompleteAPIArgs, "templatefilter=executable")
}
+ if apiFound.Name != "provisionCertificate" &&
autocompleteAPI.Name == "listHosts" {
+ autocompleteAPIArgs =
append(autocompleteAPIArgs, "type=Routing")
+ }
+
spinner := t.Config.StartSpinner("fetching options,
please wait...")
request := cmd.NewRequest(nil, completer.Config, nil)
response, _ := cmd.NewAPIRequest(request,
autocompleteAPI.Name, autocompleteAPIArgs, false)