Skip to content

Fix generation for UUID type #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 25, 2023

Conversation

vishesh92
Copy link
Member

managementserverid has been added as a parameter in some APIs (listAsyncJobs, readyForShutdown, etc.) in 4.19. Generated output doesn't have the setters for managementserverid field in toURLValues() method.

@vishesh92
Copy link
Member Author

@weizhouapache @rohityadavcloud Please review.

@@ -1291,7 +1291,7 @@ func (s *service) generateConvertCode(cmd, name, typ string) {
pn := s.pn

switch typ {
case "string":
case "string", "UUID":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should it be UUID or uuid?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are explicitly setting it to "UUID" in L2096. As of now the value is UUID only for managementserverid. And uuid is being treated as a string. Changing this to uuid causes a lot of changes at other places and removes some helper functions.
https://github.com/apache/cloudstack-go/pull/60/files#diff-39a24c8d3907e38beb5e39b5f0a40df7aa73c38449615f140ec3fca502900e86L2096

This seems to be there because of this.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great thanks for checking @vishesh92

@rohityadavcloud rohityadavcloud merged commit 1b7c54e into apache:main May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants