Documentation ¶
Index ¶
- type ChapiServer
- func (driver *ChapiServer) CreateBindMount(sourceMount string, targetMount string, bindType string) (*model.Mount, error)
- func (driver *ChapiServer) CreateDevice(publishInfo model.PublishInfo) (*model.Device, error)
- func (driver *ChapiServer) CreateFileSystem(serialNumber string, filesystem string) error
- func (driver *ChapiServer) CreateMount(serialNumber string, mountPoint string, fsOptions *model.FileSystemOptions) (*model.Mount, error)
- func (driver *ChapiServer) DeleteDevice(serialNumber string) error
- func (driver *ChapiServer) DeleteMount(serialNumber string, mountPointId string) error
- func (driver *ChapiServer) GetAllDeviceDetails(serialNumber string) ([]*model.Device, error)
- func (driver *ChapiServer) GetAllMountDetails(serialNumber string, mountPointID string) ([]*model.Mount, error)
- func (driver *ChapiServer) GetDevices(serialNumber string) ([]*model.Device, error)
- func (driver *ChapiServer) GetHostInfo() (*model.Host, error)
- func (driver *ChapiServer) GetHostInitiators() ([]*model.Initiator, error)
- func (driver *ChapiServer) GetHostNetworks() ([]*model.Network, error)
- func (driver *ChapiServer) GetMounts(serialNumber string) ([]*model.Mount, error)
- func (driver *ChapiServer) GetPartitionInfo(serialNumber string) ([]*model.DevicePartition, error)
- func (driver *ChapiServer) OfflineDevice(serialNumber string) error
- type Driver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChapiServer ¶
type ChapiServer struct { }
ChapiServer ... Implements the "Driver" interfaces
func (*ChapiServer) CreateBindMount ¶
func (driver *ChapiServer) CreateBindMount(sourceMount string, targetMount string, bindType string) (*model.Mount, error)
CreateBindMount creates the given bind mount
func (*ChapiServer) CreateDevice ¶
func (driver *ChapiServer) CreateDevice(publishInfo model.PublishInfo) (*model.Device, error)
CreateDevice will attach device on this host based on the details provided
func (*ChapiServer) CreateFileSystem ¶
func (driver *ChapiServer) CreateFileSystem(serialNumber string, filesystem string) error
CreateFileSystem writes the given file system to the device with the given serial number
func (*ChapiServer) CreateMount ¶
func (driver *ChapiServer) CreateMount(serialNumber string, mountPoint string, fsOptions *model.FileSystemOptions) (*model.Mount, error)
CreateMount mounts the given device to the given mount point
func (*ChapiServer) DeleteDevice ¶
func (driver *ChapiServer) DeleteDevice(serialNumber string) error
DeleteDevice will delete the given device from the host
func (*ChapiServer) DeleteMount ¶
func (driver *ChapiServer) DeleteMount(serialNumber string, mountPointId string) error
DeleteMount unmounts the given mount point, serialNumber can be optional in the body
func (*ChapiServer) GetAllDeviceDetails ¶
func (driver *ChapiServer) GetAllDeviceDetails(serialNumber string) ([]*model.Device, error)
GetAllDeviceDetails enumerates all the Nimble volumes with detailed information. If serialNumber is non-empty then only specified device is returned
func (*ChapiServer) GetAllMountDetails ¶
func (driver *ChapiServer) GetAllMountDetails(serialNumber string, mountPointID string) ([]*model.Mount, error)
GetAllMountDetails enumerates the specified mount point ID
func (*ChapiServer) GetDevices ¶
func (driver *ChapiServer) GetDevices(serialNumber string) ([]*model.Device, error)
GetDevices enumerates all the Nimble volumes with basic details. If serialNumber is non-empty then only specified device is returned
func (*ChapiServer) GetHostInfo ¶
func (driver *ChapiServer) GetHostInfo() (*model.Host, error)
GetHostInfo returns host name, domain, and network interfaces
func (*ChapiServer) GetHostInitiators ¶
func (driver *ChapiServer) GetHostInitiators() ([]*model.Initiator, error)
GetHostInitiators reports the initiators on this host
func (*ChapiServer) GetHostNetworks ¶
func (driver *ChapiServer) GetHostNetworks() ([]*model.Network, error)
GetHostNetworks reports the networks on this host
func (*ChapiServer) GetMounts ¶
func (driver *ChapiServer) GetMounts(serialNumber string) ([]*model.Mount, error)
GetMounts reports all mounts on this host for the specified Nimble volume
func (*ChapiServer) GetPartitionInfo ¶
func (driver *ChapiServer) GetPartitionInfo(serialNumber string) ([]*model.DevicePartition, error)
GetPartitionInfo reports the partitions on the provided device
func (*ChapiServer) OfflineDevice ¶
func (driver *ChapiServer) OfflineDevice(serialNumber string) error
OfflineDevice will offline the given device from the host
type Driver ¶
type Driver interface { GetHostInfo() (*model.Host, error) // GET /api/v1/hosts GetHostInitiators() ([]*model.Initiator, error) // GET /api/v1/initiators GetHostNetworks() ([]*model.Network, error) // GET /api/v1/networks // GET /api/v1/devices or // GET /api/v1/devices?serial=serial GetDevices(serialNumber string) ([]*model.Device, error) // GET /api/v1/devices/details or // GET /api/v1/devices/details?serial=serial GetAllDeviceDetails(serialNumber string) ([]*model.Device, error) // GET /api/v1/devices/{serialnumber}/partitions GetPartitionInfo(serialNumber string) ([]*model.DevicePartition, error) // POST /api/v1/devices CreateDevice(publishInfo model.PublishInfo) (*model.Device, error) // DELETE /api/v1/devices/{serialnumber} DeleteDevice(serialNumber string) error // PUT /api/v1/devices/{serialnumber}/actions/offline OfflineDevice(serialNumber string) error // PUT /api/v1/devices/{serialnumber}/filesystem/{filesystem} CreateFileSystem(serialNumber string, filesystem string) error // GET /api/v1/mounts or // GET /api/v1/mounts?serial=serial GetMounts(serialNumber string) ([]*model.Mount, error) // GET /api/v1/mounts/details or filter by serial using // GET /api/v1/mounts/details?serial=serial or filter by serial and specific mount using // GET /api/v1/mounts/details?serial=serial,mountId=mount GetAllMountDetails(serialNumber, mountPointID string) ([]*model.Mount, error) // POST /api/v1/mounts CreateMount(serialNumber string, mountPoint string, fsOptions *model.FileSystemOptions) (*model.Mount, error) // DELETE /api/v1/mounts/{mountId} DeleteMount(serialNumber, mountPointID string) error // TODO: check with George/Suneeth on this // POST /api/v1/mounts/bind CreateBindMount(sourceMount string, targetMount string, bindType string) (*model.Mount, error) }
Driver provides a common interface for host related operations