flasharray

package module
v0.0.0-...-8097dd3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package flasharray is designed to provide a simple interface for issuing commands to a Pure Storage Flash Array using a REST API. It communicates with the array using the golang http library, and returns the data into types defined within the library. This is not designed to be a standalone program. It is just meant to provide functions and communication within another program

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Name    string `json:"name,omitempty"`
	Enabled bool   `json:"enabled,omitempty"`
}

Alert is a struct for the json data returned by the array

type AlertService

type AlertService struct {
	// contains filtered or unexported fields
}

AlertService is a struct for the alert endpoints

func (*AlertService) CreateAlert

func (a *AlertService) CreateAlert(alert string, data interface{}) (*Alert, error)

CreateAlert Designates and valid email address to receive Purity alert messages Up to 20 addresses can be designated in an array.

func (*AlertService) DeleteAlert

func (a *AlertService) DeleteAlert(address string) (*Alert, error)

DeleteAlert deletes a alert

func (*AlertService) DisableAlert

func (a *AlertService) DisableAlert(address string) (*Alert, error)

DisableAlert disable the transmission of alert messages to the specified email address

func (*AlertService) EnableAlert

func (a *AlertService) EnableAlert(address string) (*Alert, error)

EnableAlert enable the transmission of alert messages to the specified email address

func (*AlertService) GetAlert

func (a *AlertService) GetAlert(name string) (*Alert, error)

GetAlert Lists the information about the specified email recipient

func (*AlertService) ListAlerts

func (a *AlertService) ListAlerts(params map[string]string) ([]Alert, error)

ListAlerts Lists the email recipients that are designated to receive Purity alert messages

func (*AlertService) SetAlert

func (a *AlertService) SetAlert(alert string, data interface{}) (*Alert, error)

SetAlert Modifies a alert

func (*AlertService) TestAlert

func (a *AlertService) TestAlert(address string) (*Alert, error)

TestAlert Tests the ability of the array to send alert messages to all of the designated email addresses.

func (*AlertService) TestAlerts

func (a *AlertService) TestAlerts() (*Alert, error)

TestAlerts Tests the ability of the array to send alert messages to all of the designated email addresses.

type Array

type Array struct {
	ID        string `json:"id,omitempty"`
	ArrayName string `json:"array_name,omitempty"`
	Version   string `json:"version,omitempty"`
	Revision  string `json:"revision,omitempty"`
	Time      string `json:"time,omitempty"`

	// Controllers
	Mode   string `json:"mode,omitempty"`
	Model  string `json:"model,omitempty"`
	Name   string `json:"name,omitempty"`
	Status string `json:"status,omitempty"`

	// Space
	Capacity         int     `json:"capacity,omitempty"`
	DataReduction    float64 `json:"data_reduction,omitempty"`
	Hostname         string  `json:"hostname,omitempty"`
	Parity           float64 `json:"parity,omitempty"`
	SharedSpace      int     `json:"shared_space,omitempty"`
	Snapshots        int     `json:"snapshots,omitempty"`
	System           int     `json:"system,omitempty"`
	ThinProvisioning float64 `json:"thin_provisioning,omitempy"`
	Total            int     `json:"total,omitempty"`
	TotalReduction   float64 `json:"total_reduction,omitempty"`
	Volumes          int     `json:"volumes,omitempty"`

	// Monitor
	SanUsecPerReadOp  int `json:"san_usec_per_read_op,omitempty"`
	SanUsecPerWriteOp int `json:"san_usec_per_write_op,omitempty"`
	UsecPerReadOp     int `json:"usec_per_read_op,omitempty"`
	UsecPerWriteOp    int `json:"usec_per_write_op,omitempty"`
	QueueDepth        int `json:"queue_depth,omitempty"`
	ReadsPerSec       int `json:"reads_per_sec,omitempty"`
	WritesPerSec      int `json:"writes_per_sec,omitempty"`
	InputPerSec       int `json:"input_per_sec,omitempty"`
	OutputPerSec      int `json:"output_per_sec,omitempty"`

	// Metrics returned if action=monitor,size=true
	BytesPerRead  int `json:"bytes_per_read,omitempty"`
	BytesPerWrite int `json:"bytes_per_write,omitempty"`
	BytesPerOp    int `json:"bytes_per_op,omitempty"`
}

Array gives information about the array

type ArrayConnection

type ArrayConnection struct {
	Throttled          bool     `json:"throttled"`
	ArrayName          string   `json:"array_name"`
	Version            string   `json:"version"`
	Connected          bool     `json:"connected"`
	ManagementAddress  string   `json:"management_address"`
	ReplicationAddress string   `json:"replication_address"`
	Type               []string `json:"type"`
	ID                 string   `json:"id"`
}

ArrayConnection struct for information returned by array about about the connection to a remote array

type ArrayService

type ArrayService struct {
	// contains filtered or unexported fields
}

ArrayService type creates a service to perform functions for administering and querying the flash array itself

func (*ArrayService) DisableConsoleLock

func (v *ArrayService) DisableConsoleLock() error

DisableConsoleLock disables root lockout from the array at the physical console. returns A dictionary mapping "console_lock" to "disabled".

func (*ArrayService) DisablePhoneHome

func (v *ArrayService) DisablePhoneHome() (*Phonehome, error)

DisablePhoneHome disables hourly phonehome

func (*ArrayService) DisableRemoteAssist

func (v *ArrayService) DisableRemoteAssist() (*RemoteAssist, error)

DisableRemoteAssist disables Remote Assist

func (*ArrayService) EnableConsoleLock

func (v *ArrayService) EnableConsoleLock() error

EnableConsoleLock enables root lockout from the array at the physical console. returns A dictionary mapping "console_lock" to "enabled".

func (*ArrayService) EnablePhoneHome

func (v *ArrayService) EnablePhoneHome() (*Phonehome, error)

EnablePhoneHome enables hourly phonehome

func (*ArrayService) EnableRemoteAssist

func (v *ArrayService) EnableRemoteAssist() (*RemoteAssist, error)

EnableRemoteAssist enables Remote Assist

func (*ArrayService) Get

func (v *ArrayService) Get(data interface{}) (*Array, error)

Get points to GetArray for compatibility

func (*ArrayService) GetArray

func (v *ArrayService) GetArray(params map[string]string, data interface{}) (*Array, error)

GetArray returns and object describing the flash array

func (*ArrayService) GetArrayMonitor

func (v *ArrayService) GetArrayMonitor(params map[string]string) ([]Array, error)

GetArrayMonitor returns and object describing the flash array

func (*ArrayService) GetArrayMonitorSize

func (v *ArrayService) GetArrayMonitorSize() ([]Array, error)

GetArrayMonitorSize returns an object describing the flash array

func (*ArrayService) GetArraySpace

func (v *ArrayService) GetArraySpace() ([]Array, error)

GetArraySpace returns and object describing the flash array

func (*ArrayService) GetConsoleLock

func (v *ArrayService) GetConsoleLock() (*ConsoleLock, error)

GetConsoleLock returns an object giving the console_lock status

func (*ArrayService) GetManualPhoneHome

func (v *ArrayService) GetManualPhoneHome() (*Phonehome, error)

GetManualPhoneHome lists manual phone home status

func (*ArrayService) GetPhoneHome

func (v *ArrayService) GetPhoneHome() (*Array, error)

