Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 74698cd

Browse filesBrowse files
authored
Fix autocompletion for API arguments (#133)
* Fix autocompletion for migrateSystemVms * Fix createNetwork associatednetworkid param autocompletion
1 parent 7c4dd34 commit 74698cd
Copy full SHA for 74698cd

1 file changed

+4Lines changed: 4 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎cli/completer.go‎

Copy file name to clipboardExpand all lines: cli/completer.go
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,8 @@ func findAutocompleteAPI(arg *config.APIArg, apiFound *config.API, apiMap map[st
219219
relatedNoun = "publicipaddresses"
220220
case argName == "storageid":
221221
relatedNoun = "storagepools"
222+
case argName == "associatednetworkid":
223+
relatedNoun = "networks"
222224
default:
223225
// Heuristic: autocomplete for the arg for which a list<Arg without id/ids>s API exists
224226
// For example, for zoneid arg, listZones API exists
@@ -387,6 +389,8 @@ func (t *autoCompleter) Do(line []rune, pos int) (options [][]rune, offset int)
387389

388390
if apiFound.Name != "provisionCertificate" && autocompleteAPI.Name == "listHosts" {
389391
autocompleteAPIArgs = append(autocompleteAPIArgs, "type=Routing")
392+
} else if apiFound.Name == "migrateSystemVm" {
393+
autocompleteAPI.Name = "listSystemVms"
390394
}
391395

392396
spinner := t.Config.StartSpinner("fetching options, please wait...")

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.