mirror of https://github.com/ceph/go-ceph
rbd: add String method for MirrorImageState
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
741e7d43bd
commit
b614e93b9d
|
@ -207,6 +207,20 @@ const (
|
|||
MirrorImageDisabled = MirrorImageState(C.RBD_MIRROR_IMAGE_DISABLED)
|
||||
)
|
||||
|
||||
// String representation of MirrorImageState.
|
||||
func (mis MirrorImageState) String() string {
|
||||
switch mis {
|
||||
case MirrorImageDisabling:
|
||||
return "disabling"
|
||||
case MirrorImageEnabled:
|
||||
return "enabled"
|
||||
case MirrorImageDisabled:
|
||||
return "disabled"
|
||||
default:
|
||||
return "<unknown>"
|
||||
}
|
||||
}
|
||||
|
||||
// MirrorImageInfo represents the mirroring status information of a RBD image.
|
||||
type MirrorImageInfo struct {
|
||||
GlobalID string
|
||||
|
|
Loading…
Reference in New Issue