GetPhoneHome lists Phonehome status

func (*ArrayService) GetRemoteAssist

func (v *ArrayService) GetRemoteAssist() (*RemoteAssist, error)

GetRemoteAssist lists Remote assist status

func (*ArrayService) Phonehome

func (v *ArrayService) Phonehome(action string) (*Phonehome, error)

Phonehome Manually initiates or cancels phonehome

Parameters action The timeframe of logs to phonehome or cancel the current phonehome action must be one of: "send_today", "send_yesterday", "send_all", "cancel"

func (*ArrayService) Rename

func (v *ArrayService) Rename(name string) (*Array, error)

Rename will change the name of the flash array

func (*ArrayService) Set

func (v *ArrayService) Set(data interface{}) (*Array, error)

Set will change the parameter on the array that is passed in the data map

type Block

type Block struct {
	Length int `json:"length,omitempty"`
	Offset int `json:"offset,omitempty"`
}

Block struct for object returned by array

type CertService

type CertService struct {
	// contains filtered or unexported fields
}

CertService struct for the cert endpoints

func (*CertService) CreateCert

func (c *CertService) CreateCert(name string, data interface{}) (*Certificate, error)

CreateCert Creates a self-signed certificate or imports a certificate signed by a certificate authority(CA)

func (*CertService) DeleteCert

func (c *CertService) DeleteCert(name string) (*Certificate, error)

DeleteCert deletes a certificate

func (*CertService) GetCSR

func (c *CertService) GetCSR(name string, params map[string]string) (*Certificate, error)

GetCSR Constructs a certificate signing request(CSR) for signing by a certificate authority(CA)

func (*CertService) GetCert

func (c *CertService) GetCert(name string, params map[string]string) (*Certificate, error)

GetCert Lists attributes or exports the specified certificate

func (*CertService) ListCert

func (c *CertService) ListCert() ([]Certificate, error)

ListCert Lists all available certificates

func (*CertService) SetCert

func (c *CertService) SetCert(name string, data interface{}) (*Certificate, error)

SetCert Creates (and optionally initializes) a new certificate

type Certificate

type Certificate struct {
	Status      string `json:"status,omitempty"`
	IssuedTo    string `json:"issued_to,omitempty"`
	ValidFrom   string `json:"valid_from,omitempty"`
	Name        string `json:"name,omitempty"`
	Locality    string `json:"locality,omitempty"`
	Country     string `json:"country,omitempty"`
	IssuedBy    string `json:"issued_by,omitempty"`
	ValidTo     string `json:"valid_to,omitempty"`
	State       string `json:"state,omitempty"`
	KeySize     int    `json:"key_size,omitempty"`
	OrgUnit     string `json:"organizational_unit,omitempty"`
	Org         string `json:"organization,omitempty"`
	Email       string `json:"email,omitempty"`
	Certificate string `json:"certificate,omitempty"`
	CSR         string `json:"certificate_signing_request,omitempty"`
	CommonName  string `json:"common_name,omitempty"`
	SelfSigned  bool   `json:"self_signed,omitempty"`
}

Certificate is a struct for the cert endpoint data returned by the array

type Client

type Client struct {
	Target        string
	Username      string
	Password      string
	APIToken      string
	RestVersion   string
	UserAgent     string
	RequestKwargs map[string]string

	Array            *ArrayService
	Volumes          *VolumeService
	Hosts            *HostService
	Hostgroups       *HostgroupService
	Offloads         *OffloadService
	Protectiongroups *ProtectiongroupService
	Vgroups          *VgroupService
	Networks         *NetworkService
	Hardware         *HardwareService
	Users            *UserService
	Dirsrv           *DirsrvService
	Pods             *PodService
	Alerts           *AlertService
	Messages         *MessageService
	Snmp             *SnmpService
	Cert             *CertService
	SMTP             *SMTPService
	// contains filtered or unexported fields
}

Client struct represents a Pure Storage FlashArray and exposes administrative APIs.

func NewClient

func NewClient(target string, username string, password string, apiToken string,
	restVersion string, verifyHTTPS bool, sslCert bool,
	userAgent string, requestKwargs map[string]string) (*Client, error)

NewClient returns a Client struct used to call the administrative functions.

Parameters: target IP address or domain name of the target array's management interface.

username Username to connect to the array

password Password used to connect to the array

api_token API token used to connect to the array

The API Token is always used to connect to the REST API. If username and password are provided, then they are used to retrieve the API token for that user before the HTTP session is started. Either api_token or username and password are required. If neither or both are provided, then an error is returned.

rest_version The REST API version to use for the the session. If not provied, the version will be negotiated between the library and the array.

verify_https A bool used to set whether SSL host verification should be performed.

ssl_cert Path to SSL certificate or CA Bundle file. Ignored if verify_https=False.

user_agent String to be used as the HTTP User-Agent for requests.

request_kwargs A map of keyword arguments that we will pass into the the call.

func (*Client) Do

func (c *Client) Do(req *http.Request, v interface{}, reestablishSession bool) (*http.Response, error)

Do is the client function that performs the HTTP request. req The HTTP request object to be executed. v The data object that will be populated and returned. i.e. Volume struct reestablish_session A bool that states if the session should be reestablished prior to execution.

This functionality is NOT implemented yet.  By default the Go HTTP library
does not set a timeout, I need to set this implicitly.
However, the array will timeout the session after 30 minutes.

func (*Client) NewRequest

func (c *Client) NewRequest(method string, path string, params map[string]string, data interface{}) (*http.Request, error)

NewRequest builds and returns a new HTTP request object.

Parameters: method This is the HTTP method to be used, i.e. GET, PUT, POST, or DELETE

path String of the API URI path to be called.

params A map of key value pairs that will be added to the query string of the URL

data The data body to be passed in the HTTP request. This will be converted to JSON, then added to the request as bytes.

type Component

type Component struct {
	Name        string `json:"name"`
	Details     string `json:"details,omitempty"`
	Identify    string `json:"identify,omitempty"`
	Index       int    `json:"index,omitempty"`
	Model       string `json:"model,omitempty"`
	Serial      string `json:"serial,omitempty"`
	Slot        int    `json:"slot,omitempty"`
	Speed       int    `json:"speed,omitempty"`
	Status      string `json:"status,omitempty"`
	Temperature int    `json:"temperature,omitempty"`
	Voltage     int    `json:"voltage,omitempty"`
}

Component struct for data returned by array

type ConnectedVolume

type ConnectedVolume struct {
	Vol    string `json:"vol,omitempty"`
	Name   string `json:"name,omitempty"`
	Lun    int    `json:"lun,omitempty"`
	Hgroup string `json:"hgroup,omitempty"`
}

ConnectedVolume struct for object returned from the array

type Connection

type Connection struct {
	Name   string `json:"name,omitempty"`
	Host   string `json:"host,omitempty"`
	Hgroup string `json:"hgroup,omitempty"`
	Lun    int    `json:"lun,omitempty"`
	Size   int    `json:"size,omitempty"`
}

Connection struct for object returned by array

type ConsoleLock

type ConsoleLock struct {
	ConsoleLock string `json:"console_lock"`
}

ConsoleLock type console_lock describes the console_lock status of the array.

type DNS

