Skip to content

Commit 9111c77

Browse files
committed
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>
1 parent 365e10e commit 9111c77

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

cli/completer.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
360360
autocompleteAPIArgs = append(autocompleteAPIArgs, "templatefilter=executable")
361361
}
362362

363+
if apiFound.Name != "provisionCertificate" && autocompleteAPI.Name == "listHosts" {
364+
autocompleteAPIArgs = append(autocompleteAPIArgs, "type=Routing")
365+
}
366+
363367
spinner := t.Config.StartSpinner("fetching options, please wait...")
364368
request := cmd.NewRequest(nil, completer.Config, nil)
365369
response, _ := cmd.NewAPIRequest(request, autocompleteAPI.Name, autocompleteAPIArgs, false)

0 commit comments

Comments
 (0)