ceph / go-ceph

Go bindings for Ceph :octopus: :octopus: :octopus:
MIT License
604 stars 247 forks source link

Missing rbd API components: function rbd_list #1008

Open BadKid90s opened 1 week ago

BadKid90s commented 1 week ago

image

I saw an API for querying the RBD image list in the Ceph source code, but go-ceph did not provide it. Would you consider adding this method? What method should be used to replace the outdated list method tag?

phlogistonjohn commented 1 week ago

https://github.com/ceph/go-ceph/blob/1046b034a1f618f67acd3c6523482917e27c7113/rbd/rbd_nautilus.go#L21-L26

The function GetImageNames is based on the rbd_list2 api. It predates the convention of mentioning the C API name in the doc comment. Please try GetImageNames and see if that meets your needs.

What method should be used to replace the outdated list method tag?

I don't know what you mean by this. If you're referring to the CEPH_RB_DEPRECATED flag in the header. You don't need to worry about it as the api we use is rbd_list2. If you mean something else, please clarify the question.

PS. In the future please copy-paste plain text source code (the ceph header snippet) instead of using a screen shot. It makes it easier to view the message in the email notifications and is searchable by future users.