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 ¶
- type ApiToken
- type Array
- type ArrayConnection
- type ArrayService
- func (v *ArrayService) DisablePhoneHome() (*Phonehome, error)
- func (v *ArrayService) DisableRemoteAssist() (*RemoteAssist, error)
- func (v *ArrayService) EnablePhoneHome() (*Phonehome, error)
- func (v *ArrayService) EnableRemoteAssist() (*RemoteAssist, error)
- func (v *ArrayService) Get(data interface{}) (*Array, error)
- func (v *ArrayService) GetManualPhoneHome() (*Phonehome, error)
- func (v *ArrayService) GetPhoneHome() (*Array, error)
- func (v *ArrayService) GetRemoteAssist() (*RemoteAssist, error)
- func (v *ArrayService) Phonehome(action string) (*Phonehome, error)
- func (v *ArrayService) Rename(name string) (*Array, error)
- func (v *ArrayService) Set(data interface{}) (*Array, error)
- type CSR
- type Certificate
- type Client
- type Component
- type ConnectedVolume
- type Console_lock
- type DNS
- type Dirsrv
- type DirsrvRole
- type DirsrvService
- func (n *DirsrvService) DisableDirectoryService(check_peer bool) (*Dirsrv, error)
- func (n *DirsrvService) EnableDirectoryService(check_peer bool) (*Dirsrv, error)
- func (n *DirsrvService) GetDirectoryService() (*Dirsrv, error)
- func (n *DirsrvService) ListDirectoryServiceRoles() ([]DirsrvRole, error)
- func (n *DirsrvService) SetDirectoryService(data interface{}) (*Dirsrv, error)
- func (n *DirsrvService) SetDirectoryServiceRoles(data interface{}) (*DirsrvRole, error)
- func (n *DirsrvService) TestDirectoryService() (*DirsrvTest, error)
- type DirsrvTest
- type Drive
- type GlobalAdmin
- type HardwareService
- func (n *HardwareService) GetDrive(name string) (*Drive, error)
- func (n *HardwareService) GetHardware(name string) (*Component, error)
- func (n *HardwareService) ListDrives() ([]Drive, error)
- func (n *HardwareService) ListHardware() ([]Component, error)
- func (n *HardwareService) SetHardware(name string, data interface{}) (*Component, error)
- type Host
- type HostPgroup
- type HostService
- func (h *HostService) AddHost(host string, pgroup string) (*HostPgroup, error)
- func (h *HostService) ConnectHost(host string, volume string) (*ConnectedVolume, error)
- func (h *HostService) CreateHost(name string, data interface{}) (*Host, error)
- func (h *HostService) DeleteHost(name string) (*Host, error)
- func (h *HostService) DisconnectHost(host string, volume string) (*ConnectedVolume, error)
- func (h *HostService) GetHost(name string) (*Host, error)
- func (h *HostService) ListHostConnections(host string) ([]ConnectedVolume, error)
- func (h *HostService) ListHosts() ([]Host, error)
- func (h *HostService) RemoveHost(host string, pgroup string) (*HostPgroup, error)
- func (h *HostService) RenameHost(host string, name string) (*Host, error)
- func (h *HostService) SetHost(name string, data interface{}) (*Host, error)
- type Hostgroup
- type HostgroupConnection
- type HostgroupPgroup
- type HostgroupService
- func (h *HostgroupService) AddHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)
- func (h *HostgroupService) ConnectHostgroup(hgroup string, volume string) (*ConnectedVolume, error)
- func (h *HostgroupService) CreateHostgroup(name string, data interface{}) (*Hostgroup, error)
- func (h *HostgroupService) DeleteHostgroup(name string) (*Hostgroup, error)
- func (h *HostgroupService) DisconnectHostgroup(hgroup string, volume string) (*ConnectedVolume, error)
- func (h *HostgroupService) GetHostgroup(name string) (*Hostgroup, error)
- func (h *HostgroupService) ListHostgroupConnections(hgroup string) ([]HostgroupConnection, error)
- func (h *HostgroupService) ListHostgroups() ([]Hostgroup, error)
- func (h *HostgroupService) RemoveHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)
- func (h *HostgroupService) RenameHostgroup(hgroup string, name string) (*Hostgroup, error)
- func (h *HostgroupService) SetHostgroup(name string, data interface{}) (*Hostgroup, error)
- type LockoutInfo
- type NFSOffload
- type NetworkInterface
- type NetworkService
- func (n *NetworkService) CreateSubnet(subnet string, prefix string) (*Subnet, error)
- func (n *NetworkService) CreateVlanInterface(iface string, subnet string) (*NetworkInterface, error)
- func (n *NetworkService) DeleteSubnet(subnet string) (*Subnet, error)
- func (n *NetworkService) DeleteVlanInterface(iface string) (*NetworkInterface, error)
- func (n *NetworkService) DisableNetworkInterface(iface string) (*NetworkInterface, error)
- func (n *NetworkService) DisableSubnet(subnet string) (*Subnet, error)
- func (n *NetworkService) EnableNetworkInterface(iface string) (*NetworkInterface, error)
- func (n *NetworkService) EnableSubnet(subnet string) (*Subnet, error)
- func (n *NetworkService) GetDNS() (*DNS, error)
- func (n *NetworkService) GetNetworkInterface(iface string) (*NetworkInterface, error)
- func (n *NetworkService) GetSubnet(subnet string) (*Subnet, error)
- func (n *NetworkService) ListNetworkInterfaces() ([]NetworkInterface, error)
- func (n *NetworkService) ListPorts(data interface{}) ([]Port, error)
- func (n *NetworkService) ListSubnets() ([]Subnet, error)
- func (n *NetworkService) RenameSubnet(subnet string, name string) (*Subnet, error)
- func (n *NetworkService) SetDNS(data interface{}) (*DNS, error)
- func (n *NetworkService) SetNetworkInterface(iface string, data interface{}) (*NetworkInterface, error)
- func (n *NetworkService) SetSubnet(subnet string, data interface{}) (*Subnet, error)
- type OffloadService
- type Phonehome
- type Port
- type Protectiongroup
- type ProtectiongroupService
- func (v *ProtectiongroupService) CreatePgroupSnapshot(pgroup string) (*ProtectiongroupSnapshot, error)
- func (v *ProtectiongroupService) CreatePgroupSnapshots(pgroups []string) ([]ProtectiongroupSnapshot, error)
- func (h *ProtectiongroupService) CreateProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
- func (h *ProtectiongroupService) DestroyProtectiongroup(name string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) DisablePgroupReplication(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) DisablePgroupSnapshots(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) EnablePgroupReplication(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) EnablePgroupSnapshots(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) EradicateProtectiongroup(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) GetProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
- func (h *ProtectiongroupService) ListProtectiongroups() ([]Protectiongroup, error)
- func (h *ProtectiongroupService) RecoverProtectiongroup(pgroup string) (*Protectiongroup, error)
- func (h *ProtectiongroupService) RenameProtectiongroup(pgroup string, name string) (*Protectiongroup, error)
- func (v *ProtectiongroupService) SendPgroupSnapshot(pgroup string) ([]ProtectiongroupSnapshot, error)
- func (h *ProtectiongroupService) SetProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
- type ProtectiongroupSnapshot
- type PublicKey
- type RemoteAssist
- type SnmpEngine
- type SnmpManager
- type Subnet
- type User
- type UserService
- func (n *UserService) CreateAdmin(name string) (*User, error)
- func (n *UserService) CreateApiToken(name string) (*ApiToken, error)
- func (n *UserService) DeleteAdmin(name string) (*User, error)
- func (n *UserService) DeleteApiToken(name string) (*ApiToken, error)
- func (n *UserService) GetAdmin(name string) (*User, error)
- func (n *UserService) GetAdminUser(name string) (*User, error)
- func (n *UserService) GetGlobalAdminAttr() (*GlobalAdmin, error)
- func (n *UserService) ListAdminUser() ([]User, error)
- func (n *UserService) ListAdmins() ([]User, error)
- func (n *UserService) ListApiTokens() ([]User, error)
- func (n *UserService) ListPublicKeys() ([]User, error)
- func (n *UserService) RefreshAdmin(name string) (*User, error)
- func (n *UserService) RefreshAdmins() (*User, error)
- func (n *UserService) SetAdmin(name string, data interface{}) (*User, error)
- func (n *UserService) SetGlobalAdminAttr(data interface{}) (*GlobalAdmin, error)
- func (n *UserService) SetPassword(name string, new_password string, old_password string) (*User, error)
- func (n *UserService) SetPublicKey(name string, key string) (*User, error)
- func (n *UserService) UnlockAdmin(name string) (*User, error)
- type Vgroup
- type VgroupService
- func (h *VgroupService) CreateVgroup(name string) (*Vgroup, error)
- func (h *VgroupService) DestroyVgroup(name string) (*Vgroup, error)
- func (h *VgroupService) EradicateVgroup(vgroup string) (*Vgroup, error)
- func (h *VgroupService) GetVgroup(name string) (*Vgroup, error)
- func (h *VgroupService) ListVgroups() ([]Vgroup, error)
- func (h *VgroupService) RecoverVgroup(vgroup string) (*Vgroup, error)
- func (h *VgroupService) RenameVgroup(vgroup string, name string) (*Vgroup, error)
- func (h *VgroupService) SetVgroup(name string, data interface{}) (*Vgroup, error)
- type Volume
- type VolumePgroup
- type VolumeService
- func (v *VolumeService) AddVolume(volume string, pgroup string) (*VolumePgroup, error)
- func (v *VolumeService) CopyVolume(dest string, source string, overwrite bool) (*Volume, error)
- func (v *VolumeService) CreateConglomerateVolume(name string) (*Volume, error)
- func (v *VolumeService) CreateSnapshot(volume string, suffix string) (*Volume, error)
- func (v *VolumeService) CreateSnapshots(volumes []string, suffix string) ([]Volume, error)
- func (v *VolumeService) CreateVolume(name string, size int) (*Volume, error)
- func (v *VolumeService) DeleteVolume(name string) (*Volume, error)
- func (v *VolumeService) EradicateVolume(name string) (*Volume, error)
- func (v *VolumeService) ExtendVolume(name string, size int) (*Volume, error)
- func (v *VolumeService) GetVolume(name string) (*Volume, error)
- func (v *VolumeService) ListVolumeBlockDiff() error
- func (v *VolumeService) ListVolumePrivateConnections() error
- func (v *VolumeService) ListVolumeSharedConnections() error
- func (v *VolumeService) ListVolumes(data interface{}) ([]Volume, error)
- func (v *VolumeService) MoveVolume(name string, container string) (*Volume, error)
- func (v *VolumeService) RecoverVolume(volume string) (*Volume, error)
- func (v *VolumeService) RemoveVolume(volume string, pgroup string) (*VolumePgroup, error)
- func (v *VolumeService) RenameVolume(volume string, name string) (*Volume, error)
- func (v *VolumeService) SetVolume(name string, data interface{}) (*Volume, error)
- func (v *VolumeService) TruncateVolume(name string, size int) (*Volume, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Array ¶
type Array struct {
Id string `json:"id,omitempty"`
Array_name string `json:"array_name,omitempty"`
Version string `json:"version,omitempty"`
Revision string `json:"revision,omitempty"`
}
type Array gives information about the array
type ArrayConnection ¶
type ArrayConnection struct {
Throttled bool `json:"throttled"`
Array_name string `json:"array_name"`
Version string `json:"version"`
Connected bool `json:"connected"`
Management_address string `json:"management_address"`
Replication_address string `json:"replication_address"`
Type []string `json:"type"`
Id string `json:"id"`
}
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) DisablePhoneHome ¶
func (v *ArrayService) DisablePhoneHome() (*Phonehome, error)
Disable hourly phonehome
func (*ArrayService) DisableRemoteAssist ¶
func (v *ArrayService) DisableRemoteAssist() (*RemoteAssist, error)
Disable Remote Assist
func (*ArrayService) EnablePhoneHome ¶
func (v *ArrayService) EnablePhoneHome() (*Phonehome, error)
Enable hourly phonehome
func (*ArrayService) EnableRemoteAssist ¶
func (v *ArrayService) EnableRemoteAssist() (*RemoteAssist, error)
Enable Remote Assist
func (*ArrayService) Get ¶
func (v *ArrayService) Get(data interface{}) (*Array, error)
Get returns and object describing the flash array
func (*ArrayService) GetManualPhoneHome ¶
func (v *ArrayService) GetManualPhoneHome() (*Phonehome, error)
Get manual phone home status
func (*ArrayService) GetPhoneHome ¶
func (v *ArrayService) GetPhoneHome() (*Array, error)
Get Phonehome status
func (*ArrayService) GetRemoteAssist ¶
func (v *ArrayService) GetRemoteAssist() (*RemoteAssist, error)
Get Remote Status
func (*ArrayService) Phonehome ¶
func (v *ArrayService) Phonehome(action string) (*Phonehome, error)
Manually initiate or cancel 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 Certificate ¶
type Certificate struct {
Status string `json:"status"`
Issued_to string `json:"issued_to"`
Valid_from string `json:"valid_from"`
Name string `json:"name"`
Locality string `json:"locality"`
Country string `json:"country"`
Issued_by string `json:"issued_by"`
Valid_to string `json:"valid_to"`
State string `json:"state"`
Key_size int `json:"key_size"`
Org_unit string `json:"organizational_unit"`
Org string `json:"organization"`
Email string `json:"email"`
}
type Client ¶
type Client struct {
Target string
Username string
Password string
Api_token string
Rest_version string
User_agent string
Request_kwargs 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
// contains filtered or unexported fields
}
Type Client represents a Pure Storage FlashArray and exposes administrative APIs.
func NewClient ¶
func NewClient(target string, username string, password string, api_token string, rest_version string, verify_https bool, ssl_cert bool, user_agent string, request_kwargs 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 (pc *Client) Do(req *http.Request, v interface{}, reestablish_session 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 ConnectedVolume ¶
type Console_lock ¶
type Console_lock struct {
Console_lock string `json:"console_lock"`
}
type console_lock describes the console_lock status of the array.
type DirsrvRole ¶
type DirsrvService ¶
type DirsrvService struct {
// contains filtered or unexported fields
}
func (*DirsrvService) DisableDirectoryService ¶
func (n *DirsrvService) DisableDirectoryService(check_peer bool) (*Dirsrv, error)
Disable Directory Service if check_peer is true, enables server authenticity enforcement
func (*DirsrvService) EnableDirectoryService ¶
func (n *DirsrvService) EnableDirectoryService(check_peer bool) (*Dirsrv, error)
Enable Directory Service if check_peer is true, enables server authenticity enforcement
func (*DirsrvService) GetDirectoryService ¶
func (n *DirsrvService) GetDirectoryService() (*Dirsrv, error)
Get Directory Service Attributes
func (*DirsrvService) ListDirectoryServiceRoles ¶
func (n *DirsrvService) ListDirectoryServiceRoles() ([]DirsrvRole, error)
Get directory service groups for roles
func (*DirsrvService) SetDirectoryService ¶
func (n *DirsrvService) SetDirectoryService(data interface{}) (*Dirsrv, error)
Set Directory Service Attributes
func (*DirsrvService) SetDirectoryServiceRoles ¶
func (n *DirsrvService) SetDirectoryServiceRoles(data interface{}) (*DirsrvRole, error)
Set directory service groups for roles
func (*DirsrvService) TestDirectoryService ¶
func (n *DirsrvService) TestDirectoryService() (*DirsrvTest, error)
Test the directory service
type DirsrvTest ¶
type DirsrvTest struct {
Output string `json:"output"`
}
type GlobalAdmin ¶
type GlobalAdmin struct {
}
type HardwareService ¶
type HardwareService struct {
// contains filtered or unexported fields
}
func (*HardwareService) GetDrive ¶
func (n *HardwareService) GetDrive(name string) (*Drive, error)
Get Drive attributes
func (*HardwareService) GetHardware ¶
func (n *HardwareService) GetHardware(name string) (*Component, error)
Get Hardware attributes
func (*HardwareService) ListDrives ¶
func (n *HardwareService) ListDrives() ([]Drive, error)
List Drives
func (*HardwareService) ListHardware ¶
func (n *HardwareService) ListHardware() ([]Component, error)
List Hardware
func (*HardwareService) SetHardware ¶
func (n *HardwareService) SetHardware(name string, data interface{}) (*Component, error)
Set hardware attributes
type HostPgroup ¶
type HostService ¶
type HostService struct {
// contains filtered or unexported fields
}
func (*HostService) AddHost ¶
func (h *HostService) AddHost(host string, pgroup string) (*HostPgroup, error)
Add a host to a protection group
func (*HostService) ConnectHost ¶
func (h *HostService) ConnectHost(host string, volume string) (*ConnectedVolume, error)
Connect a volume to a host
func (*HostService) CreateHost ¶
func (h *HostService) CreateHost(name string, data interface{}) (*Host, error)
Create a new host
func (*HostService) DeleteHost ¶
func (h *HostService) DeleteHost(name string) (*Host, error)
Delete a host
func (*HostService) DisconnectHost ¶
func (h *HostService) DisconnectHost(host string, volume string) (*ConnectedVolume, error)
Disconnect a volume from a host
func (*HostService) GetHost ¶
func (h *HostService) GetHost(name string) (*Host, error)
Return the attributes of the given host
func (*HostService) ListHostConnections ¶
func (h *HostService) ListHostConnections(host string) ([]ConnectedVolume, error)
The the host connections
func (*HostService) RemoveHost ¶
func (h *HostService) RemoveHost(host string, pgroup string) (*HostPgroup, error)
Remove a host from a protection group
func (*HostService) RenameHost ¶
func (h *HostService) RenameHost(host string, name string) (*Host, error)
Rename a host
type HostgroupConnection ¶
type HostgroupPgroup ¶
type HostgroupService ¶
type HostgroupService struct {
// contains filtered or unexported fields
}
func (*HostgroupService) AddHostgroup ¶
func (h *HostgroupService) AddHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)
Add a hostgroup to a Protection Group
func (*HostgroupService) ConnectHostgroup ¶
func (h *HostgroupService) ConnectHostgroup(hgroup string, volume string) (*ConnectedVolume, error)
Connect a Volume to a hostgroup
func (*HostgroupService) CreateHostgroup ¶
func (h *HostgroupService) CreateHostgroup(name string, data interface{}) (*Hostgroup, error)
Create a new hostgroup
func (*HostgroupService) DeleteHostgroup ¶
func (h *HostgroupService) DeleteHostgroup(name string) (*Hostgroup, error)
Delete a hostgroup
func (*HostgroupService) DisconnectHostgroup ¶
func (h *HostgroupService) DisconnectHostgroup(hgroup string, volume string) (*ConnectedVolume, error)
Disconnect a volume from a hostgroup
func (*HostgroupService) GetHostgroup ¶
func (h *HostgroupService) GetHostgroup(name string) (*Hostgroup, error)
Return a map of the hostgroup attributes
func (*HostgroupService) ListHostgroupConnections ¶
func (h *HostgroupService) ListHostgroupConnections(hgroup string) ([]HostgroupConnection, error)
List the hostgroup connections
func (*HostgroupService) ListHostgroups ¶
func (h *HostgroupService) ListHostgroups() ([]Hostgroup, error)
List hostgroups
func (*HostgroupService) RemoveHostgroup ¶
func (h *HostgroupService) RemoveHostgroup(hgroup string, pgroup string) (*HostgroupPgroup, error)
Remove a hostgroup from a protection group.
func (*HostgroupService) RenameHostgroup ¶
func (h *HostgroupService) RenameHostgroup(hgroup string, name string) (*Hostgroup, error)
Rename a hostgroup
func (*HostgroupService) SetHostgroup ¶
func (h *HostgroupService) SetHostgroup(name string, data interface{}) (*Hostgroup, error)
Set the hostgroup attributes
type LockoutInfo ¶
type LockoutInfo struct {
}
type NFSOffload ¶
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"`
}
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func (*NetworkService) CreateSubnet ¶
func (n *NetworkService) CreateSubnet(subnet string, prefix string) (*Subnet, error)
Create 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)
Create 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)
Delete a subnet param: subnet - Name of subnet to be deleted
func (*NetworkService) DeleteVlanInterface ¶
func (n *NetworkService) DeleteVlanInterface(iface string) (*NetworkInterface, error)
Delete a VLAN Interface param: iface - Name of iface to be deleted
func (*NetworkService) DisableNetworkInterface ¶
func (n *NetworkService) DisableNetworkInterface(iface string) (*NetworkInterface, error)
Disable 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)
Disable 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)
Enable 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)
Enable a subnet param: subnet: Name of subnet to be enabled. Returns an object describing the subnet
func (*NetworkService) GetNetworkInterface ¶
func (n *NetworkService) GetNetworkInterface(iface string) (*NetworkInterface, error)
Get network interface attributes
func (*NetworkService) GetSubnet ¶
func (n *NetworkService) GetSubnet(subnet string) (*Subnet, error)
Get subnet attributes
func (*NetworkService) ListNetworkInterfaces ¶
func (n *NetworkService) ListNetworkInterfaces() ([]NetworkInterface, error)
List network interfaces
func (*NetworkService) ListPorts ¶
func (n *NetworkService) ListPorts(data interface{}) ([]Port, error)
List ports
func (*NetworkService) ListSubnets ¶
func (n *NetworkService) ListSubnets() ([]Subnet, error)
List Subnets
func (*NetworkService) RenameSubnet ¶
func (n *NetworkService) RenameSubnet(subnet string, name string) (*Subnet, error)
Rename 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)
Set DNS settings
func (*NetworkService) SetNetworkInterface ¶
func (n *NetworkService) SetNetworkInterface(iface string, data interface{}) (*NetworkInterface, error)
Set network interface attributes
type OffloadService ¶
type OffloadService struct {
// contains filtered or unexported fields
}
func (*OffloadService) ConnectNFSOffload ¶
func (o *OffloadService) ConnectNFSOffload(name string, address string, mount_point string) (*NFSOffload, error)
Connect to NFS Offload
func (*OffloadService) DisconnectNFSOffload ¶
func (o *OffloadService) DisconnectNFSOffload(name string) (*NFSOffload, error)
Disconnect an NFS Offload
func (*OffloadService) GetNFSOffload ¶
func (o *OffloadService) GetNFSOffload(name string) (*NFSOffload, error)
Get NFS offload attributes
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 []string `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"`
}
type ProtectiongroupService ¶
type ProtectiongroupService struct {
// contains filtered or unexported fields
}
func (*ProtectiongroupService) CreatePgroupSnapshot ¶
func (v *ProtectiongroupService) CreatePgroupSnapshot(pgroup string) (*ProtectiongroupSnapshot, error)
Create a Protection Group Snapshot
func (*ProtectiongroupService) CreatePgroupSnapshots ¶
func (v *ProtectiongroupService) CreatePgroupSnapshots(pgroups []string) ([]ProtectiongroupSnapshot, error)
Create Protection Group snapshots for multiple Protection groups.
func (*ProtectiongroupService) CreateProtectiongroup ¶
func (h *ProtectiongroupService) CreateProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
Create a Protection group
func (*ProtectiongroupService) DestroyProtectiongroup ¶
func (h *ProtectiongroupService) DestroyProtectiongroup(name string) (*Protectiongroup, error)
Destroy Protection group
func (*ProtectiongroupService) DisablePgroupReplication ¶
func (h *ProtectiongroupService) DisablePgroupReplication(pgroup string) (*Protectiongroup, error)
Disable Protection Group Replication
func (*ProtectiongroupService) DisablePgroupSnapshots ¶
func (h *ProtectiongroupService) DisablePgroupSnapshots(pgroup string) (*Protectiongroup, error)
Disable Protection group snapshot schedule
func (*ProtectiongroupService) EnablePgroupReplication ¶
func (h *ProtectiongroupService) EnablePgroupReplication(pgroup string) (*Protectiongroup, error)
Enable Protection Group Replication
func (*ProtectiongroupService) EnablePgroupSnapshots ¶
func (h *ProtectiongroupService) EnablePgroupSnapshots(pgroup string) (*Protectiongroup, error)
Enable Protection Group Snapshot schedule
func (*ProtectiongroupService) EradicateProtectiongroup ¶
func (h *ProtectiongroupService) EradicateProtectiongroup(pgroup string) (*Protectiongroup, error)
Eradicate deleted protection group
func (*ProtectiongroupService) GetProtectiongroup ¶
func (h *ProtectiongroupService) GetProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
Get protection group attributes
func (*ProtectiongroupService) ListProtectiongroups ¶
func (h *ProtectiongroupService) ListProtectiongroups() ([]Protectiongroup, error)
List Protection groups
func (*ProtectiongroupService) RecoverProtectiongroup ¶
func (h *ProtectiongroupService) RecoverProtectiongroup(pgroup string) (*Protectiongroup, error)
Recover deleted protection group
func (*ProtectiongroupService) RenameProtectiongroup ¶
func (h *ProtectiongroupService) RenameProtectiongroup(pgroup string, name string) (*Protectiongroup, error)
Rename Protection group
func (*ProtectiongroupService) SendPgroupSnapshot ¶
func (v *ProtectiongroupService) SendPgroupSnapshot(pgroup string) ([]ProtectiongroupSnapshot, error)
Send the Protection group snapshot to the target
func (*ProtectiongroupService) SetProtectiongroup ¶
func (h *ProtectiongroupService) SetProtectiongroup(name string, data interface{}) (*Protectiongroup, error)
Set protection group attributes
type ProtectiongroupSnapshot ¶
type RemoteAssist ¶
type SnmpEngine ¶
type SnmpEngine struct {
Engine_id string `json:"engine_id"`
}
type SnmpManager ¶
type SnmpManager struct {
Name string `json:"name"`
Notification string `json:"notification"`
Community string `json:"community"`
Privacy_protocol string `json:"privacy_protocol"`
Auth_protocol string `json:"auth_protocol"`
Host string `json:"host"`
Version string `json:"version"`
User string `json:"user"`
Privacy_passphrase string `json:"privacy_passphrase"`
Auth_passphrase string `json:"auth_passphrase"`
}
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func (*UserService) CreateAdmin ¶
func (n *UserService) CreateAdmin(name string) (*User, error)
Create Admin
func (*UserService) CreateApiToken ¶
func (n *UserService) CreateApiToken(name string) (*ApiToken, error)
Create API Token
func (*UserService) DeleteAdmin ¶
func (n *UserService) DeleteAdmin(name string) (*User, error)
Delete Admin
func (*UserService) DeleteApiToken ¶
func (n *UserService) DeleteApiToken(name string) (*ApiToken, error)
Delete API Token
func (*UserService) GetAdminUser ¶
func (n *UserService) GetAdminUser(name string) (*User, error)
Return a map describing lockout information specified admins
func (*UserService) GetGlobalAdminAttr ¶
func (n *UserService) GetGlobalAdminAttr() (*GlobalAdmin, error)
Return a map describing the existing global admin attributes
func (*UserService) ListAdminUser ¶
func (n *UserService) ListAdminUser() ([]User, error)
Return a map describing lockout information for locked out admins
func (*UserService) ListApiTokens ¶
func (n *UserService) ListApiTokens() ([]User, error)
Return a list of API Tokens
func (*UserService) ListPublicKeys ¶
func (n *UserService) ListPublicKeys() ([]User, error)
Return a list of public keys
func (*UserService) RefreshAdmin ¶
func (n *UserService) RefreshAdmin(name string) (*User, error)
Refresh the admin permission cache for the specified admin
func (*UserService) RefreshAdmins ¶
func (n *UserService) RefreshAdmins() (*User, error)
Clear the admin permission cache.
func (*UserService) SetAdmin ¶
func (n *UserService) SetAdmin(name string, data interface{}) (*User, error)
Set Admin Attribute
func (*UserService) SetGlobalAdminAttr ¶
func (n *UserService) SetGlobalAdminAttr(data interface{}) (*GlobalAdmin, error)
Set global admin attributes
func (*UserService) SetPassword ¶
func (n *UserService) SetPassword(name string, new_password string, old_password string) (*User, error)
Set the password for the specified admin
func (*UserService) SetPublicKey ¶
func (n *UserService) SetPublicKey(name string, key string) (*User, error)
Set public key for the specified admin
func (*UserService) UnlockAdmin ¶
func (n *UserService) UnlockAdmin(name string) (*User, error)
Unlocks an admin
type VgroupService ¶
type VgroupService struct {
// contains filtered or unexported fields
}
func (*VgroupService) CreateVgroup ¶
func (h *VgroupService) CreateVgroup(name string) (*Vgroup, error)
Create Vgroup
func (*VgroupService) DestroyVgroup ¶
func (h *VgroupService) DestroyVgroup(name string) (*Vgroup, error)
Destroy Vgroup
func (*VgroupService) EradicateVgroup ¶
func (h *VgroupService) EradicateVgroup(vgroup string) (*Vgroup, error)
Eradicate Vgroup
func (*VgroupService) GetVgroup ¶
func (h *VgroupService) GetVgroup(name string) (*Vgroup, error)
Get Vgroup attributes
func (*VgroupService) ListVgroups ¶
func (h *VgroupService) ListVgroups() ([]Vgroup, error)
List Vgroups
func (*VgroupService) RecoverVgroup ¶
func (h *VgroupService) RecoverVgroup(vgroup string) (*Vgroup, error)
Recover deleted vgroup
func (*VgroupService) RenameVgroup ¶
func (h *VgroupService) RenameVgroup(vgroup string, name string) (*Vgroup, error)
Rename vgroup
type VolumePgroup ¶
type VolumeService ¶
type VolumeService struct {
// contains filtered or unexported fields
}
func (*VolumeService) AddVolume ¶
func (v *VolumeService) AddVolume(volume string, pgroup string) (*VolumePgroup, error)
Add a volume to a protection group
func (*VolumeService) CopyVolume ¶
Clone a volume and return a dictionary describing the new volume.
func (*VolumeService) CreateConglomerateVolume ¶
func (v *VolumeService) CreateConglomerateVolume(name string) (*Volume, error)
Create 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)
CreateSnapshosts 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)
Delete an existing volume or snapshot
func (*VolumeService) EradicateVolume ¶
func (v *VolumeService) EradicateVolume(name string) (*Volume, error)
Eradicate a deleted volume or snapshot
func (*VolumeService) ExtendVolume ¶
func (v *VolumeService) ExtendVolume(name string, size int) (*Volume, error)
Extend the size of the volume
func (*VolumeService) GetVolume ¶
func (v *VolumeService) GetVolume(name string) (*Volume, error)
Get volume attributes
func (*VolumeService) ListVolumeBlockDiff ¶
func (v *VolumeService) ListVolumeBlockDiff() error
List Volume Block Differences not implemented yet
func (*VolumeService) ListVolumePrivateConnections ¶
func (v *VolumeService) ListVolumePrivateConnections() error
List Volume Private Connections not implemented yet
func (*VolumeService) ListVolumeSharedConnections ¶
func (v *VolumeService) ListVolumeSharedConnections() error
List volume shared connections.
func (*VolumeService) ListVolumes ¶
func (v *VolumeService) ListVolumes(data interface{}) ([]Volume, error)
List volumes
func (*VolumeService) MoveVolume ¶
func (v *VolumeService) MoveVolume(name string, container string) (*Volume, error)
Move a volume to a different container
func (*VolumeService) RecoverVolume ¶
func (v *VolumeService) RecoverVolume(volume string) (*Volume, error)
Recover a deleted volume
func (*VolumeService) RemoveVolume ¶
func (v *VolumeService) RemoveVolume(volume string, pgroup string) (*VolumePgroup, error)
Remove a volume from a protection group
func (*VolumeService) RenameVolume ¶
func (v *VolumeService) RenameVolume(volume string, name string) (*Volume, error)
Rename a volume
func (*VolumeService) SetVolume ¶
func (v *VolumeService) SetVolume(name string, data interface{}) (*Volume, error)
function 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)
Decrese the size of a volume WARNING!! Potential data loss
Source Files
¶
- array.go
- arrayTypes.go
- certTypes.go
- dirsrv.go
- dirsrvTypes.go
- flasharray.go
- hardware.go
- hardwareTypes.go
- hgroup.go
- hgroupTypes.go
- host.go
- hostTypes.go
- network.go
- networkTypes.go
- offload.go
- offloadTypes.go
- pgroup.go
- pgroupTypes.go
- smtpTypes.go
- snmpTypes.go
- user.go
- userTypes.go
- vgroup.go
- vgroupTypes.go
- volume.go
- volumeTypes.go