type DNS struct {
	Nameservers []string `json:"nameservers,omitempty"`
	Domain      string   `json:"domain,omitempty"`
}

DNS struct for object returned by array

type Dirsrv

type Dirsrv struct {
	BindUser     string   `json:"bind_user"`
	BindPassword string   `json:"bind_password"`
	BaseDn       string   `json:"base_dn"`
	CheckPeer    bool     `json:"check_peer"`
	Enabled      bool     `json:"enabled"`
	URI          []string `json:"uri"`
}

Dirsrv struct for data returned by array

type DirsrvRole

type DirsrvRole struct {
	Name      string `json:"name,omitempty"`
	Group     string `json:"group,omitempty"`
	GroupBase string `json:"group_base,omitempty"`
}

DirsrvRole struct for data returned by array

type DirsrvService

type DirsrvService struct {
	// contains filtered or unexported fields
}

DirsrvService struct for the dirsrv endpoints

func (*DirsrvService) DisableDirectoryService

func (n *DirsrvService) DisableDirectoryService(checkPeer bool) (*Dirsrv, error)

DisableDirectoryService disables the directory service if check_peer is true, enables server authenticity enforcement

func (*DirsrvService) EnableDirectoryService

func (n *DirsrvService) EnableDirectoryService(checkPeer bool) (*Dirsrv, error)

EnableDirectoryService enables the directory service if check_peer is true, enables server authenticity enforcement

func (*DirsrvService) GetDirectoryService

func (n *DirsrvService) GetDirectoryService() (*Dirsrv, error)

GetDirectoryService lists the attributes for the directory service

func (*DirsrvService) ListDirectoryServiceRoles

func (n *DirsrvService) ListDirectoryServiceRoles() ([]DirsrvRole, error)

ListDirectoryServiceRoles get directory service groups for roles

func (*DirsrvService) SetDirectoryService

func (n *DirsrvService) SetDirectoryService(data interface{}) (*Dirsrv, error)

SetDirectoryService sets attributes for the directory service

func (*DirsrvService) SetDirectoryServiceRoles

func (n *DirsrvService) SetDirectoryServiceRoles(data interface{}) (*DirsrvRole, error)

SetDirectoryServiceRoles sets the groups for roles

func (*DirsrvService) TestDirectoryService

func (n *DirsrvService) TestDirectoryService() (*DirsrvTest, error)

TestDirectoryService tests the directory service connection

type DirsrvTest

type DirsrvTest struct {
	Output string `json:"output"`
}

DirsrvTest struct for data returned by array

type Drive

type Drive struct {
	Name              string `json:"name"`
	Capacity          int    `json:"capacity,omitempty"`
	Details           string `json:"details,omitempty"`
	LastEvacCompleted string `json:"last_evac_completed,omitempty"`
	LastFailure       string `json:"last_failure,omitempty"`
	Protocol          string `json:"protocol,omitempty"`
	Status            string `json:"status,omitempty"`
	Type              string `json:"type,omitempty"`
}

Drive struct for data returned by array

type GlobalAdmin

type GlobalAdmin struct {
}

GlobalAdmin struct for object returned by array

type HardwareService

type HardwareService struct {
	// contains filtered or unexported fields
}

HardwareService struct for hardware API endpoints

func (*HardwareService) GetDrive

func (n *HardwareService) GetDrive(name string) (*Drive, error)

GetDrive lists drive attributes for specified drive

func (*HardwareService) GetHardware

func (n *HardwareService) GetHardware(name string) (*Component, error)

GetHardware lists attributes for specified hardware device

func (*HardwareService) ListDrives

func (n *HardwareService) ListDrives() ([]Drive, error)

ListDrives lists all drive attributes

func (*HardwareService) ListHardware

func (n *HardwareService) ListHardware() ([]Component, error)

ListHardware lists hardware device attributes

func (*HardwareService) SetHardware

func (n *HardwareService) SetHardware(name string, data interface{}) (*Component, error)

SetHardware modifies an attribute for a specified hardware device

type Host

type Host struct {
	Name           string   `json:"name,omitempty"`
	Wwn            []string `json:"wwn,omitempty"`
	Iqn            []string `json:"iqn,omitempty"`
	Nqn            []string `json:"nqn,omitempty"`
	HostPassword   string   `json:"host_password,omitempty"`
	HostUser       string   `json:"host_user,omitempty"`
	Personality    string   `json:"personality,omitempty"`
	PreferredArray []string `json:"preferred_array,omitempty"`
	TargetPassword string   `json:"target_password,omitempty"`
	TargetUser     string   `json:"target_user,omitempty"`
	Hgroup         string   `json:"hgroup,omitempty"`

	// Metrics returned with the action=monitor flag
	WritesPerSec      *int   `json:"writes_per_sec,omitempty"`
	ReadsPerSec       *int   `json:"reads_per_sec,omitempty"`
	UsecPerWriteOp    *int   `json:"usec_per_write_op,omitempty"`
	UsecPerReadOp     *int   `json:"usec_per_read_op,omitempty"`
	SanUsecPerReadOp  *int   `json:"san_usec_per_read_op,omitempty"`
	SanUsecPerWriteOp *int   `json:"san_usec_per_write_op,omitempty"`
	QueueDepth        *int   `json:"queue_depth,omitempty"`
	OutputPerSec      *int   `json:"output_per_sec,omitempty"`
	InputPerSec       *int   `json:"input_per_sec,omitempty"`
	Time              string `json:"time,omitempty"`

	// Metrics returned with the space=True flag
	Snapshots        *int     `json:"snapshots,omitempty"`
	Volumes          *int     `json:"volumes,omitempty"`
	DataReduction    *float64 `json:"data_reduction,omitempty"`
	Total            *int     `json:"total,omitempty"`
	ThinProvisioning *float64 `json:"thin_provisioning,omitempty"`
	TotalReduction   *float64 `json:"total_reduction,omitempty"`

	// Metrics returned if action=monitor,size=true
	BytesPerRead  *int `json:"bytes_per_read,omitempty"`
	BytesPerWrite *int `json:"bytes_per_write,omitempty"`
	BytesPerOp    *int `json:"bytes_per_op,omitempty"`
}

Host struct for the host object returned from the array

type HostPgroup

type HostPgroup struct {
	Name   string `json:"name,omitempty"`
	Pgroup string `json:"protection_group,omitempty"`
}

HostPgroup struct for object returned from the array

type HostService

type HostService struct {
	// contains filtered or unexported fields
}

HostService struct for host API endpoints

func (*HostService) AddHost

func (h *HostService) AddHost(host string, pgroup string) (*HostPgroup, error)

AddHost adds a host to a protection group

func (*HostService) ConnectHost

func (h *HostService) ConnectHost(host string, volume string, data interface{}) (*ConnectedVolume, error)

ConnectHost connects a volume to a host

func (*HostService) CreateHost

func (h *HostService) CreateHost(name string, data interface{}) (*Host, error)

CreateHost creates a new host

func (*HostService) DeleteHost

func (h *HostService) DeleteHost(name string) (*Host, error)

DeleteHost deletes a host

func (*HostService) DisconnectHost

func (h *HostService) DisconnectHost(host string, volume string) (*ConnectedVolume, error)

DisconnectHost disconnects a volume from a host

func (*HostService) GetHost

func (h *HostService) GetHost(name string, params map[string]string) (*Host, error)

