Documentation
¶
Overview ¶
Package linstorcontrol allows creating and deleting LINSTOR resources/volumes. It is a higher level abstraction to the low level golinstor REST package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultResourceProps ¶
DefaultResourceProps returns the default LINSTOR properties for a new resource
func StatusFromResources ¶
func StatusFromResources(serviceCfgPath string, definition *client.ResourceDefinition, group *client.ResourceGroup, resources []client.ResourceWithVolumes) common.ResourceStatus
Types ¶
type CreateResult ¶
type CreateResult struct { // Linux device path (e.g., /dev/drbd1001) DevicePath string // List of nodes where the actual data got places (i.e., after autoplace) StorageNodes []string }
CreateResult is a struct than is used as the result of a successful create action. It already contains the data that is most likely used by a consumer of a CreateVolume() call.
type Linstor ¶
Linstor is a struct containing the configuration that is needed to create or delete a LINSTOR resource.
func (*Linstor) EnsureResource ¶
func (l *Linstor) EnsureResource(ctx context.Context, res Resource, mayExist bool) (*client.ResourceDefinition, *client.ResourceGroup, []client.ResourceWithVolumes, error)
EnsureResource creates or updates the given resource. It returns three values:
- The newly created resource definition
- A slice of all resources that have been spawned from this resource definition on the respective nodes
- An error if one occurred, or nil
Click to show internal directories.
Click to hide internal directories.