mirror of https://github.com/ceph/go-ceph
rbd/admin: promote ImageSpec & tasks api to stable
Promoting ImageSpec & task apis to stable so they can be release in v0.13.0. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
b5c4989a88
commit
7d881032a6
|
@ -1590,62 +1590,42 @@
|
|||
{
|
||||
"name": "MirrorSnashotScheduleAdmin.Status",
|
||||
"comment": "Status returns the status of the snapshot (eg. when it will next take place)\nmatching the supplied level spec.\n\nSimilar To:\n rbd mirror snapshot schedule status <level_spec>\n"
|
||||
}
|
||||
],
|
||||
"preview_api": [
|
||||
},
|
||||
{
|
||||
"name": "NewImageSpec",
|
||||
"comment": "NewImageSpec is used to construct an ImageSpec given an image name/id\nand optional namespace and pool names.\nNewImageSpec constructs an ImageSpec to identify an RBD image and thus\nrequires image name/id, whereas NewLevelSpec constructs LevelSpec to\nidentify entire pool, pool namespace or single RBD image, all of which\nrequires pool name.\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "NewImageSpec is used to construct an ImageSpec given an image name/id\nand optional namespace and pool names.\nNewImageSpec constructs an ImageSpec to identify an RBD image and thus\nrequires image name/id, whereas NewLevelSpec constructs LevelSpec to\nidentify entire pool, pool namespace or single RBD image, all of which\nrequires pool name.\n"
|
||||
},
|
||||
{
|
||||
"name": "NewRawImageSpec",
|
||||
"comment": "NewRawImageSpec returns a ImageSpec directly based on the spec string\nargument without constructing it from component values. This should only be\nused if NewImageSpec can not create the imagespec value you want to pass to\nceph.\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "NewRawImageSpec returns a ImageSpec directly based on the spec string\nargument without constructing it from component values. This should only be\nused if NewImageSpec can not create the imagespec value you want to pass to\nceph.\n"
|
||||
},
|
||||
{
|
||||
"name": "RBDAdmin.Task",
|
||||
"comment": "Task returns a TaskAdmin type for\nmanaging ceph rbd task operations.\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "Task returns a TaskAdmin type for\nmanaging ceph rbd task operations.\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.AddFlatten",
|
||||
"comment": "AddFlatten adds a background task to flatten a cloned image based on the supplied image spec.\n\nSimilar To:\n rbd task add flatten <image_spec>\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "AddFlatten adds a background task to flatten a cloned image based on the supplied image spec.\n\nSimilar To:\n rbd task add flatten <image_spec>\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.AddRemove",
|
||||
"comment": "AddRemove adds a background task to remove an image based on the supplied image spec.\n\nSimilar To:\n rbd task add remove <image_spec>\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "AddRemove adds a background task to remove an image based on the supplied image spec.\n\nSimilar To:\n rbd task add remove <image_spec>\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.AddTrashRemove",
|
||||
"comment": "AddTrashRemove adds a background task to remove an image from the trash based on the\nsupplied image id spec.\n\nSimilar To:\n rbd task add trash remove <image_id_spec>\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "AddTrashRemove adds a background task to remove an image from the trash based on the\nsupplied image id spec.\n\nSimilar To:\n rbd task add trash remove <image_id_spec>\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.List",
|
||||
"comment": "List pending or running asynchronous tasks.\n\nSimilar To:\n rbd task list\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "List pending or running asynchronous tasks.\n\nSimilar To:\n rbd task list\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.GetTaskByID",
|
||||
"comment": "GetTaskByID returns pending or running asynchronous task using id.\n\nSimilar To:\n rbd task list <task_id>\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "GetTaskByID returns pending or running asynchronous task using id.\n\nSimilar To:\n rbd task list <task_id>\n"
|
||||
},
|
||||
{
|
||||
"name": "TaskAdmin.Cancel",
|
||||
"comment": "Cancel a pending or running asynchronous task.\n\nSimilar To:\n rbd task cancel <task_id>\nPREVIEW\n",
|
||||
"added_in_version": "v0.12.0",
|
||||
"expected_stable_version": "v0.13.0"
|
||||
"comment": "Cancel a pending or running asynchronous task.\n\nSimilar To:\n rbd task cancel <task_id>\n"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -22,18 +22,6 @@ Snapshot.Set | v0.10.0 | |
|
|||
|
||||
### Preview APIs
|
||||
|
||||
Name | Added in Version | Expected Stable Version |
|
||||
---- | ---------------- | ----------------------- |
|
||||
NewImageSpec | v0.12.0 | v0.13.0 |
|
||||
NewRawImageSpec | v0.12.0 | v0.13.0 |
|
||||
RBDAdmin.Task | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.AddFlatten | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.AddRemove | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.AddTrashRemove | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.List | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.GetTaskByID | v0.12.0 | v0.13.0 |
|
||||
TaskAdmin.Cancel | v0.12.0 | v0.13.0 |
|
||||
|
||||
## Package: rgw/admin
|
||||
|
||||
### Preview APIs
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build !nautilus && ceph_preview
|
||||
// +build !nautilus,ceph_preview
|
||||
//go:build !nautilus
|
||||
// +build !nautilus
|
||||
|
||||
package admin
|
||||
|
||||
|
@ -10,14 +10,12 @@ import (
|
|||
// ImageSpec values are used to identify an RBD image wherever Ceph APIs
|
||||
// require an image_spec/image_id_spec using image name/id and optional
|
||||
// pool and namespace.
|
||||
// PREVIEW
|
||||
type ImageSpec struct {
|
||||
spec string
|
||||
}
|
||||
|
||||
// NewImageSpec is used to construct an ImageSpec given an image name/id
|
||||
// and optional namespace and pool names.
|
||||
// PREVIEW
|
||||
//
|
||||
// NewImageSpec constructs an ImageSpec to identify an RBD image and thus
|
||||
// requires image name/id, whereas NewLevelSpec constructs LevelSpec to
|
||||
|
@ -37,7 +35,6 @@ func NewImageSpec(pool, namespace, image string) ImageSpec {
|
|||
|
||||
// NewRawImageSpec returns a ImageSpec directly based on the spec string
|
||||
// argument without constructing it from component values.
|
||||
// PREVIEW
|
||||
//
|
||||
// This should only be used if NewImageSpec can not create the imagespec value
|
||||
// you want to pass to ceph.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build !nautilus && ceph_preview
|
||||
// +build !nautilus,ceph_preview
|
||||
//go:build !nautilus
|
||||
// +build !nautilus
|
||||
|
||||
package admin
|
||||
|
||||
|
@ -9,19 +9,16 @@ import (
|
|||
)
|
||||
|
||||
// TaskAdmin encapsulates management functions for ceph rbd task operations.
|
||||
// PREVIEW
|
||||
type TaskAdmin struct {
|
||||
conn ccom.MgrCommander
|
||||
}
|
||||
|
||||
// Task returns a TaskAdmin type for managing ceph rbd task operations.
|
||||
// PREVIEW
|
||||
func (ra *RBDAdmin) Task() *TaskAdmin {
|
||||
return &TaskAdmin{conn: ra.conn}
|
||||
}
|
||||
|
||||
// TaskRefs contains the action name and information about the image.
|
||||
// PREVIEW
|
||||
type TaskRefs struct {
|
||||
Action string `json:"action"`
|
||||
PoolName string `json:"pool_name"`
|
||||
|
@ -31,7 +28,6 @@ type TaskRefs struct {
|
|||
}
|
||||
|
||||
// TaskResponse contains the information about the task added on an image.
|
||||
// PREVIEW
|
||||
type TaskResponse struct {
|
||||
Sequence int `json:"sequence"`
|
||||
ID string `json:"id"`
|
||||
|
@ -58,7 +54,6 @@ func parseTaskResponseList(res commands.Response) ([]TaskResponse, error) {
|
|||
|
||||
// AddFlatten adds a background task to flatten a cloned image based on the
|
||||
// supplied image spec.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task add flatten <image_spec>
|
||||
|
@ -73,7 +68,6 @@ func (ta *TaskAdmin) AddFlatten(img ImageSpec) (TaskResponse, error) {
|
|||
|
||||
// AddRemove adds a background task to remove an image based on the supplied
|
||||
// image spec.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task add remove <image_spec>
|
||||
|
@ -88,7 +82,6 @@ func (ta *TaskAdmin) AddRemove(img ImageSpec) (TaskResponse, error) {
|
|||
|
||||
// AddTrashRemove adds a background task to remove an image from the trash based
|
||||
// on the supplied image id spec.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task add trash remove <image_id_spec>
|
||||
|
@ -102,7 +95,6 @@ func (ta *TaskAdmin) AddTrashRemove(img ImageSpec) (TaskResponse, error) {
|
|||
}
|
||||
|
||||
// List pending or running asynchronous tasks.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task list
|
||||
|
@ -115,7 +107,6 @@ func (ta *TaskAdmin) List() ([]TaskResponse, error) {
|
|||
}
|
||||
|
||||
// GetTaskByID returns pending or running asynchronous task using id.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task list <task_id>
|
||||
|
@ -129,7 +120,6 @@ func (ta *TaskAdmin) GetTaskByID(taskID string) (TaskResponse, error) {
|
|||
}
|
||||
|
||||
// Cancel a pending or running asynchronous task.
|
||||
// PREVIEW
|
||||
//
|
||||
// Similar To:
|
||||
// rbd task cancel <task_id>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//go:build !nautilus && ceph_preview
|
||||
// +build !nautilus,ceph_preview
|
||||
//go:build !nautilus
|
||||
// +build !nautilus
|
||||
|
||||
package admin
|
||||
|
||||
|
|
Loading…
Reference in New Issue