GetHost returns the attributes of the given host

func (*HostService) ListHostConnections

func (h *HostService) ListHostConnections(host string, params map[string]string) ([]ConnectedVolume, error)

ListHostConnections lists the host's volume connections

func (*HostService) ListHosts

func (h *HostService) ListHosts(params map[string]string) ([]Host, error)

ListHosts lists the attributes of the hosts

func (*HostService) RemoveHost

func (h *HostService) RemoveHost(host string, pgroup string) (*HostPgroup, error)

RemoveHost removes a host from a protection group

func (*HostService) RenameHost

func (h *HostService) RenameHost(host string, name string) (*Host, error)

RenameHost renames a host

func (*HostService) SetHost

func (h *HostService) SetHost(name string, data interface{}) (*Host, error)

SetHost modifies the attributes of the specified host

type Hostgroup

type Hostgroup struct {
	Name  string   `json:"name,omitempty"`
	Hosts []string `json:"hosts,omitempty"`

	// Metrics returned with the action=monitor flag
	WritesPerSec      *int   `json:"writes_per_sec,omitempty"`
	ReadsPerSec       *int   `json:"reads_per_sec,omitempty"`
	UsecPerWriteOp    *int   `json:"usec_per_write_op,omitempty"`
	UsecPerReadOp     *int   `json:"usec_per_read_op,omitempty"`
	SanUsecPerReadOp  *int   `json:"san_usec_per_read_op,omitempty"`
	SanUsecPerWriteOp *int   `json:"san_usec_per_write_op,omitempty"`
	QueueDepth        *int   `json:"queue_depth,omitempty"`
	OutputPerSec      *int   `json:"output_per_sec,omitempty"`
	InputPerSec       *int   `json:"input_per_sec,omitempty"`
	Time              string `json:"time,omitempty"`

	// Metrics returned with the space=True flag
	Snapshots        *int     `json:"snapshots,omitempty"`
	Volumes          *int     `json:"volumes,omitempty"`
	DataReduction    *float64 `json:"data_reduction,omitempty"`
	Total            *int     `json:"total,omitempty"`
	ThinProvisioning *float64 `json:"thin_provisioning,omitempty"`
	TotalReduction   *float64 `json:"total_reduction,omitempty"`

	// Metrics returned if action=monitor,size=true
	BytesPerRead  *int `json:"bytes_per_read,omitempty"`
	BytesPerWrite *int `json:"bytes_per_write,omitempty"`
	BytesPerOp    *int `json:"bytes_per_op,omitempty"`
}

Hostgroup struct for data returned by array

type HostgroupConnection

type HostgroupConnection struct {
	Name string `json:"name,omitempty"`
	Vol  string `json:"vol,omitempty"`
	Lun  int    `json:"lun,omitempty"`
}

HostgroupConnection struct for data returned by array

type HostgroupPgroup

type HostgroupPgroup struct {
	Name   string `json:"name,omitempty"`
	Pgroup string `json:"protection_group,omitempty"`
}

HostgroupPgroup struct for data returned by array

type HostgroupService

type HostgroupService struct {
	// contains filtered or unexported fields
}

HostgroupService struct for hgroup API endpoints

func (*HostgroupService) AddHostgroup

func (h *HostgroupService) AddHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)

AddHostgroup adds a hostgroup to a Protection Group

func (*HostgroupService) ConnectHostgroup

func (h *HostgroupService) ConnectHostgroup(hgroup string, volume string, data interface{}) (*ConnectedVolume, error)

ConnectHostgroup connects a Volume to a hostgroup

func (*HostgroupService) CreateHostgroup

func (h *HostgroupService) CreateHostgroup(name string, data interface{}) (*Hostgroup, error)

CreateHostgroup creates a new hostgroup

func (*HostgroupService) DeleteHostgroup

func (h *HostgroupService) DeleteHostgroup(name string) (*Hostgroup, error)

DeleteHostgroup deletes a hostgroup

func (*HostgroupService) DisconnectHostgroup

func (h *HostgroupService) DisconnectHostgroup(hgroup string, volume string) (*ConnectedVolume, error)

DisconnectHostgroup disconnects a volume from a hostgroup

func (*HostgroupService) GetHostgroup

func (h *HostgroupService) GetHostgroup(name string, params map[string]string) (*Hostgroup, error)

GetHostgroup returns a map of the hostgroup attributes see API reference on array for list of valid parameters

func (*HostgroupService) ListHostgroupConnections

func (h *HostgroupService) ListHostgroupConnections(hgroup string) ([]HostgroupConnection, error)

ListHostgroupConnections lists the hostgroup volume connections

func (*HostgroupService) ListHostgroups

func (h *HostgroupService) ListHostgroups(params map[string]string) ([]Hostgroup, error)

ListHostgroups lists hostgroups

func (*HostgroupService) RemoveHostgroup

func (h *HostgroupService) RemoveHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)

RemoveHostgroup removes a hostgroup from a protection group.

func (*HostgroupService) RenameHostgroup

func (h *HostgroupService) RenameHostgroup(hgroup string, name string) (*Hostgroup, error)

RenameHostgroup renames a hostgroup

func (*HostgroupService) SetHostgroup

func (h *HostgroupService) SetHostgroup(name string, data interface{}) (*Hostgroup, error)

SetHostgroup modifies the specified hostgroup's attributes

type LockoutInfo

type LockoutInfo struct {
}

LockoutInfo struct for object returned by array

type Message

type Message struct {
	ComponentName string `json:"component_name,omitempty"`
	ComponentType string `json:"component_type,omitempty"`
	Details       string `json:"details,omitempty"`
	Event         string `json:"event,omitempty"`
	ID            int    `json:"id,omitempty"`
	Opened        string `json:"opened,omitempty"`
	User          string `json:"user,omitempty"`
}

Message struct for the object returned by the array

type MessageService

type MessageService struct {
	// contains filtered or unexported fields
}

MessageService struct for the message API endpoints

func (*MessageService) FlagMessage

func (a *MessageService) FlagMessage(id int) (*Message, error)

FlagMessage Flags a given message

func (*MessageService) ListMessages

func (a *MessageService) ListMessages(params map[string]string) ([]Message, error)

ListMessages Lists alert events, audit records, and user login sessions

func (*MessageService) SetMessage

func (a *MessageService) SetMessage(id int, data interface{}) (*Message, error)

SetMessage Modifies a message

func (*MessageService) UnflagMessage

func (a *MessageService) UnflagMessage(id int) (*Message, error)

UnflagMessage Unflags a given message

type NFSOffload

type NFSOffload struct {
	Name         string `json:"name"`
	Address      string `json:"address"`
	MountPoint   string `json:"mount_point"`
	MountOptions string `json:"mount_options"`
}

NFSOffload struct is an object returned by the array

type NetworkInterface

type NetworkInterface struct {
	Name     string   `json:"name,omitempty"`
	Address  string   `json:"address,omitempty"`
	Gateway  string   `json:"gateway,omitempty"`
	Netmask  string   `json:"netmask,omitempty"`
	Enabled  bool     `json:"enabled,omitempty"`
	Subnet   string   `json:"subnet,omitempty"`
	Mtu      int      `json:"mtu,omitempty"`
	Services []string `json:"services,omitempty"`
	Slaves   []string `json:"slaves,omitempty"`
	Hwaddr   string   `json:"hwaddr,omitempty"`
	Speed    int      `json:"speed,omitempty"`
}

