You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The internetprotocol parameter of the createVPCOffering API supports the values:
ipv4
dualstack
However, CloudMonkey does not currently provide autocomplete suggestions for these values. When users type:
create vpcoffering internetprotocol=
no suggestions are returned.
Solution
Add enum-based autocomplete support for the internetprotocol parameter in cli/completer.go. The change introduces a small helper to provide enum values and integrates it into the existing autocomplete flow.
After this change, CloudMonkey suggests:
ipv4
dualstack
when completing the internetprotocol parameter.
Testing
Manually verified that:
create vpcoffering internetprotocol=<TAB>
suggests ipv4 and dualstack, and existing autocomplete functionality remains unaffected.
📦 Binary artifacts are available in the workflow run (expires on March 18, 2026).
Note: Download artifacts by clicking on the workflow run link above, then scroll to the "Artifacts" section. Artifacts from PR builds are for testing only and may contain unreviewed, malicious code.
So,This PR introduces a small mechanism to support enum-based
autocomplete and implements it for the internetprotocol
parameter in createVPCOffering.
The same approach can be extended to other parameters that have
well-defined enum values, such as networkmode, routingmode,
and hypervisor, etc
WDYT? @shwstppr
@Imvedansh this could be useful but I feel this is too static a solution.
I would have approached by maybe adding a field in listApis response or even a new API if neeed in CloudStack code.
API response could contain a map field which would have API param name and possible values. While creating API response maybe the response generator can go through parameters which have a non-primitive getter or maybe the param annotation can have flag to identify if it is an enum.
@shwstppr Thanks,I agree dynamic solution would be scalable rather than static mapping,Im going to explore explosing metadata and using it to enhance!!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhancement for
The internetprotocol parameter of the createVPCOffering API supports the values:
However, CloudMonkey does not currently provide autocomplete suggestions for these values. When users type:
create vpcoffering internetprotocol=no suggestions are returned.
Solution
Add enum-based autocomplete support for the internetprotocol parameter in cli/completer.go. The change introduces a small helper to provide enum values and integrates it into the existing autocomplete flow.
After this change, CloudMonkey suggests:

when completing the internetprotocol parameter.
Testing
Manually verified that:
create vpcoffering internetprotocol=<TAB>suggests ipv4 and dualstack, and existing autocomplete functionality remains unaffected.