storage

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package storage documents the request and response payloads for the Storage Manager portion of the sifi API.

Index

Constants

View Source
const (
	PathPrefix = "storage"
	HostPath   = "host"
	OSDPath    = "osd"
	PoolPath   = "pool"
	SharePath  = "share"
)

Root path for API endpoint.

Variables

This section is empty.

Functions

func FlagTypeEnumStrings

func FlagTypeEnumStrings() []string

FlagTypeEnumStrings returns a slice of all String values of the enum

func IscsiExportableTypeEnumStrings

func IscsiExportableTypeEnumStrings() []string

IscsiExportableTypeEnumStrings returns a slice of all String values of the enum

func NetworkConnStatusEnumStrings

func NetworkConnStatusEnumStrings() []string

NetworkConnStatusEnumStrings returns a slice of all String values of the enum

func NodeStatusEnumStrings

func NodeStatusEnumStrings() []string

NodeStatusEnumStrings returns a slice of all String values of the enum

func OsdClassEnumStrings

func OsdClassEnumStrings() []string

OsdClassEnumStrings returns a slice of all String values of the enum

func OsdStateEnumStrings

func OsdStateEnumStrings() []string

OsdStateEnumStrings returns a slice of all String values of the enum

func ShareTypeEnumStrings

func ShareTypeEnumStrings() []string

ShareTypeEnumStrings returns a slice of all String values of the enum

Types

type BcacheInfo

type BcacheInfo struct {
	Cache      []DiskOrPartitionRef `json:"caches"`
	CapacityMB uint64               `json:"capacity_MB"`
	Mountpoint string               `json:"mountpoint"`
	Path       string               `json:"path"`
	Storage    []DiskOrPartitionRef `json:"stores"`
	Usage      string               `json:"usage"`
	UsedBy     []OsdRef             `json:"used_by"`
}

BcacheInfo is the information we can get for a single bcache device.

type CaddyInfo

type CaddyInfo struct {
	ID  int `json:"id"`
	Rev int `json:"revision"`
}

CaddyInfo is the information for a single caddy.

type CephAlert

type CephAlert struct {
	Severity string `json:"severity" enums:"HEALTH_OK,HEALTH_WARN,HEALTH_ERROR"`
	Message  string `json:"message"`
}

CephAlert is a single alert message from Ceph.

type CephFlag

type CephFlag struct {
	Name        string       `json:"name"`   // The name of the flag
	IsSet       bool         `json:"is_set"` // True if this flag has been set, false otherwise
	Type        FlagTypeEnum `json:"type" swaggertype:"string" enums:"PRIORITY,EXPECTED,INFORMATIONAL"`
	Description string       `json:"description"`
}

CephFlag is a single Ceph status flag, eg NO_OUT.

type DiskInfo

type DiskInfo struct {
	Boot            bool                     `json:"boot"` // True if this disk is the boot disk for the node
	CaddyNo         uint                     `json:"caddy_no"`
	CaddyType       string                   `json:"caddy_type"`
	LocationInCaddy uint                     `json:"location_in_caddy"`
	CapacityMB      uint64                   `json:"capacity_MB"` // The max capacity of the disk, in MB.
	ID              string                   `json:"id"`          // The disk opaque identifier
	Name            string                   `json:"name"`        // A human-readable nice name for the disk
	NodeID          string                   `json:"node_id"`     // The ID of the node this disk is inside
	NodeModel       string                   `json:"node_model"`  // The model of the node this disk is inside
	NodeName        string                   `json:"node_name"`   // The name of the node this disk is inside
	Number          uint                     `json:"number"`
	Osds            []OsdRef                 `json:"osds"`       // A list of the OSDs associated with this disk
	Partitions      []PartitionInfo          `json:"partitions"` // A list of partitions
	Path            string                   `json:"path"`       // The path to the disk device
	Sata            string                   `json:"sata"`
	SerialNo        string                   `json:"serial_no"` // This disk's serial number
	SmartPassed     bool                     `json:"smart_passed"`
	SmartMessage    string                   `json:"smart_message"`
	SmartStatus     uint                     `json:"smart_status"`
	MediaType       string                   `json:"type"`
	TemperatureC    uint                     `json:"temperature_C"`
	Usage           string                   `json:"usage"`
	VolumeGroups    []PartialVolumeGroupInfo `json:"volume_groups"`
	Wwn             string                   `json:"wwn"` // A unique ID for this disk
}

