Documentation ¶
Index ¶
- func GetSocketName() string
- type Client
- func (chapiClient *Client) CreateBindMount(sourceMount string, targetMount string, bindType string) (mount *model.Mount, err error)
- func (chapiClient *Client) CreateDevice(publishInfo model.PublishInfo) (device *model.Device, err error)
- func (chapiClient *Client) CreateFileSystem(serialNumber string, filesystem string) (err error)
- func (chapiClient *Client) CreateMount(serialNumber string, mountPoint string, fsOptions *model.FileSystemOptions) (mount *model.Mount, err error)
- func (chapiClient *Client) DeleteDevice(serialNumber string) (err error)
- func (chapiClient *Client) DeleteMount(serialNumber, mountPointID string) (err error)
- func (chapiClient *Client) GetAllDeviceDetails(serialNumber string) (devices []*model.Device, err error)
- func (chapiClient *Client) GetAllMountDetails(serialNumber, mountPointID string) (mounts []*model.Mount, err error)
- func (chapiClient *Client) GetDevices(serialNumber string) (devices []*model.Device, err error)
- func (chapiClient *Client) GetHostInfo() (host *model.Host, err error)
- func (chapiClient *Client) GetHostInitiators() (initiators []*model.Initiator, err error)
- func (chapiClient *Client) GetHostNetworks() (networks []*model.Network, err error)
- func (chapiClient *Client) GetMounts(serialNumber string) (mounts []*model.Mount, err error)
- func (chapiClient *Client) GetPartitionInfo(serialNumber string) (partitions []*model.DevicePartition, err error)
- func (chapiClient *Client) OfflineDevice(serialNumber string) (err error)
- func (chapiClient *Client) Print()
- type ClientBase
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSocketName ¶
func GetSocketName() string
GetSocketName returns unix socket name (per process)
Types ¶
type Client ¶
type Client struct { ClientBase // Embedded platform independent struct // contains filtered or unexported fields }
Client contains the Linux specific Client properties
func NewChapiClient ¶
NewChapiClient returns the CHAPI client object that is used to communicate with the CHAPI server over HTTP.
func NewChapiClientWithTimeout ¶
NewChapiClientWithTimeout returns the CHAPI client object that is used to communicate with the CHAPI server over HTTP. A custom timeout value is supported.
func NewChapiSocketClientWithTimeout ¶
NewChapiClientWithTimeout returns the CHAPI client object, using Linux sockets, that is used to communicate with the CHAPI server over HTTP. A custom timeout value is supported.
func (*Client) CreateBindMount ¶
func (chapiClient *Client) CreateBindMount(sourceMount string, targetMount string, bindType string) (mount *model.Mount, err error)
CreateBindMount creates the given bind mount
func (*Client) CreateDevice ¶
func (chapiClient *Client) CreateDevice(publishInfo model.PublishInfo) (device *model.Device, err error)
CreateDevice will attach device on this host based on the details provided
func (*Client) CreateFileSystem ¶
CreateFileSystem writes the given file system to the device with the given serial number
func (*Client) CreateMount ¶
func (chapiClient *Client) CreateMount(serialNumber string, mountPoint string, fsOptions *model.FileSystemOptions) (mount *model.Mount, err error)
CreateMount mounts the given device to the given mount point
func (*Client) DeleteDevice ¶
DeleteDevice will delete the given device from the host
func (*Client) DeleteMount ¶
DeleteMount unmounts the given mount point, serialNumber can be optional in the body
func (*Client) GetAllDeviceDetails ¶
func (chapiClient *Client) GetAllDeviceDetails(serialNumber string) (devices []*model.Device, err error)
GetAllDeviceDetails enumerates all the Nimble volumes with detailed information. If serialNumber is non-empty then only specified device is returned
func (*Client) GetAllMountDetails ¶
func (chapiClient *Client) GetAllMountDetails(serialNumber, mountPointID string) (mounts []*model.Mount, err error)
GetAllMountDetails enumerates the specified mount point ID
func (*Client) GetDevices ¶
GetDevices enumerates all the Nimble volumes with basic details. If serialNumber is non-empty then only specified device is returned
func (*Client) GetHostInfo ¶
GetHostInfo returns host name, domain, and network interfaces
func (*Client) GetHostInitiators ¶
GetHostInitiators reports the initiators on this host
func (*Client) GetHostNetworks ¶
GetHostNetworks reports the networks on this host
func (*Client) GetMounts ¶
GetMounts reports all mounts on this host for the specified Nimble volume
func (*Client) GetPartitionInfo ¶
func (chapiClient *Client) GetPartitionInfo(serialNumber string) (partitions []*model.DevicePartition, err error)
GetPartitionInfo reports the partitions on the provided device
func (*Client) OfflineDevice ¶
OfflineDevice will offline the given device from the host
type ClientBase ¶
type ClientBase struct {
// contains filtered or unexported fields
}
ClientBase defines platform independent properties and is embedded within the Client object
type Response ¶
type Response struct { Data interface{} `json:"data,omitempty"` Err *cerrors.ChapiError `json:"errors,omitempty"` }
Response object defines the data and/or error that are returned by a CHAPI endpoint