NetworkInterface struct for object returned by array

type NetworkService

type NetworkService struct {
	// contains filtered or unexported fields
}

NetworkService struct for network API endpoints

func (*NetworkService) CreateSubnet

func (n *NetworkService) CreateSubnet(subnet string, prefix string) (*Subnet, error)

CreateSubnet creates a subnet param: subnet - Name of subnet to be created param: prefix - Routing prefix of subnet to be created note: prefix should be specified as an IPv4 CIDR address. ("xxx.xxx.xxx.xxx/nn", representing prefix and prefix length)

func (*NetworkService) CreateVlanInterface

func (n *NetworkService) CreateVlanInterface(iface string, subnet string) (*NetworkInterface, error)

CreateVlanInterface creates a VLAN Interface param: iface - Name of interface to be created param: subnet - Subnet to be associated with the new interface

func (*NetworkService) DeleteSubnet

func (n *NetworkService) DeleteSubnet(subnet string) (*Subnet, error)

DeleteSubnet deletes a subnet param: subnet - Name of subnet to be deleted

func (*NetworkService) DeleteVlanInterface

func (n *NetworkService) DeleteVlanInterface(iface string) (*NetworkInterface, error)

DeleteVlanInterface deletes a VLAN Interface param: iface - Name of iface to be deleted

func (*NetworkService) DisableNetworkInterface

func (n *NetworkService) DisableNetworkInterface(iface string) (*NetworkInterface, error)

DisableNetworkInterface disables a network interface. param: iface: Name of network interface to be disabled. Returns an object describing the interface.

func (*NetworkService) DisableSubnet

func (n *NetworkService) DisableSubnet(subnet string) (*Subnet, error)

DisableSubnet disables a subnet param: subnet: Name of subnet to be disabled. Returns an object describing the subnet

func (*NetworkService) EnableNetworkInterface

func (n *NetworkService) EnableNetworkInterface(iface string) (*NetworkInterface, error)

EnableNetworkInterface enables a network interface. param: iface: Name of network interface to be enabled. Returns an object describing the interface.

func (*NetworkService) EnableSubnet

func (n *NetworkService) EnableSubnet(subnet string) (*Subnet, error)

EnableSubnet enables a subnet param: subnet: Name of subnet to be enabled. Returns an object describing the subnet

func (*NetworkService) GetDNS

func (n *NetworkService) GetDNS() (*DNS, error)

GetDNS gets DNS settings

func (*NetworkService) GetNetworkInterface

func (n *NetworkService) GetNetworkInterface(iface string) (*NetworkInterface, error)

GetNetworkInterface lists network interface attributes

func (*NetworkService) GetSubnet

func (n *NetworkService) GetSubnet(subnet string) (*Subnet, error)

GetSubnet lists subnet attributes

func (*NetworkService) ListNetworkInterfaces

func (n *NetworkService) ListNetworkInterfaces() ([]NetworkInterface, error)

ListNetworkInterfaces list the attributes of the network interfaces

func (*NetworkService) ListPorts

func (n *NetworkService) ListPorts(data interface{}) ([]Port, error)

ListPorts lists attributes of the ports

func (*NetworkService) ListSubnets

func (n *NetworkService) ListSubnets() ([]Subnet, error)

ListSubnets lists attributes of subnets

func (*NetworkService) RenameSubnet

func (n *NetworkService) RenameSubnet(subnet string, name string) (*Subnet, error)

RenameSubnet renames a subnet param: subnet: Name of subnet to be renamed. param: name: Name to change the subnet to Returns an object describing the subnet

func (*NetworkService) SetDNS

func (n *NetworkService) SetDNS(data interface{}) (*DNS, error)

SetDNS modifies DNS settings

func (*NetworkService) SetNetworkInterface

func (n *NetworkService) SetNetworkInterface(iface string, data interface{}) (*NetworkInterface, error)

SetNetworkInterface modifies network interface attributes

func (*NetworkService) SetSubnet

func (n *NetworkService) SetSubnet(subnet string, data interface{}) (*Subnet, error)

SetSubnet modifies subnet attributes

type OffloadService

type OffloadService struct {
	// contains filtered or unexported fields
}

OffloadService struct for offload API endpoints

func (*OffloadService) ConnectNFSOffload

func (o *OffloadService) ConnectNFSOffload(name string, address string, mountPoint string) (*NFSOffload, error)

ConnectNFSOffload connects array to NFS Offload server

func (*OffloadService) DisconnectNFSOffload

func (o *OffloadService) DisconnectNFSOffload(name string) (*NFSOffload, error)

DisconnectNFSOffload disconnects array from an NFS Offload server

func (*OffloadService) GetNFSOffload

func (o *OffloadService) GetNFSOffload(name string) (*NFSOffload, error)

GetNFSOffload lists NFS offload attributes

type Phonehome

type Phonehome struct {
	Phonehome string `json:"phonehome,omitempty"`
	Status    string `json:"status,omitempty"`
	Action    string `json:"action,omitempty"`
}

Phonehome struct is the information returned by array

type Pod

type Pod struct {
	Name               string   `json:"name,omitempty"`
	Source             string   `json:"source,omitempty"`
	FailoverPreference []string `json:"failover_preference,omitempty"`
}

Pod struct for object returned by array

type PodService

type PodService struct {
	// contains filtered or unexported fields
}

PodService struct for pod API endpoints

func (*PodService) ConnectPod

func (p *PodService) ConnectPod(pod string, array string) (*Pod, error)

ConnectPod Stretches a pod to a peer array

func (*PodService) CreatePod

func (p *PodService) CreatePod(pod string, data interface{}) (*Pod, error)

CreatePod Creates a new pod

func (*PodService) DeletePod

func (p *PodService) DeletePod(pod string) (*Pod, error)

DeletePod deletes a pod

func (*PodService) DisconnectPod

func (p *PodService) DisconnectPod(pod string, array string) (*Pod, error)

DisconnectPod Disconnects a pod frp, a peer array

func (*PodService) EradicatePod

func (p *PodService) EradicatePod(pod string) (*Pod, error)

EradicatePod eradicates a deleted pod

func (*PodService) GetPod

func (p *PodService) GetPod(name string, params map[string]string) (*Pod, error)

GetPod Lists the attributes or displays the performance monitoring details for the specified pod

func (*PodService) ListPods

func (p *PodService) ListPods(params map[string]string) ([]Pod, error)

ListPods Lists the attributes or displays the performance monitoring details for pods

func (*PodService) RecoverPod

func (p *PodService) RecoverPod(pod string) (*Pod, error)

RecoverPod recovers a deleted pod

func (*PodService) RenamePod

func (p *PodService) RenamePod(pod string, name string) (*Pod, error)

RenamePod renames a pod

func (*PodService) SetPod

func (p *PodService) SetPod(pod string, data interface{}) (*Pod, error)

SetPod Modifies a pod

type Port

type Port struct {
	Name     string `json:"name,omitempty"`
	Portal   string `json:"portal,omitempty"`
	Failover string `json:"failover,omitempty"`
	Iqn      string `json:"iqn,omitempty"`
	Wwn      string `json:"wwn,omitempty"`
}

Port struct for object returned by array

type Protectiongroup

type Protectiongroup struct {
	Name               string                   `json:"name,omitempty"`
	Hgroups            []string                 `json:"hgroups,omitempty"`
	Source             string                   `json:"source,omitempty"`
	Hosts              []string                 `json:"hosts,omitempty"`
	Volumes            []string                 `json:"volumes,omitempty"`
	Targets            []map[string]interface{} `json:"targets,omitempty"`
	Allfor             int                      `json:"all_for,omitempty"`
	Allowed            bool                     `json:"allowed,omitempty"`
	Days               int                      `json:"days,omitempty"`
	Perday             int                      `json:"per_day,omitempty"`
	ReplicateAt        int                      `json:"replicate_at,omitempty"`
	ReplicateBlackout  map[string]int           `json:"replicate_blackout,omitempty"`
	ReplicateEnabled   bool                     `json:"replicate_enabled,omitempty"`
	ReplicateFrequency int                      `json:"replicate_frequency,omitempty"`
	SnapAt             int                      `json:"snap_at,omitempty"`
	SnapEnabled        bool                     `json:"snap_enabled,omitempty"`
	SnapFrequency      int                      `json:"snap_frequency,omitempty"`
	TargetAllfor       int                      `json:"target_all_for,omitempty"`
	TargetDays         int                      `json:"target_days,omitempty"`
	TargetPerDay       int                      `json:"target_per_day,omitempty"`
}

Protectiongroup struct for object returned by array

type ProtectiongroupService

type ProtectiongroupService struct {
	// contains filtered or unexported fields
}

ProtectiongroupService struct for pgroup API endpoints

func (*ProtectiongroupService) CreatePgroupSnapshot

func (p *ProtectiongroupService) CreatePgroupSnapshot(pgroup string) (*ProtectiongroupSnapshot, error)

CreatePgroupSnapshot creates a Protection Group Snapshot

func (*ProtectiongroupService) CreatePgroupSnapshots

func (p *ProtectiongroupService) CreatePgroupSnapshots(pgroups []string) ([]ProtectiongroupSnapshot, error)

CreatePgroupSnapshots creates Protection Group snapshots for multiple Protection groups.

func (*ProtectiongroupService) CreateProtectiongroup

func (p *ProtectiongroupService) CreateProtectiongroup(name string, data interface{}) (*Protectiongroup, error)

CreateProtectiongroup creates a Protection group

func (*ProtectiongroupService) DestroyProtectiongroup

func (p *ProtectiongroupService) DestroyProtectiongroup(name string) (*Protectiongroup, error)

DestroyProtectiongroup destroys a Protection group

func (*ProtectiongroupService) DisablePgroupReplication

func (p *ProtectiongroupService) DisablePgroupReplication(pgroup string) (*Protectiongroup, error)

DisablePgroupReplication disables Protection Group Replication

func (*ProtectiongroupService) DisablePgroupSnapshots

func (p *ProtectiongroupService) DisablePgroupSnapshots(pgroup string) (*Protectiongroup, error)

DisablePgroupSnapshots Protection group snapshot schedule

func (*ProtectiongroupService) EnablePgroupReplication

func (p *ProtectiongroupService) EnablePgroupReplication(pgroup string) (*Protectiongroup, error)

EnablePgroupReplication enables Protection Group Replication

func (*ProtectiongroupService) EnablePgroupSnapshots

func (p *ProtectiongroupService) EnablePgroupSnapshots(pgroup string) (*Protectiongroup, error)

EnablePgroupSnapshots enables Protection Group Snapshot schedule

func (*ProtectiongroupService) EradicateProtectiongroup

func (p *ProtectiongroupService) EradicateProtectiongroup(pgroup string) (*Protectiongroup, error)

EradicateProtectiongroup eradicates deleted protection group

func (*ProtectiongroupService) GetProtectiongroup

func (p *ProtectiongroupService) GetProtectiongroup(name string, params map[string]string) (*Protectiongroup, error)

GetProtectiongroup protection group attributes

func (*ProtectiongroupService) ListProtectiongroups

func (p *ProtectiongroupService) ListProtectiongroups(params map[string]string) ([]Protectiongroup, error)

ListProtectiongroups lists attributes of the Protection groups

func (*ProtectiongroupService) RecoverProtectiongroup

func (p *ProtectiongroupService) RecoverProtectiongroup(pgroup string) (*Protectiongroup, error)

RecoverProtectiongroup recovers deleted protection group

func (*ProtectiongroupService) RenameProtectiongroup

func (p *ProtectiongroupService) RenameProtectiongroup(pgroup string, name string) (*Protectiongroup, error)

RenameProtectiongroup renames Protection group

func (*ProtectiongroupService) SendPgroupSnapshot

func (p *ProtectiongroupService) SendPgroupSnapshot(pgroup string) ([]ProtectiongroupSnapshot, error)

SendPgroupSnapshot sends the Protection group snapshot to the target

func (*ProtectiongroupService) SetProtectiongroup

func (p *ProtectiongroupService) SetProtectiongroup(name string, data interface{}) (*Protectiongroup, error)

SetProtectiongroup modifies protection group attributes

type ProtectiongroupSnapshot

type ProtectiongroupSnapshot struct {
	Source  string `json:"source"`
	Name    string `json:"name"`
	Created string `json:"created"`
}

ProtectiongroupSnapshot struct for object returned by array

type PublicKey

type PublicKey struct {
	Publickey string `json:"publickey,omitempty"`
	Type      string `json:"type,omitempty"`
	Name      string `json:"name,omitempty"`
}

PublicKey struct for object returned by array

type RemoteAssist

type RemoteAssist struct {
	Status string `json:"status,omitempty"`
	Name   string `json:"name,omitempty"`
	Port   string `json:"port,omitempty"`
}

RemoteAssist struct for information returned by array

type SMTP

type SMTP struct {
	Password     string `json:"password,omitempty"`
	Username     string `json:"user_name,omitempty"`
	RelayHost    string `json:"relay_host,omitempty"`
	SenderDomain string `json:"sender_domain,omitempty"`
}

SMTP struct for object returned by array

type SMTPService

type SMTPService struct {
	// contains filtered or unexported fields
}

SMTPService struct for smtp API endpoints

func (*SMTPService) GetSMTP

func (s *SMTPService) GetSMTP() (*SMTP, error)

GetSMTP Get the attributes of the current smtp server configuration

func (*SMTPService) SetSMTP

func (s *SMTPService) SetSMTP(data interface{}) (*SMTP, error)

SetSMTP Set the attributes of the current smtp server configuration

type SnmpManager

type SnmpManager struct {
	Name              string `json:"name"`
	Notification      string `json:"notification"`
	Community         string `json:"community"`
	PrivacyProtocol   string `json:"privacy_protocol"`
	AuthProtocol      string `json:"auth_protocol"`
	Host              string `json:"host"`
	Version           string `json:"version"`
	User              string `json:"user"`
	PrivacyPassphrase string `json:"privacy_passphrase"`
	AuthPassphrase    string `json:"auth_passphrase"`
	EngineID          string `json:"engine_id"`
}

SnmpManager struct for object returned by array

type SnmpService

type SnmpService struct {
	// contains filtered or unexported fields
}

SnmpService struct for snmp API endpoints

func (*SnmpService) CreateSnmp

func (s *SnmpService) CreateSnmp(name string, data interface{}) (*SnmpManager, error)

CreateSnmp Creates a Purity SNMP manager object that identifies a host (SNMP manager) and specifies the protocol attributes for communicating with it. Once a manager object is created, the transmission of SNMP traps is immediately enabled.

func (*SnmpService) DeleteSnmp

func (s *SnmpService) DeleteSnmp(name string) (*SnmpManager, error)

DeleteSnmp deletes a SNMP Manager

func (*SnmpService) GetSnmp

func (s *SnmpService) GetSnmp(name string) (*SnmpManager, error)

GetSnmp Lists communication and security attributes for the specified SNMP manager

func (*SnmpService) ListSnmp

func (s *SnmpService) ListSnmp(params map[string]string) ([]SnmpManager, error)

ListSnmp Lists the designated SNMP managers and their communication and security attributes

func (*SnmpService) SetSnmp

func (s *SnmpService) SetSnmp(name string, data interface{}) (*SnmpManager, error)

SetSnmp Modifies a SNMP manager

type Subnet

type Subnet struct {
	Name     string   `json:"name,omitempty"`
	Prefix   string   `json:"prefix,omitempty"`
	Enabled  bool     `json:"enabled,omitempty"`
	Vlan     int      `json:"vlan,omitempty"`
	Gateway  string   `json:"gateway,omitempty"`
	Services []string `json:"services,omitempty"`
	Mtu      int      `json:"mtu,omitempty"`
}

Subnet struct for object returned by array

type Token

type Token struct {
	APIToken string `json:"api_token,omitempty"`
	Created  string `json:"created,omitempty"`
	Expires  string `json:"expires,omitempty"`
	Type     string `json:"type,omitempty"`
	Name     string `json:"name,omitempty"`
}

Token struct for object returned by array

type User

type User struct {
	Name string `json:"name"`
	Role string `json:"role"`
	Type string `json:"type"`
}

User struct for object returned by array

type UserService

type UserService struct {
	// contains filtered or unexported fields
}

UserService struct for user API endpoints

func (*UserService) CreateAPIToken

func (n *UserService) CreateAPIToken(name string) (*Token, error)

CreateAPIToken creates an API Token

func (*UserService) CreateAdmin

func (n *UserService) CreateAdmin(name string) (*User, error)

CreateAdmin creates an Admin

func (*UserService) DeleteAPIToken

func (n *UserService) DeleteAPIToken(name string) (*Token, error)

DeleteAPIToken deletes an API Token

func (*UserService) DeleteAdmin

func (n *UserService) DeleteAdmin(name string) (*User, error)

DeleteAdmin deletes an Admin

func (*UserService) GetAPIToken

func (n *UserService) GetAPIToken(name string) (*Token, error)

GetAPIToken returns an API Token

func (*UserService) GetAdmin

func (n *UserService) GetAdmin(name string) (*User, error)

GetAdmin lists attributes for specified Admin

func (*UserService) GetAdminUser

func (n *UserService) GetAdminUser(name string) (*User, error)

GetAdminUser return a map describing lockout information specified admins

func (*UserService) GetGlobalAdminAttr

func (n *UserService) GetGlobalAdminAttr() (*GlobalAdmin, error)

GetGlobalAdminAttr returns a map describing the existing global admin attributes

func (*UserService) ListAPITokens

func (n *UserService) ListAPITokens() ([]Token, error)

ListAPITokens returns a list of API Tokens

func (*UserService) ListAdminUser

func (n *UserService) ListAdminUser() ([]User, error)

ListAdminUser return a map describing lockout information for locked out admins

func (*UserService) ListAdmins

func (n *UserService) ListAdmins() ([]User, error)

ListAdmins lists attributes for Admins

func (*UserService) ListPublicKeys

func (n *UserService) ListPublicKeys() ([]User, error)

ListPublicKeys returns a list of public keys

func (*UserService) RefreshAdmin

func (n *UserService) RefreshAdmin(name string) (*User, error)

RefreshAdmin refreshes the admin permission cache for the specified admin

func (*UserService) RefreshAdmins

func (n *UserService) RefreshAdmins() (*User, error)

RefreshAdmins clear the admin permission cache.

func (*UserService) SetAdmin

func (n *UserService) SetAdmin(name string, data interface{}) (*User, error)

SetAdmin modifies Admin Attributes

func (*UserService) SetGlobalAdminAttr

func (n *UserService) SetGlobalAdminAttr(data interface{}) (*GlobalAdmin, error)

SetGlobalAdminAttr modifies global admin attributes

func (*UserService) SetPassword

func (n *UserService) SetPassword(name string, newPassword string, oldPassword string) (*User, error)

SetPassword sets the password for the specified admin

func (*UserService) SetPublicKey

func (n *UserService) SetPublicKey(name string, key string) (*User, error)

SetPublicKey modifies public key for the specified admin

func (*UserService) UnlockAdmin

func (n *UserService) UnlockAdmin(name string) (*User, error)

UnlockAdmin unlocks an admin

type Vgroup

type Vgroup struct {
	Name    string   `json:"name"`
	Volumes []string `json:"volumes"`

	// Metrics returned with the action=monitor flag
	WritesPerSec      *int   `json:"writes_per_sec,omitempty"`
	ReadsPerSec       *int   `json:"reads_per_sec,omitempty"`
	UsecPerWriteOp    *int   `json:"usec_per_write_op,omitempty"`
	UsecPerReadOp     *int   `json:"usec_per_read_op,omitempty"`
	SanUsecPerReadOp  *int   `json:"san_usec_per_read_op,omitempty"`
	SanUsecPerWriteOp *int   `json:"san_usec_per_write_op,omitempty"`
	OutputPerSec      *int   `json:"output_per_sec,omitempty"`
	InputPerSec       *int   `json:"input_per_sec,omitempty"`
	Time              string `json:"time,omitempty"`

	// Metrics returned with the space=True flag
	Snapshots        *int     `json:"snapshots,omitempty"`
	DataReduction    *float64 `json:"data_reduction,omitempty"`
	Total            *int     `json:"total,omitempty"`
	ThinProvisioning *float64 `json:"thin_provisioning,omitempty"`
	TotalReduction   *float64 `json:"total_reduction,omitempty"`

	// Metrics returned if action=monitor,size=true
	BytesPerRead  *int `json:"bytes_per_read,omitempty"`
	BytesPerWrite *int `json:"bytes_per_write,omitempty"`
	BytesPerOp    *int `json:"bytes_per_op,omitempty"`
}

Vgroup struct for object returned by array

type VgroupService

type VgroupService struct {
	// contains filtered or unexported fields
}

VgroupService struct for vgroup API endpoints

func (*VgroupService) CreateVgroup

func (v *VgroupService) CreateVgroup(name string) (*Vgroup, error)

CreateVgroup creates a Vgroup

func (*VgroupService) DestroyVgroup

func (v *VgroupService) DestroyVgroup(name string) (*Vgroup, error)

DestroyVgroup destroys a Vgroup

func (*VgroupService) EradicateVgroup

func (v *VgroupService) EradicateVgroup(vgroup string) (*Vgroup, error)

EradicateVgroup eradicates a deleted Vgroup

func (*VgroupService) GetVgroup

func (v *VgroupService) GetVgroup(name string) (*Vgroup, error)

