Skip to content

api: listApis command missing 'tags' field for many responses #3002

@csquire

Description

@csquire
ISSUE TYPE
  • Bug Report
COMPONENT NAME
API
CLOUDSTACK VERSION
4.9.3.0, 4.11.2.0
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

At some point around 4.9, many API command stopped reporting the tags field in their API response fields. For example UserVMResponse and TemplateResponse. I believe this was caused by this commit. After this change ApiDiscoveryService is not getting the tags field from the superclass of the response classes.

The xanzy go-cloudstack client depends on the output of listApis to generate it's Cloudstack client SDK. In later versions of the xanzy cloudstack client, the tags fields are missing from many of the responses. This in turn means that the Terraform Cloudstack Provider (which uses the xanzy client) cannot use a newer version of xanzy go-cloudstack without a breaking change.

I also believe the current version of xanzy go-cloudstack used by the Terraform Cloudstack Provider may be incompatible with Cloudstack 4.11 because of a type change in the Cloudstack API, changing ProjectResponse.secondaryStorageTotal from an int to a float. Following semver, breaking changes like this type change shouldn't be made in minor version updates, but that's a different conversation.

STEPS TO REPRODUCE
Open the following and notice that the listVirtualMachines API does not advertise the `tags` field in the response: 
http://localhost:8080/client/api?command=listApis&response=json&name=listVirtualMachines
EXPECTED RESULTS
The `tags` field should be present.
ACTUAL RESULTS

The tags field is not present.


Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions