diff --git a/docs/api-status.json b/docs/api-status.json index f1cd7eabc..ac9ee656a 100644 --- a/docs/api-status.json +++ b/docs/api-status.json @@ -1828,75 +1828,75 @@ "comment": "MigrationStatus retrieve status of a live migration\nfor the specified image.\n\nImplements:\n\n\tint rbd_migration_status(rados_ioctx_t ioctx,\n\t const char *image_name,\n\t rbd_image_migration_status_t *status,\n\t size_t status_size);\n", "added_in_version": "v0.20.0", "became_stable_version": "v0.22.0" - } - ], - "preview_api": [ + }, { "name": "SiteMirrorImageStatus.UnmarshalDescriptionJSON", "comment": "UnmarshalDescriptionJSON parses an embedded JSON string that may be found in\nthe description of the SiteMirrorImageStatus. It will store the result in\nthe value pointed to by v. If no embedded JSON string is found an\nErrNotExist error is returned. An error may also be returned if the contents\ncan not be parsed.\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "SiteMirrorImageStatus.DescriptionReplayStatus", "comment": "DescriptionReplayStatus parses a MirrorDescriptionReplayStatus result out of\nthe image status description field if available. If the embedded status JSON\nis not found or fails to parse and error will be returned.\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "AddMirrorPeerSite", - "comment": "AddMirrorPeerSite adds a peer site to the list of existing sites.\n", + "comment": "AddMirrorPeerSite adds a peer site to the list of existing sites\n\nImplements:\n\n\tint rbd_mirror_peer_site_add(rados_ioctx_t p, char *uuid, size_t uuid_max_length,\n\t\t\t\t\t\t\t\t rbd_mirror_peer_direction_t direction,\n\t\t\t\t\t\t\t\t const char *site_name,\n\t\t\t\t\t\t\t\t const char *client_name);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "RemoveMirrorPeerSite", - "comment": "RemoveMirrorPeerSite removes the site with the provided uuid.\n", + "comment": "RemoveMirrorPeerSite removes the site with the provided uuid\n\nImplements:\n\n\tint rbd_mirror_peer_site_remove(rados_ioctx_t p, const char *uuid)\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "GetAttributesMirrorPeerSite", - "comment": "GetAttributesMirrorPeerSite fetches the list of key,value pair of attributes of a peer site.\n", + "comment": "GetAttributesMirrorPeerSite fetches the list of key,value pair of attributes of a peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_get_attributes(rados_ioctx_t p, const char *uuid, char *keys,\n\t\t\t\t\t\t\t\t\t\t\tsize_t *max_key_len, char *values, size_t *max_val_len,\n\t\t\t\t\t\t\t\t\t\t\tsize_t *key_value_count);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "SetAttributesMirrorPeerSite", - "comment": "SetAttributesMirrorPeerSite sets the attributes for the site with the given uuid.\n", + "comment": "SetAttributesMirrorPeerSite sets the attributes for the site with the given uuid\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_attributes(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t\tconst char *keys, const char *values,\n\t\t\t\t\t\t\t\t\t\t\tsize_t count) ;\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "ListMirrorPeerSite", - "comment": "ListMirrorPeerSite returns the list of peer sites.\n", + "comment": "ListMirrorPeerSite returns the list of peer sites\n\nImplements:\n\n\tint rbd_mirror_peer_site_list(rados_ioctx_t p, rbd_mirror_peer_site_t *peers, int *max_peers)\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "SetMirrorPeerSiteClientName", - "comment": "SetMirrorPeerSiteClientName sets the client name of a mirror peer site.\n", + "comment": "SetMirrorPeerSiteClientName sets the client name for a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_client_name(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t\t const char *client_name);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { - "name": "SetMirrorPeerSiteName", - "comment": "SetMirrorPeerSiteName sets the site name of a mirror peer site.\n", + "name": "SetMirrorPeerSiteDirection", + "comment": "SetMirrorPeerSiteDirection sets the direction of a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_direction(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t\t rbd_mirror_peer_direction_t direction);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { - "name": "SetMirrorPeerSiteDirection", - "comment": "SetMirrorPeerSiteDirection sets the direction of a mirror peer site.\n", + "name": "SetMirrorPeerSiteName", + "comment": "SetMirrorPeerSiteName sets the name of a mirror peer site\n\nImplements:\n\n\tint rbd_mirror_peer_site_set_name(rados_ioctx_t p, const char *uuid,\n\t\t\t\t\t\t\t\t\t const char *site_name);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" + "became_stable_version": "v0.23.0" }, { "name": "Image.SparsifyWithProgress", "comment": "SparsifyWithProgress makes an image sparse by deallocating runs of zeros.\nThe sparseSize value will be used to find runs of zeros and must be\na power of two no less than 4096 and no larger than the image size.\nThe given progress callback will be called to report on the progress\nof sparse. The operation will be aborted if the progress callback returns\na non-zero value.\n\nImplements:\n\n\tint rbd_sparsify_with_progress(rbd_image_t image, size_t sparse_size,\n\t\t\t\t\t\t\t\t librbd_progress_fn_t cb, void *cbdata);\n", "added_in_version": "v0.21.0", - "expected_stable_version": "v0.23.0" - }, + "became_stable_version": "v0.23.0" + } + ], + "preview_api": [ { "name": "Image.LockAcquire", "comment": "LockAcquire takes a lock on the given image as per the provided lock_mode.\n\nImplements:\n\n\tint rbd_lock_acquire(rbd_image_t image, rbd_lock_mode_t lock_mode);\n", diff --git a/docs/api-status.md b/docs/api-status.md index 9703770e7..f9528b6f5 100644 --- a/docs/api-status.md +++ b/docs/api-status.md @@ -31,17 +31,6 @@ No Preview/Deprecated APIs found. All APIs are considered stable. Name | Added in Version | Expected Stable Version | ---- | ---------------- | ----------------------- | -SiteMirrorImageStatus.UnmarshalDescriptionJSON | v0.21.0 | v0.23.0 | -SiteMirrorImageStatus.DescriptionReplayStatus | v0.21.0 | v0.23.0 | -AddMirrorPeerSite | v0.21.0 | v0.23.0 | -RemoveMirrorPeerSite | v0.21.0 | v0.23.0 | -GetAttributesMirrorPeerSite | v0.21.0 | v0.23.0 | -SetAttributesMirrorPeerSite | v0.21.0 | v0.23.0 | -ListMirrorPeerSite | v0.21.0 | v0.23.0 | -SetMirrorPeerSiteClientName | v0.21.0 | v0.23.0 | -SetMirrorPeerSiteName | v0.21.0 | v0.23.0 | -SetMirrorPeerSiteDirection | v0.21.0 | v0.23.0 | -Image.SparsifyWithProgress | v0.21.0 | v0.23.0 | Image.LockAcquire | v0.22.0 | v0.24.0 | Image.LockBreak | v0.22.0 | v0.24.0 | Image.LockGetOwners | v0.22.0 | v0.24.0 | diff --git a/rbd/mirror_desc_status.go b/rbd/mirror_desc_status.go index 94b1b1d93..58bd4b390 100644 --- a/rbd/mirror_desc_status.go +++ b/rbd/mirror_desc_status.go @@ -1,5 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview +//go:build !nautilus +// +build !nautilus package rbd @@ -61,7 +61,8 @@ func (s *SiteMirrorImageStatus) UnmarshalDescriptionJSON(v interface{}) error { // the image status description field if available. If the embedded status JSON // is not found or fails to parse and error will be returned. func (s *SiteMirrorImageStatus) DescriptionReplayStatus() ( - *MirrorDescriptionReplayStatus, error) { + *MirrorDescriptionReplayStatus, error, +) { // --- mdrs := MirrorDescriptionReplayStatus{} if err := s.UnmarshalDescriptionJSON(&mdrs); err != nil { diff --git a/rbd/mirror_desc_status_test.go b/rbd/mirror_desc_status_test.go index f14262860..0ebbcbd13 100644 --- a/rbd/mirror_desc_status_test.go +++ b/rbd/mirror_desc_status_test.go @@ -1,8 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview - -// IMPORTANT - when removing ceph_preview from this file also delete -// rbd/mirror_stub_test.go as it will no longer serve a purpose. +//go:build !nautilus +// +build !nautilus package rbd diff --git a/rbd/mirror_peer_site.go b/rbd/mirror_peer_site.go index 05b08111d..6fa44a5ec 100644 --- a/rbd/mirror_peer_site.go +++ b/rbd/mirror_peer_site.go @@ -1,5 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview +//go:build !nautilus +// +build !nautilus package rbd @@ -26,8 +26,8 @@ import ( // const char *site_name, // const char *client_name); func AddMirrorPeerSite(ioctx *rados.IOContext, siteName string, clientName string, - direction MirrorPeerDirection) (string, error) { - + direction MirrorPeerDirection, +) (string, error) { var ( err error buf []byte @@ -78,7 +78,6 @@ func RemoveMirrorPeerSite(ioctx *rados.IOContext, uuid string) error { // size_t *max_key_len, char *values, size_t *max_val_len, // size_t *key_value_count); func GetAttributesMirrorPeerSite(ioctx *rados.IOContext, uuid string) (map[string]string, error) { - var ( err error keys []byte diff --git a/rbd/mirror_peer_site_test.go b/rbd/mirror_peer_site_test.go index 788c4681d..79dfc9c7e 100644 --- a/rbd/mirror_peer_site_test.go +++ b/rbd/mirror_peer_site_test.go @@ -1,5 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview +//go:build !nautilus +// +build !nautilus package rbd diff --git a/rbd/mirror_stub_test.go b/rbd/mirror_stub_test.go deleted file mode 100644 index 6a4633cc2..000000000 --- a/rbd/mirror_stub_test.go +++ /dev/null @@ -1,14 +0,0 @@ -//go:build !nautilus && !ceph_preview -// +build !nautilus,!ceph_preview - -package rbd - -import ( - "testing" -) - -// testDescriptionReplayStatus is a stub function that exists only to be -// compiled as a near no-op on non ceph_preview builds. -func testDescriptionReplayStatus(t *testing.T, _ SiteMirrorImageStatus) { - t.Log("not testing DescriptionReplayStatus") -} diff --git a/rbd/sparsify.go b/rbd/sparsify.go index 7ed6082b1..e46ca0d78 100644 --- a/rbd/sparsify.go +++ b/rbd/sparsify.go @@ -1,5 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview +//go:build !nautilus +// +build !nautilus package rbd @@ -56,7 +56,8 @@ type sparsifyCallbackCtx struct { // int rbd_sparsify_with_progress(rbd_image_t image, size_t sparse_size, // librbd_progress_fn_t cb, void *cbdata); func (image *Image) SparsifyWithProgress( - sparseSize uint, cb SparsifyCallback, data interface{}) error { + sparseSize uint, cb SparsifyCallback, data interface{}, +) error { // the provided callback must be a real function if cb == nil { return rbdError(C.EINVAL) @@ -80,8 +81,8 @@ func (image *Image) SparsifyWithProgress( //export sparsifyCallback func sparsifyCallback( - offset, total C.uint64_t, index uintptr) C.int { - + offset, total C.uint64_t, index uintptr, +) C.int { v := sparsifyCallbacks.Lookup(index) ctx := v.(sparsifyCallbackCtx) return C.int(ctx.callback(uint64(offset), uint64(total), ctx.data)) diff --git a/rbd/sparsify_test.go b/rbd/sparsify_test.go index b7ec54580..bc79dc438 100644 --- a/rbd/sparsify_test.go +++ b/rbd/sparsify_test.go @@ -1,5 +1,5 @@ -//go:build !nautilus && ceph_preview -// +build !nautilus,ceph_preview +//go:build !nautilus +// +build !nautilus package rbd