DiskInfo is the information for a single disk.

type DiskOrPartitionRef

type DiskOrPartitionRef struct {
	DiskID         string `json:"disk_id"`
	PartitionIndex uint   `json:"partition_index"`
}

DiskOrPartitionRef is the disks and partitions used by a bcache device.

type DiskSummary

type DiskSummary struct {
	CapacityMB  uint64 `json:"capacity_MB"` // The max capacity of the disk, in MB
	ID          string `json:"id"`          // The disk opaque identifier
	Name        string `json:"name"`        // A human-readable nice name for the disk
	Path        string `json:"path"`        // The path to the disk device
	MediaType   string `json:"type"`
	SmartPassed bool   `json:"smart_passed"`
	Usage       string `json:"usage"`
}

DiskSummary is the information for a single disk.

type FanInfo

type FanInfo struct {
	ID       int  `json:"id"`
	Reserved bool `json:"reserved"` // True if this fan is in reserved mode
	Speed    int  `json:"speed"`    // Current speed fan is running at, in RPM.
}

FanInfo is the information for a single fan.

type FlagTypeEnum

type FlagTypeEnum int

FlagTypeEnum is the type for Ceph flag types.

const (
	FlagTypePriority      FlagTypeEnum = iota // PRIORITY
	FlagTypeExpected                          // EXPECTED
	FlagTypeInformational                     // INFORMATIONAL
)

Ceph flag type.

func FlagTypeEnumString

func FlagTypeEnumString(s string) (FlagTypeEnum, error)

FlagTypeEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func FlagTypeEnumValues

func FlagTypeEnumValues() []FlagTypeEnum

FlagTypeEnumValues returns all values of the enum

func (FlagTypeEnum) IsAFlagTypeEnum

func (i FlagTypeEnum) IsAFlagTypeEnum() bool

IsAFlagTypeEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (FlagTypeEnum) MarshalText

