Documentation ¶
Index ¶
- func GetMappedRBDs(ctx types.Context) (map[string]string, error)
- func GetRBDStatus(ctx types.Context, pool, image *string) (map[string]interface{}, error)
- func GetRadosPools(ctx types.Context) ([]string, error)
- func GetVolumeID(pool, image *string) *string
- func ParseMonitorAddresses(addrs []string) ([]net.IP, error)
- func RBDCreate(ctx types.Context, pool *string, image *string, sizeGB *int64, ...) error
- func RBDHasWatchers(ctx types.Context, pool *string, image *string) (bool, error)
- func RBDMap(ctx types.Context, pool, image *string) (string, error)
- func RBDRemove(ctx types.Context, pool *string, image *string) error
- func RBDUnmap(ctx types.Context, device *string) error
- func RunCommand(ctx types.Context, cmd *exec.Cmd, ignoreCodes ...int) ([]byte, int, error)
- func StrContainsClient(arg string) bool
- type RBDImage
- type RBDInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMappedRBDs ¶
GetMappedRBDs returns a map of RBDs currently mapped to the *local* host
func GetRBDStatus ¶
GetRBDStatus returns a map of RBD status info
func GetRadosPools ¶
GetRadosPools returns a slice containing all the pool names
func GetVolumeID ¶
GetVolumeID returns an RBD Volume formatted as <pool>.<imageName>
func ParseMonitorAddresses ¶
ParseMonitorAddresses returns a slice of IP address from the given slice of string addresses. Addresses can be IPv4, IPv4:port, [IPv6], or [IPv6]:port
func RBDCreate ¶
func RBDCreate( ctx types.Context, pool *string, image *string, sizeGB *int64, objectSize *string, features []*string) error
RBDCreate creates a new RBD volume on the cluster
func RBDHasWatchers ¶
RBDHasWatchers returns true if RBD image has watchers
func RunCommand ¶
RunCommand run the given command, taking care of proper logging
func StrContainsClient ¶
StrContainsClient search str arg for flags that can set a Ceph client id/name
Types ¶
type RBDImage ¶
type RBDImage struct { Name string `json:"image"` Size int64 `json:"size"` Format uint `json:"format"` Pool string }
RBDImage holds details about an RBD image
type RBDInfo ¶
type RBDInfo struct { Name string `json:"name"` Size int64 `json:"size"` Objects int64 `json:"objects"` Order int64 `json:"order"` ObjectSize int64 `json:"object_size"` BlockNamePrefix string `json:"block_name_prefix"` Format int64 `json:"format"` Features []string `json:"features"` Pool string }
RBDInfo holds low-level details about an RBD image