Repository: ceph/go-ceph (go)

Issue:
undefined: AllocHintFlags
Trying to build a simple "list images" but getting the following every time I attempt to build it:
`../go/pkg/mod/github.com/ceph/go-ceph@v0.19.0/rados/ioctx_set_alloc_hint.go:24:114: undefined: AllocHintFlags
../go/pkg/mod/github.com/ceph/go-ceph@v0.19.0/rados/write_op_set_alloc_hint.go:19:96: undefined: AllocHintFlags`

What am I doing wrong here? 

Got the latest pacific libraries and trying to build with: `go build -tags pacific`

Here is an example:
```
package main

import (
	"bytes"
	"fmt"
	"io/ioutil"

	"github.com/ceph/go-ceph/rados"
	"github.com/ceph/go-ceph/rbd"
)

var (
	c, _    = rados.NewConnWithUser("admin")
	cephCfg = "/etc/ceph/ceph.conf"
	pools   = []string{"vms", "images"}
)

func getImageList(pool string) {
	conn, err := newRadosConn()
	if err != nil {
		return nil, err
	}
	defer conn.Shutdown()

	ioctx, err := conn.OpenIOContext(pool)
	if err != nil {
		return nil, err
	}
	defer ioCtx.Destroy()

	return rbd.GetImageNames(ioctx)
}

func newRadosConn() (*rados.Conn, error) {
	conn, err := rados.NewConnWithUser(user)
	if err != nil {
		return nil, fmt.Errorf("error creating rados connection: %s", err)
	}

	err = conn.ReadConfigFile(cephCfg)
	if err != nil {
		return nil, fmt.Errorf("error reading config file: %s", err)
	}

	err = conn.Connect()
	if err != nil {
		return nil, fmt.Errorf("error connecting to rados: %s", err)
	}

	return conn, nil
}

func main() {
	for _, pool := range pools {
		imageList, err := getImageList(pool)
		if err != nil {
			fmt.Printf("failed to get %s's image list", pool)
			continue
		}

		for _, image := range imageList {
			fmt.Printf("pool: %s, image: %s ", pool, image)
	}
}
```




Pull request description:
Remove left over `ceph_preview` tags from test related files
These are left overs from [v0.13.0](https://github.com/ceph/go-ceph/releases/tag/v0.13.0), [v0.17.0](https://github.com/ceph/go-ceph/releases/tag/v0.17.0) and [v0.19.0](https://github.com/ceph/go-ceph/releases/tag/v0.19.0) releases where we missed to remove preview tags when following APIs were promoted to stable.

* _API.AddUserCap_ and _API.RemoveUserCap_ in e23ab127c07c0914bbe4f794a28aabf3fee4664f
* _API.LinkBucket_ and _API.UnlinkBucket_ in 9d74c3c2b1a08ad171d14bb78cc59273434030e3
* _IOContext.SetAllocationHint_ in efa832cdd073807010504e7d948c12820b7d832b

Fixes #798 

Patch:
diff --git a/rados/alloc_hint_flags.go b/rados/alloc_hint_flags.go
index dd468da..1fd51cd 100644
--- a/rados/alloc_hint_flags.go
+++ b/rados/alloc_hint_flags.go
@@ -1,6 +1,3 @@
-//go:build ceph_preview
-// +build ceph_preview
-
 package rados
 
 // #cgo LDFLAGS: -lrados


Test patch:
diff --git a/rgw/admin/caps_test.go b/rgw/admin/caps_test.go
index c4b8826..750f42a 100644
--- a/rgw/admin/caps_test.go
+++ b/rgw/admin/caps_test.go
@@ -1,6 +1,3 @@
-//go:build ceph_preview
-// +build ceph_preview
-
 package admin
 
 import (
diff --git a/rgw/admin/link_test.go b/rgw/admin/link_test.go
index fec4967..865f809 100644
--- a/rgw/admin/link_test.go
+++ b/rgw/admin/link_test.go
@@ -1,6 +1,3 @@
-//go:build ceph_preview
-// +build ceph_preview
-
 package admin
 
 import (