func (i FlagTypeEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for FlagTypeEnum

func (FlagTypeEnum) String

func (i FlagTypeEnum) String() string

func (*FlagTypeEnum) UnmarshalText

func (i *FlagTypeEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for FlagTypeEnum

type IscsiExportableTypeEnum

type IscsiExportableTypeEnum int

IscsiExportableTypeEnum is the type for RBD iSCSI exportable types.

const (
	IscsiExportableTypeAvailable IscsiExportableTypeEnum = iota // AVAILABLE
	IscsiExportableTypeExported                                 // EXPORTED
	IscsiExportableTypeInvalid                                  // INVALID_OPTIONS
)

RBD iSCSI exportable type.

func IscsiExportableTypeEnumString

func IscsiExportableTypeEnumString(s string) (IscsiExportableTypeEnum, error)

IscsiExportableTypeEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func IscsiExportableTypeEnumValues

func IscsiExportableTypeEnumValues() []IscsiExportableTypeEnum

IscsiExportableTypeEnumValues returns all values of the enum

func (IscsiExportableTypeEnum) IsAIscsiExportableTypeEnum

func (i IscsiExportableTypeEnum) IsAIscsiExportableTypeEnum() bool

IsAIscsiExportableTypeEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (IscsiExportableTypeEnum) MarshalText

func (i IscsiExportableTypeEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for IscsiExportableTypeEnum

func (IscsiExportableTypeEnum) String

func (i IscsiExportableTypeEnum) String() string

func (*IscsiExportableTypeEnum) UnmarshalText

func (i *IscsiExportableTypeEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for IscsiExportableTypeEnum

type ListDisksResponse

type ListDisksResponse struct {
	Disks []DiskInfo `json:"disks"`
}

ListDisksResponse is the response body for GET /storage/disk.

type ListHostDiskResponse

type ListHostDiskResponse struct {
	Disk DiskInfo `json:"disk"`
}

ListHostDiskResponse is the response body for GET /storage/host/{id}/disk/{id}.

type ListHostDisksResponse

type ListHostDisksResponse struct {
	Disks []DiskInfo `json:"disks"`
}

ListHostDisksResponse is the response body for GET /storage/host/{id}/disk.

type ListHostResponse

type ListHostResponse struct {
	Alerts          []string           `json:"alerts"`          // A list of alerts firing for this node
	Asset           string             `json:"asset,omitempty"` // User defined asset tag for the node
	BaseboardID     int                `json:"baseboard_id"`
	BaseboardRev    int                `json:"baseboard_rev"`
	Bcaches         []BcacheInfo       `json:"bcaches"`
	BootDisk        *DiskSummary       `json:"boot_disk,omitempty"`
	CaddyIDs        map[uint]CaddyInfo `json:"caddy_ids"`
	CaddyInfo       bool               `json:"caddy_info"`
	Capabilities    []string           `json:"capabilities"` // The capabilities this node has
	CephFips        bool               `json:"ceph_fips"`
	CephMajor       string             `json:"ceph_major"`
	CephVersion     string             `json:"ceph_version"`
	ChassisType     string             `json:"chassis_type"` // This node's chassis type
	Disks           []DiskInfo         `json:"disks"`
	Fans            []FanInfo          `json:"fans"`
	FirmwareBmc     string             `json:"firmware_bmc,omitempty"` // The version of the firmware this node's BMC is running
	FirmwareSoc     string             `json:"firmware_soc,omitempty"` // The version of the firmware this node's SoC is running
	ID              string             `json:"id"`                     // A unique ID for the node
	IdentifyLed     bool               `json:"identify_led"`           // True if this node's identify LED is on
	InCluster       bool               `json:"in_cluster"`             // True if this node is in a Ceph cluster
	IPAddress       string             `json:"ip_address"`             // The public IP address of this node
	LastSeen        int64              `json:"last_seen,omitempty"`    // The last time we saw this node up (Unix time)
	MainboardID     int                `json:"mainboard_id"`
	MainboardRev    int                `json:"mainboard_rev"`
	MemoryGB        uint               `json:"memory_GB,omitempty"` // The amount of RAM this node has, in GB
	Model           string             `json:"model,omitempty"`     // This node's model
	Name            string             `json:"name"`                // The node's name
	DNSIP           []string           `json:"dns"`                 // The network's DNS resolvers
	Ntp             []string           `json:"time_server"`         // The location of the network's NTP time servers
	Networks        NetInterfacesInfo  `json:"networks"`
	Nic1ID          int                `json:"nic_id_1"`
	Nic1Rev         int                `json:"nic_rev_1"`
	Nic2ID          int                `json:"nic_id_2"`
	Nic2Rev         int                `json:"nic_rev_2"`
	OperatingSystem string             `json:"operating_system,omitempty"`
	OsVersion       string             `json:"os_version"`
	OsdCount        uint               `json:"osd_count"`
	PendingChange   bool               `json:"pending_change"`
	PowerW          uint               `json:"power_W,omitempty"` // The average power draw of this node, in watts
	Roles           []string           `json:"roles"`             // The roles this node has been given
	SerialNo        string             `json:"serial_no"`         // This node's serial number
	Status          NodeStatusEnum     ``                         // The node status
	/* 135-byte string literal not displayed */
	StorageTotalMB            uint64            `json:"storage_total_MB"`            // Amount of storage this node has
	StorageUsedMB             uint64            `json:"storage_used_MB"`             // Amount of this node's storage that is being used
	StorageUtilizationPercent uint              `json:"storage_utilization_percent"` // The percentage of this node's storage that is being used
	TemperatureC              uint              `json:"temperature_C"`               // The average temperature of this node in centigrade
	Timestamp                 string            `json:"timestamp"`
	UpSince                   string            `json:"up_since"`
	VolumeGroups              []VolumeGroupInfo `json:"volume_groups"`
}

ListHostResponse is the full information we can get for a single node.

type ListHostVolumeGroupResponse

type ListHostVolumeGroupResponse struct {
	VolumeGroup VolumeGroupInfo `json:"volume_group"`
}

ListHostVolumeGroupResponse is the response body for GET /storage/host/{id}/volgroup/{id}.

type ListHostVolumeGroupsResponse

type ListHostVolumeGroupsResponse struct {
	VolumeGroups []VolumeGroupInfo `json:"volume_groups"`
}

ListHostVolumeGroupsResponse is the response body for GET /storage/host/{id}/volgroup.

type ListHostsResponse

type ListHostsResponse struct {
	Nodes []ListHostResponse `json:"nodes"`
}

ListHostsResponse is the response body for GET /storage/host.

type ListOSDResponse

type ListOSDResponse struct {
	OSD OsdInfo `json:"osd"`
}

ListOSDResponse is the response body for GET /storage/osd/{id}.

type ListOSDsResponse

type ListOSDsResponse struct {
	OSDs []OsdInfo `json:"osds"`
}

ListOSDsResponse is the response body for GET /storage/osd.

type ListPoolResponse

type ListPoolResponse struct {
	Pool PoolInfo `json:"pool"`
}

ListPoolResponse is the response body for GET /storage/pool/{id}.

type ListPoolsResponse

type ListPoolsResponse struct {
	Pools []PoolInfo `json:"pools"`
}

ListPoolsResponse is the response body for GET /storage/pool.

type ListShareRBDResponse

type ListShareRBDResponse struct {
	RBD RbdInfo `json:"rbd"`
}

ListShareRBDResponse is the response body for GET /storage/share/rbd/{id}.

type ListShareRBDsResponse

type ListShareRBDsResponse struct {
	RBDs []RbdInfo `json:"rbd"`
}

ListShareRBDsResponse is the response body for GET /storage/share/rbd.

type ListSummaryResponse

type ListSummaryResponse struct {
	Health                    string      `json:"health" enums:"HEALTH_OK,HEALTH_WARN,HEALTH_ERROR"`
	PgCount                   uint        `json:"pg_count"`
	AveragePgsPerOsd          uint        `json:"average_pgs_per_osd"`
	PoolCount                 uint        `json:"pool_count"`
	ObjectCount               uint64      `json:"object_count"`
	StorageTotalMB            uint64      `json:"storage_total_MB"`
	StorageUsedMB             uint64      `json:"storage_used_MB"`
	StorageUtilizationPercent uint        `json:"storage_utilization_percent"`
	OsdCount                  uint        `json:"osd_count"` // The total number of OSDs inthe cluster
	OsdUp                     uint        `json:"osd_up"`
	OsdDown                   uint        `json:"osd_down"`
	OsdIn                     uint        `json:"osd_in"`
	OsdOut                    uint        `json:"osd_out"`
	Flags                     []CephFlag  `json:"flags"`
	Alerts                    []CephAlert `json:"alerts"`
	AlertCount                uint        `json:"alert_count"`
	MonitorsInQuorum          uint        `json:"monitors_in_quorum"`
	VersionName               string      `json:"version_name"`   // The name of the Ceph version
	VersionNumber             string      `json:"version_number"` // The Ceph version
}

ListSummaryResponse is the summary information to display on the dashboard.

type LogicalVolumeInfo

type LogicalVolumeInfo struct {
	CapacityMB      uint64               `json:"capacity_MB"` // The max capacity of this logical volume, in MB.
	Mountpoint      string               `json:"mountpoint"`
	Name            string               `json:"name"`      // The logical volume name
	NodeID          string               `json:"node_id"`   // The ID of the node this logical volume is in
	NodeName        string               `json:"node_name"` // The name of the node this logical volume is inside
	Path            string               `json:"path"`      // The path to the logical volume
	Usage           string               `json:"usage"`
	UsedBy          OsdRef               `json:"used_by"`
	UUID            string               `json:"uuid"`             // A unique ID for this partition
	PhysicalVolumes []PhysicalVolumeInfo `json:"physical_volumes"` // The physical volumes used by this logical volume
}

LogicalVolumeInfo is the information for a single logical volume.

type NetInterfaceInfo

type NetInterfaceInfo struct {
	Name         string                `json:"name"`              // This network's name
	IPAddress    string                `json:"ip_address"`        // This network's IP address
	Subnet       string                `json:"subnet,omitempty"`  // The network's subnet
	Gateway      string                `json:"gateway,omitempty"` // The network's gateway
	Mac          string                `json:"mac,omitempty"`     // The network's MAC address
	Mtu          uint16                `json:"mtu,omitempty"`     // The network's maximum transmission unit
	LinkSpeedMbs uint                  `json:"link_speed_Mbs,omitempty"`
	Status       NetworkConnStatusEnum `json:"status" swaggertype:"string" enums:"CONNECTED,NOT_CONNECTED"` // The connection status
}

NetInterfaceInfo is the information we can get for a single network interface.

type NetInterfacesInfo

type NetInterfacesInfo struct {
	Bmc         NetInterfaceInfo `json:"management"`
	Public      NetInterfaceInfo `json:"public"`
	Replication NetInterfaceInfo `json:"replication"`
}

NetInterfacesInfo is the information we can get for all the networks on a single node.

type NetworkConnStatusEnum

type NetworkConnStatusEnum int

NetworkConnStatusEnum is the type for network connection status.

const (
	NetworkNotConnected NetworkConnStatusEnum = iota // NOT_CONNECTED
	NetworkConnected                                 // CONNECTED
)

Network connection status.

func NetworkConnStatusEnumString

func NetworkConnStatusEnumString(s string) (NetworkConnStatusEnum, error)

NetworkConnStatusEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func NetworkConnStatusEnumValues

func NetworkConnStatusEnumValues() []NetworkConnStatusEnum

NetworkConnStatusEnumValues returns all values of the enum

func (NetworkConnStatusEnum) IsANetworkConnStatusEnum

func (i NetworkConnStatusEnum) IsANetworkConnStatusEnum() bool

IsANetworkConnStatusEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (NetworkConnStatusEnum) MarshalText

func (i NetworkConnStatusEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for NetworkConnStatusEnum

func (NetworkConnStatusEnum) String

func (i NetworkConnStatusEnum) String() string

func (*NetworkConnStatusEnum) UnmarshalText

func (i *NetworkConnStatusEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for NetworkConnStatusEnum

type NodeStatusEnum

type NodeStatusEnum int

NodeStatusEnum is the type for node running status.

const (
	NodeStatusDiscovering   NodeStatusEnum = iota // DISCOVERING
	NodeStatusMissing                             // MISSING
	NodeStatusOff                                 // OFF
	NodeStatusCrashed                             // CRASHED
	NodeStatusBooting                             // DOWN
	NodeStatusOn                                  // ON
	NodeStatusPendingOn                           // PENDING_ON
	NodeStatusPendingOff                          // PENDING_OFF
	NodeStatusPendingReboot                       // PENDING_REBOOT
	NodeStatusPendingChange                       // PENDING_CHANGE
)

Node running status.

func NodeStatusEnumString

func NodeStatusEnumString(s string) (NodeStatusEnum, error)

NodeStatusEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func NodeStatusEnumValues

func NodeStatusEnumValues() []NodeStatusEnum

NodeStatusEnumValues returns all values of the enum

func (NodeStatusEnum) IsANodeStatusEnum

func (i NodeStatusEnum) IsANodeStatusEnum() bool

IsANodeStatusEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (NodeStatusEnum) MarshalText

func (i NodeStatusEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for NodeStatusEnum

func (NodeStatusEnum) String

func (i NodeStatusEnum) String() string

func (*NodeStatusEnum) UnmarshalText

func (i *NodeStatusEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for NodeStatusEnum

type OsdClassEnum

type OsdClassEnum int

OsdClassEnum is the type for OSDs class.

const (
	OsdClassSsd OsdClassEnum = iota // SSD
	OsdClassHdd                     // HDD
)

OSDs classes.

func OsdClassEnumString

func OsdClassEnumString(s string) (OsdClassEnum, error)

OsdClassEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OsdClassEnumValues

func OsdClassEnumValues() []OsdClassEnum

OsdClassEnumValues returns all values of the enum

func (OsdClassEnum) IsAOsdClassEnum

func (i OsdClassEnum) IsAOsdClassEnum() bool

IsAOsdClassEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (OsdClassEnum) MarshalText

func (i OsdClassEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for OsdClassEnum

func (OsdClassEnum) String

func (i OsdClassEnum) String() string

func (*OsdClassEnum) UnmarshalText

func (i *OsdClassEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for OsdClassEnum

type OsdInfo

type OsdInfo struct {
	ID                 uint          `json:"id"`          // A unique ID for the OSD
	Name               string        `json:"name"`        // The OSD's name
	CapacityMB         uint64        `json:"capacity_MB"` // Amount of storage this OSD has
	NodeID             string        `json:"node_id"`     // A unique ID for the node
	NodeName           string        `json:"node_name"`   // The containing node's name
	State              OsdStateEnum  `json:"state" swaggertype:"string" enums:"UP,DOWN,OUT"`
	UsedMB             uint64        `json:"used_MB"`             // Amount of this OSD's storage that is being used
	UtilizationPercent uint          `json:"utilization_percent"` // The percentage of this OSD's total storage that is being used
	CrushWeight        float64       `json:"crush_weight"`
	Reweight           float64       `json:"reweight"`
	PgCount            uint          `json:"pg_count"`
	Variance           float64       `json:"variance"`
	NodeIP             string        `json:"node_ip"` // The public IP address of this node
	Class              OsdClassEnum  `json:"class" swaggertype:"string" enums:"SSD,HDD"`
	Alerts             []string      `json:"alerts"` // A list of alerts being fired for this OSD
	Disks              []DiskSummary `json:"disks"`
}

OsdInfo is the full information about a single Ceph OSD.

type OsdRef

type OsdRef struct {
	Name string `json:"name"` // A human-readable nice name for the OSD.
	ID   uint   `json:"id"`   // Sortable ID for the OSD.
}

OsdRef is a reference to a single OSD.

type OsdStateEnum

type OsdStateEnum int

OsdStateEnum is the type for OSDs state.

const (
	OsdStateUp   OsdStateEnum = iota // UP
	OsdStateDown                     // DOWN
	OsdStateOut                      // OUT
)

OSDs states.

func OsdStateEnumString

func OsdStateEnumString(s string) (OsdStateEnum, error)

OsdStateEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func OsdStateEnumValues

func OsdStateEnumValues() []OsdStateEnum

OsdStateEnumValues returns all values of the enum

func (OsdStateEnum) IsAOsdStateEnum

func (i OsdStateEnum) IsAOsdStateEnum() bool

IsAOsdStateEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (OsdStateEnum) MarshalText

func (i OsdStateEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for OsdStateEnum

func (OsdStateEnum) String

func (i OsdStateEnum) String() string

func (*OsdStateEnum) UnmarshalText

func (i *OsdStateEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for OsdStateEnum

type PartialVolumeGroupInfo

type PartialVolumeGroupInfo struct {
	Name           string              `json:"name"`            // The volume group name
	LogicalVolumes []LogicalVolumeInfo `json:"logical_volumes"` // A list of logical volumes
}

PartialVolumeGroupInfo is a subset of information for a volume group that's relevant to a single physical volume.

type PartitionInfo

type PartitionInfo struct {
	CapacityMB  uint64                 `json:"capacity_MB"` // The max capacity of the partition, in MB.
	Index       uint                   `json:"index"`
	Mountpoint  string                 `json:"mountpoint"`
	Path        string                 `json:"path"` // The path to the partition on the disk
	Usage       string                 `json:"usage"`
	UsedBy      []OsdRef               `json:"used_by"` // The OSDs that use this partition
	UUID        string                 `json:"uuid"`    // A unique ID for this partition
	VolumeGroup PartialVolumeGroupInfo `json:"volume_group"`
}

PartitionInfo is the information for a single disk partition.

type PhysicalVolumeInfo

type PhysicalVolumeInfo struct {
	Bcache         string   `json:"bcache_path"`
	CapacityMB     uint64   `json:"capacity_MB"`     // The max capacity of the physical volume, in MB
	DiskID         string   `json:"disk_id"`         // The disk opaque identifier
	DiskName       string   `json:"disk_name"`       // A human-readable nice name for the disk
	PartitionIndex uint     `json:"partition_index"` // Index of the partition within the disk, 0 for a whole disk
	Path           string   `json:"path"`            // The path to the physical volume device
	Usage          string   `json:"usage"`
	UsedBy         []OsdRef `json:"used_by"` // The OSDs that use this physical volume
}

PhysicalVolumeInfo is the information for a single physical volume.

type PoolInfo

type PoolInfo struct {
	ID                 uint              `json:"id"`
	Name               string            `json:"name"`
	PgCount            uint              `json:"pg_count"`
	PgPlacementNum     uint              `json:"pg_placement_num"`
	PgAutoscale        bool              `json:"pg_autoscale"`
	Type               string            `json:"type"`
	CapacityMB         uint64            `json:"capacity_MB"`
	UsedMB             uint64            `json:"used_MB"`
	UtilizationPercent uint              `json:"utilization_percent"`
	ObjectCount        uint64            `json:"object_count"`
	Compression        string            `json:"compression"`
	ErasureCodeProfile string            `json:"erasure_code_profile,omitempty"`
	ReplicationCount   uint              `json:"replication_count,omitempty"`
	CrushRulesetID     uint              `json:"crush_ruleset_id"`
	CrushRuleset       string            `json:"crush_ruleset"`
	StripeWidth        uint              `json:"stripe_width"`
	QuotaMaxBytes      uint64            `json:"quota_max_bytes"`
	QuotaMaxObjects    uint64            `json:"quota_max_objects"`
	Applications       []string          `json:"applications"`
	Services           []RestServiceInfo `json:"services"`
	Shares             []RestShareInfo   `json:"shares"`
}

PoolInfo is the full information about a single Ceph pool.

type RbdInfo

type RbdInfo struct {
	ID                     string                  `json:"id"`
	Name                   string                  `json:"name"`
	Path                   string                  `json:"path"`
	PoolID                 uint                    `json:"pool_id"`
	PoolName               string                  `json:"pool_name"`
	PoolType               string                  `json:"pool_type"`
	PoolCapacityMB         uint64                  `json:"pool_capacity_MB"`
	PoolUsedMB             uint64                  `json:"pool_used_MB"`
	PoolErasureCodeProfile string                  `json:"pool_erasure_code_profile,omitempty"`
	PoolReplicationCount   uint                    `json:"pool_replication_count,omitempty"`
	PoolShareCount         uint                    `json:"pool_share_count"`
	CapacityMB             uint64                  `json:"capacity_MB"`
	ObjectSizeB            uint                    `json:"object_size_B"`
	ObjectCount            uint64                  `json:"object_count"`
	BlockName              string                  `json:"block_name"`
	Features               []string                `json:"features,omitempty"`
	Deleting               bool                    `json:"deleting"` // True if this RBD is being deleted
	IscsiExportable        IscsiExportableTypeEnum `json:"iscsi_exportable" swaggertype:"string" enums:"AVAILABLE,EXPORTED,INVALID_OPTIONS"`
	IscsiShareID           string                  `json:"iscsi_share_id"`
	IscsiShareName         string                  `json:"iscsi_share_name"`
}

RbdInfo is the full information for a single RBD.

type RestServiceInfo

type RestServiceInfo struct {
	ID     string         `json:"id"`   // A unique ID for the service
	Type   ShareTypeEnum  `json:"type"` // The service's share type
	Name   string         `json:"name"`
	Shares []RestShareRef `json:"shares"`
}

RestServiceInfo is the information for a single service of any type.

type RestShareInfo

type RestShareInfo struct {
	ID          string        `json:"id"`   // A unique ID for the share
	Type        ShareTypeEnum `json:"type"` // The share's type
	Name        string        `json:"name"` // The share's name
	SizeMB      uint64        `json:"size_MB"`
	ServiceID   string        `json:"service_id"`
	ServiceName string        `json:"service_name"`
}

RestShareInfo is the common information for a single share of any type.

type RestShareRef

type RestShareRef struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

RestShareRef references to shares used by services.

type ShareTypeEnum

type ShareTypeEnum int

ShareTypeEnum is the type of a share.

const (
	ShareTypeSmb    ShareTypeEnum = iota // SMB
	ShareTypeCephFs                      // CephFS
	ShareTypeIscsi                       // iSCSI
	ShareTypeRbd                         // RBD
)

Share types.

func ShareTypeEnumString

func ShareTypeEnumString(s string) (ShareTypeEnum, error)

ShareTypeEnumString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func ShareTypeEnumValues

func ShareTypeEnumValues() []ShareTypeEnum

ShareTypeEnumValues returns all values of the enum

func (ShareTypeEnum) IsAShareTypeEnum

func (i ShareTypeEnum) IsAShareTypeEnum() bool

IsAShareTypeEnum returns "true" if the value is listed in the enum definition. "false" otherwise

func (ShareTypeEnum) MarshalText

func (i ShareTypeEnum) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for ShareTypeEnum

func (ShareTypeEnum) String

func (i ShareTypeEnum) String() string

func (*ShareTypeEnum) UnmarshalText

func (i *ShareTypeEnum) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for ShareTypeEnum

type VolumeGroupInfo

type VolumeGroupInfo struct {
	CapacityMB      uint64               `json:"capacity_MB"` // The max capacity of this volume group, in MB.
	Name            string               `json:"name"`        // The volume group name
	NodeID          string               `json:"node_id"`     // The ID of the node this volume groupis in
	NodeName        string               `json:"node_name"`   // The name of the node this volume group is inside
	Usage           string               `json:"usage"`
	UsedBy          []OsdRef             `json:"used_by"`          // The OSDs that use this volume group
	LogicalVolumes  []LogicalVolumeInfo  `json:"logical_volumes"`  // A list of logical volumes
	PhysicalVolumes []PhysicalVolumeInfo `json:"physical_volumes"` // The physical volumes in this volume group
}

VolumeGroupInfo is the information for a single volume group.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL