This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack-cloudmonkey.git
The following commit(s) were added to refs/heads/main by this push:
new b2443dc show meaningful metadata for id autocompletion in some cases
(#96)
b2443dc is described below
commit b2443dc1206bd53708a32dfeaf5437c5c00bef4b
Author: Abhishek Kumar <[email protected]>
AuthorDate: Tue Sep 21 12:08:27 2021 +0530
show meaningful metadata for id autocompletion in some cases (#96)
* show hypervisor,version for listhypervisorcapabilities autocompletion
Signed-off-by: Abhishek Kumar <[email protected]>
* fix for listGuestOsMappings
Signed-off-by: Abhishek Kumar <[email protected]>
---
cli/completer.go | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cli/completer.go b/cli/completer.go
index 650c84b..dee1461 100644
--- a/cli/completer.go
+++ b/cli/completer.go
@@ -129,6 +129,11 @@ func buildArgOptions(response map[string]interface{},
hasID bool) []argOption {
name = resource["name"].(string)
} else if resource["username"] != nil {
name = resource["username"].(string)
+ } else if resource["hypervisor"] != nil &&
resource["hypervisorversion"] != nil {
+ name = fmt.Sprintf("%s %s",
resource["hypervisor"].(string), resource["hypervisorversion"].(string))
+ if resource["osdisplayname"] != nil {
+ name = fmt.Sprintf("%s; %s",
resource["osdisplayname"].(string), name)
+ }
}
if resource["displaytext"] != nil {
detail =
resource["displaytext"].(string)