GetVgroup lists Vgroup attributes

func (*VgroupService) ListVgroups

func (v *VgroupService) ListVgroups() ([]Vgroup, error)

ListVgroups lists attributes for Vgroups

func (*VgroupService) RecoverVgroup

func (v *VgroupService) RecoverVgroup(vgroup string) (*Vgroup, error)

RecoverVgroup recovers deleted vgroup

func (*VgroupService) RenameVgroup

func (v *VgroupService) RenameVgroup(vgroup string, name string) (*Vgroup, error)

RenameVgroup renames a vgroup

func (*VgroupService) SetVgroup

func (v *VgroupService) SetVgroup(name string, data interface{}) (*Vgroup, error)

SetVgroup modifies vgroup attribute

type Volume

type Volume struct {
	Name    string `json:"name,omitempty"`
	Source  string `json:"source,omitempty"`
	Serial  string `json:"serial,omitempty"`
	Size    int    `json:"size,omitempty"`
	Created string `json:"created,omitempty"`

	// Metrics returned with the action=monitor flag
	WritesPerSec      *int   `json:"writes_per_sec,omitempty"`
	ReadsPerSec       *int   `json:"reads_per_sec,omitempty"`
	UsecPerWriteOp    *int   `json:"usec_per_write_op,omitempty"`
	UsecPerReadOp     *int   `json:"usec_per_read_op,omitempty"`
	SanUsecPerReadOp  *int   `json:"san_usec_per_read_op,omitempty"`
	SanUsecPerWriteOp *int   `json:"san_usec_per_write_op,omitempty"`
	OutputPerSec      *int   `json:"output_per_sec,omitempty"`
	InputPerSec       *int   `json:"input_per_sec,omitempty"`
	Time              string `json:"time,omitempty"`

	// Metrics returned with the space=True flag
	System           *int     `json:"system,omitempty"`
	Snapshots        *int     `json:"snapshots,omitempty"`
	Volumes          *int     `json:"volumes,omitempty"`
	DataReduction    *float64 `json:"data_reduction,omitempty"`
	Total            *int     `json:"total,omitempty"`
	SharedSpace      *int     `json:"shared_space,omitempty"`
	ThinProvisioning *float64 `json:"thin_provisioning,omitempty"`
	TotalReduction   *float64 `json:"total_reduction,omitempty"`

	// Metrics returned if action=monitor,size=true
	BytesPerRead  *int `json:"bytes_per_read,omitempty"`
	BytesPerWrite *int `json:"bytes_per_write,omitempty"`
	BytesPerOp    *int `json:"bytes_per_op,omitempty"`
}

Volume struct for object returned by array

type VolumePgroup

type VolumePgroup struct {
	Name   string `json:"name"`
	Pgroup string `json:"protection_group"`
}

VolumePgroup struct for object returned by array

type VolumeService

type VolumeService struct {
	// contains filtered or unexported fields
}

VolumeService struct for volume API endpoints

func (*VolumeService) AddVolume

func (v *VolumeService) AddVolume(volume string, pgroup string) (*VolumePgroup, error)

AddVolume adds a volume to a protection group

func (*VolumeService) CopyVolume

func (v *VolumeService) CopyVolume(dest string, source string, overwrite bool) (*Volume, error)

CopyVolume clones a volume and return a dictionary describing the new volume.

func (*VolumeService) CreateConglomerateVolume

func (v *VolumeService) CreateConglomerateVolume(name string) (*Volume, error)

CreateConglomerateVolume creates a conglomerate volume. This is not a typical volume thus there is no size. It's main purpose to connect to a host/hgroup to create a PE LUN. Once the conglomerate volume is connected to a host/hgroup, it is used as a protocol-endpoint to connect a vvol to a host/hgroup to allow traffic.

func (*VolumeService) CreateSnapshot

func (v *VolumeService) CreateSnapshot(volume string, suffix string) (*Volume, error)

CreateSnapshot function creates a volume snapshot of the volume passed in the argument.

func (*VolumeService) CreateSnapshots

func (v *VolumeService) CreateSnapshots(volumes []string, suffix string) ([]Volume, error)

CreateSnapshots function will create a snapshot of all the volumes passed in the volumes slice. an array of volume objects is returned.

func (*VolumeService) CreateVolume

func (v *VolumeService) CreateVolume(name string, size int) (*Volume, error)

CreateVolume function will create a volume of the given size. The size is an integer in bytes

func (*VolumeService) DeleteVolume

func (v *VolumeService) DeleteVolume(name string) (*Volume, error)

DeleteVolume deletes an existing volume or snapshot

func (*VolumeService) EradicateVolume

func (v *VolumeService) EradicateVolume(name string) (*Volume, error)

EradicateVolume eradicates a deleted volume or snapshot

func (*VolumeService) ExtendVolume

func (v *VolumeService) ExtendVolume(name string, size int) (*Volume, error)

ExtendVolume increases the size of the volume

func (*VolumeService) GetVolume

func (v *VolumeService) GetVolume(name string, params map[string]string) (*Volume, error)

GetVolume lists attributes of the specified volume

func (*VolumeService) ListVolumeBlockDiff

func (v *VolumeService) ListVolumeBlockDiff(name string, params map[string]string) ([]Block, error)

ListVolumeBlockDiff lists Volume Block Differences

func (*VolumeService) ListVolumePrivateConnections

func (v *VolumeService) ListVolumePrivateConnections(name string) ([]Connection, error)

ListVolumePrivateConnections lists Volume Private Connections

func (*VolumeService) ListVolumeSharedConnections

func (v *VolumeService) ListVolumeSharedConnections(name string) ([]Connection, error)

ListVolumeSharedConnections lists Volume Shared Connections

func (*VolumeService) ListVolumes

func (v *VolumeService) ListVolumes(params map[string]string) ([]Volume, error)

ListVolumes lists attributes for volumes

func (*VolumeService) MonitorVolume

func (v *VolumeService) MonitorVolume(name string, params map[string]string) ([]Volume, error)

MonitorVolume returns metrics of the specified volume. This is similar to GetVolume when params = {"action": "monitor"}, but that endpoint returns an array instead of a single Volume struct.

func (*VolumeService) MoveVolume

func (v *VolumeService) MoveVolume(name string, container string) (*Volume, error)

MoveVolume moves a volume to a different container

func (*VolumeService) RecoverVolume

func (v *VolumeService) RecoverVolume(volume string) (*Volume, error)

RecoverVolume recovers a deleted volume

func (*VolumeService) RemoveVolume

func (v *VolumeService) RemoveVolume(volume string, pgroup string) (*VolumePgroup, error)

RemoveVolume removes a volume from a protection group

func (*VolumeService) RenameVolume

func (v *VolumeService) RenameVolume(volume string, name string) (*Volume, error)

RenameVolume renames a volume

func (*VolumeService) SetVolume

func (v *VolumeService) SetVolume(name string, data interface{}) (*Volume, error)

SetVolume is a helper function that sets the parameter passed in the data interface of the volume in the name argument. A Volume object is returned with the new values.

func (*VolumeService) TruncateVolume

func (v *VolumeService) TruncateVolume(name string, size int) (*Volume, error)

TruncateVolume decreses the size of a volume WARNING!! Potential data loss

Jump to

Keyboard shortcuts

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