hsato03 opened a new pull request, #156:
URL: https://github.com/apache/cloudstack-cloudmonkey/pull/156

   Currently, when using autocomplete in the `usagetype` parameter (present in 
APIs such as `quotaPresetVariableList` and `quotaCreateTariff`) the CLI panics.
   
   ```
   $ cmk  
   Apache CloudStack 🐵 CloudMonkey 6.4.0
   Report issues: https://github.com/apache/cloudstack-cloudmonkey/issues
   
   panic: interface conversion: interface {} is float64, not string
   
   goroutine 36 [running]:
   github.com/apache/cloudstack-cloudmonkey/cli.buildArgOptions(0xc000f48000?, 
0x0)
        /Users/rohit/lab/apache/cloudstack-cloudmonkey/cli/completer.go:126 
+0x8c5
   
github.com/apache/cloudstack-cloudmonkey/cli.(*autoCompleter).Do(0xc00004f790, 
{0xc000e9e3f0, 0x0?, 0x24}, 0x24)
        /Users/rohit/lab/apache/cloudstack-cloudmonkey/cli/completer.go:402 
+0x136c
   github.com/chzyer/readline.(*opCompleter).OnComplete(0xc000130ee0)
        
/Users/rohit/lab/apache/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/complete.go:101
 +0x10d
   github.com/chzyer/readline.(*Operation).ioloop(0xc000130e00)
        
/Users/rohit/lab/apache/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/operation.go:180
 +0xc8a
   created by github.com/chzyer/readline.NewOperation in goroutine 1
        
/Users/rohit/lab/apache/cloudstack-cloudmonkey/vendor/github.com/chzyer/readline/operation.go:88
 +0x2d6
   ```
   
   This PR aims to fix this bug and allow users to use the completer for the 
`usagetype` parameter.
   
   ![Screenshot from 2025-01-01 
15-30-09](https://github.com/user-attachments/assets/d44598bb-fd2f-42db-92f1-10209b16c98b)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to