Documentation ¶
Index ¶
- Variables
- func DeleteHostById(conn *Connection, id string) error
- func DeleteInitiatorById(conn *Connection, id string) error
- func DeleteLunById(conn *Connection, id string) error
- func GbToByte(gb uint64) uint64
- func StorageRscDo(conn *Connection, action string, body map[string]interface{}) (string, error)
- func StorageRscInstDo(conn *Connection, id, action string, body map[string]interface{}) (string, error)
- type Attributes
- type BlockHostAccess
- type Connection
- func (conn *Connection) Delete(url, body string) (string, error)
- func (conn *Connection) DeleteRscInst(rsc, id, body string) (string, error)
- func (conn *Connection) Get(url string) (string, error)
- func (conn *Connection) GetRscAll(rsc, filter string) (string, error)
- func (conn *Connection) GetRscInst(rsc, id string) (string, error)
- func (conn *Connection) GetRscMeta(rsc string) (string, error)
- func (conn *Connection) Post(url string, body string) (string, error)
- func (conn *Connection) PostInstance(rsc, body string) (string, error)
- type ErrorMessage
- type EthernetPort
- type FcPort
- type Health
- type Host
- type HostIPPort
- type HostInitiator
- type HostInitiatorList
- type HostInitiatorListCtor
- type HostInitiatorPath
- type HostInitiatorPathTypeEnum
- type HostInitiatorType
- type HostLUN
- type HostLUNAccessEnum
- type HostLUNList
- type HostLUNTypeEnum
- type HostList
- type HostListCtor
- type HostLunListCtor
- type HostPortTypeEnum
- type HostTypeEnum
- type IpProtocolVersionEnum
- type IscsiNode
- type IscsiPortal
- type Lun
- type LunList
- type LunListCtor
- type Pool
- type PoolList
- type PoolListCtor
- type RestError
- type Rsc
- type RscList
- type RscListCtor
- type RscListIterator
- type RscLister
- type Rscer
- type SPModelNameEnum
- type StorageProcessor
- type StorageResource
- type StorageResourceIdResp
- type StorageResourceTypeEnum
- type Tenant
- type Type
- type Unity
- func (unity *Unity) CreateHost(name string) (*Host, error)
- func (unity *Unity) GetHostById(id string) *Host
- func (unity *Unity) GetHostByName(name string) *Host
- func (unity *Unity) GetHostList() *HostList
- func (unity *Unity) GetLunById(id string) *Lun
- func (unity *Unity) GetLunByName(name string) *Lun
- func (unity *Unity) GetLunList() *LunList
- func (unity *Unity) GetPoolById(id string) *Pool
- func (unity *Unity) GetPoolByName(name string) *Pool
- func (unity *Unity) GetPoolList() *PoolList
- func (unity *Unity) Ip() string
- func (unity *Unity) Username() string
Constants ¶
This section is empty.
Variables ¶
View Source
var HEADERS map[string]string = map[string]string{
"Accept": "application/json",
"Content-Type": "application/json",
"Accept_Language": "en_US",
"X-EMC-REST-CLIENT": "true",
"User-Agent": "gounity",
}
Functions ¶
func DeleteHostById ¶
func DeleteHostById(conn *Connection, id string) error
func DeleteInitiatorById ¶
func DeleteInitiatorById(conn *Connection, id string) error
func DeleteLunById ¶
func DeleteLunById(conn *Connection, id string) error
func StorageRscDo ¶
func StorageRscDo(conn *Connection, action string, body map[string]interface{}) (string, error)
func StorageRscInstDo ¶
func StorageRscInstDo(conn *Connection, id, action string, body map[string]interface{}) (string, error)
Types ¶
type Attributes ¶
type BlockHostAccess ¶
type BlockHostAccess struct { Host Host AccessMask HostLUNAccessEnum }
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
func NewConnection ¶
func NewConnection(ip, username, password string) *Connection
func NewMockConnection ¶
func NewMockConnection(ip, username, password string) *Connection
func (*Connection) DeleteRscInst ¶
func (conn *Connection) DeleteRscInst(rsc, id, body string) (string, error)
func (*Connection) GetRscAll ¶
func (conn *Connection) GetRscAll(rsc, filter string) (string, error)
func (*Connection) GetRscInst ¶
func (conn *Connection) GetRscInst(rsc, id string) (string, error)
func (*Connection) GetRscMeta ¶
func (conn *Connection) GetRscMeta(rsc string) (string, error)
func (*Connection) PostInstance ¶
func (conn *Connection) PostInstance(rsc, body string) (string, error)
type ErrorMessage ¶
type ErrorMessage struct {
EnUs string `json:"en-US"`
}
type EthernetPort ¶
type Host ¶
type Host struct { Rsc Name string Health Health Description string OsType string Type HostTypeEnum HostUUID string HostPushedUUID string HostPolledUUID string FcHostInitiators []HostInitiator IscsiHostInitiators []HostInitiator HostIPPorts []HostIPPort StorageResources []StorageResource HostLUNs []HostLUN Tenant Tenant }
func CreateHost ¶
func CreateHost(conn *Connection, name string) (*Host, error)
func GetHostById ¶
func GetHostById(conn *Connection, id string) *Host
func GetHostByName ¶
func GetHostByName(conn *Connection, name string) *Host
func (*Host) AddInitiator ¶
func (host *Host) AddInitiator(uid string) (*HostInitiator, error)
type HostIPPort ¶
type HostInitiator ¶
type HostInitiator struct { Rsc Health Health Type HostInitiatorType InitiatorId string IsIgnored bool NodeWWN string PortWWN string ParentHost Host Paths []HostInitiatorPath IsBound bool }
func CreateInitiator ¶
func CreateInitiator(conn *Connection, host *Host, uid string) (*HostInitiator, error)
func GetInitiatorById ¶
func GetInitiatorById(conn *Connection, id string) *HostInitiator
func GetInitiatorByUid ¶
func GetInitiatorByUid(conn *Connection, uid string) *HostInitiator
func (*HostInitiator) Delete ¶
func (initiator *HostInitiator) Delete() error
type HostInitiatorList ¶
type HostInitiatorList struct {
RscList
}
type HostInitiatorListCtor ¶
type HostInitiatorListCtor struct {
// contains filtered or unexported fields
}
type HostInitiatorPath ¶
type HostInitiatorPath struct { Rsc RegistrationType HostInitiatorPathTypeEnum IsLoggedIn bool HostPushName string SessionIds []string Initiator HostInitiator FcPort FcPort IscsiPortal IscsiPortal }
type HostInitiatorPathTypeEnum ¶
type HostInitiatorPathTypeEnum int
const ( Manual HostInitiatorPathTypeEnum = iota ESX_Auto Other_Auto )
type HostInitiatorType ¶
type HostInitiatorType int
const ( UNKNOWN HostInitiatorType = iota FC ISCSI )
type HostLUN ¶
type HostLUN struct { Rsc Host Host Type HostLUNTypeEnum Hlu uint16 Lun Lun // todo: snap //Snap Snap IsReadOnly bool IsDefaultSnap bool }
func GetHostLUN ¶
func GetHostLUN(conn *Connection, host *Host, lun *Lun) *HostLUN
type HostLUNAccessEnum ¶
type HostLUNAccessEnum int
const ( NO_ACCESS HostLUNAccessEnum = iota PRODUCTION SNAPSHOT BOTH MIXED )
type HostLUNList ¶
type HostLUNList struct {
RscList
}
type HostLUNTypeEnum ¶
type HostLUNTypeEnum int
const ( HostLUNType_UNKNOWN HostLUNTypeEnum = iota HostLUNType_LUN HostLUNType_Snap )
type HostList ¶
type HostList struct {
RscList
}
func GetHostList ¶
func GetHostList(conn *Connection) *HostList
type HostListCtor ¶
type HostListCtor struct {
// contains filtered or unexported fields
}
type HostLunListCtor ¶
type HostLunListCtor struct {
// contains filtered or unexported fields
}
type HostPortTypeEnum ¶
type HostPortTypeEnum int
const ( HostPortType_IPv4 HostPortTypeEnum = iota HostPortType_IPv6 HostPortType_NetworkName )
type HostTypeEnum ¶
type HostTypeEnum int
const ( Unknown HostTypeEnum = iota HostManual Subnet NetGroup RPA HostAuto VNXSanCopy HostTypeEnum = 255 )
type IpProtocolVersionEnum ¶
type IpProtocolVersionEnum int
const ( IPv4 IpProtocolVersionEnum = 4 IPv6 IpProtocolVersionEnum = 6 )
type IscsiPortal ¶
type IscsiPortal struct { Rsc EthernetPort EthernetPort IscsiNode IscsiNode IpAddress string Netmask string V6PrefixLength uint32 Gateway string VlanId uint32 IpProtocolVersion IpProtocolVersionEnum }
type Lun ¶
type Lun struct { Rsc Name string Health Health Description string SizeTotal uint64 SizeUsed uint64 SizeAllocated uint64 IsThinEnabled bool Wwn string MetaDataSize uint64 MetadataSizeAllocated uint64 SnapWwn string SnapsSize uint64 SnapsSizeAllocated uint64 SnapCount uint32 Pool Pool HostAccess []BlockHostAccess }
func GetLunById ¶
func GetLunById(conn *Connection, id string) *Lun
func GetLunByName ¶
func GetLunByName(conn *Connection, name string) *Lun
func (*Lun) DetachHost ¶
type LunList ¶
type LunList struct {
RscList
}
func GetLunList ¶
func GetLunList(conn *Connection) *LunList
type LunListCtor ¶
type LunListCtor struct {
// contains filtered or unexported fields
}
type Pool ¶
type Pool struct { Rsc Name string Health Health Description string SizeFree uint64 SizeTotal uint64 SizeUsed uint64 }
func GetPoolById ¶
func GetPoolById(conn *Connection, id string) *Pool
func GetPoolByName ¶
func GetPoolByName(conn *Connection, name string) *Pool
func (*Pool) GetLunList ¶
type PoolList ¶
type PoolList struct {
RscList
}
func GetPoolList ¶
func GetPoolList(conn *Connection) *PoolList
type PoolListCtor ¶
type PoolListCtor struct {
// contains filtered or unexported fields
}
type RestError ¶
type RestError struct { ErrorCode uint64 HttpStatusCode int Messages []ErrorMessage Created string }
type Rsc ¶
type Rsc struct { Id string // contains filtered or unexported fields }
func (*Rsc) GetConn ¶
func (r *Rsc) GetConn() *Connection
type RscList ¶
type RscList struct {
// contains filtered or unexported fields
}
func (*RscList) GetConn ¶
func (rl *RscList) GetConn() *Connection
func (*RscList) Iterator ¶
func (rl *RscList) Iterator() *RscListIterator
type RscListCtor ¶
type RscListCtor interface {
// contains filtered or unexported methods
}
type RscListIterator ¶
type RscListIterator struct {
// contains filtered or unexported fields
}
func (*RscListIterator) Next ¶
func (it *RscListIterator) Next() bool
func (*RscListIterator) NextIndex ¶
func (it *RscListIterator) NextIndex() int
func (*RscListIterator) Value ¶
func (it *RscListIterator) Value() Rscer
type RscLister ¶
type RscLister interface { GetConn() *Connection GetFilter() string Iterator() *RscListIterator Size() int // contains filtered or unexported methods }
func UpdateList ¶
type Rscer ¶
type Rscer interface { GetType() string GetId() string GetConn() *Connection JsonId() string }
type SPModelNameEnum ¶
type SPModelNameEnum int
const ( SP300 SPModelNameEnum = 1 + iota SP400 SP500 SP600 )
type StorageProcessor ¶
type StorageProcessor struct { Rsc Health Health IsRescueMode bool Model string Name string EmcPartNumber string EmcSerialNumber string Manufacturer string VendorPartNumber string VendorSerialNumber string SasExpanderVersion string BiosFirmwareRevision string PostFirmwareRevision string MemorySize uint32 ModelName SPModelNameEnum // contains filtered or unexported fields }
type StorageResource ¶
type StorageResourceIdResp ¶
type StorageResourceIdResp struct {
StorageResource Rsc
}
type StorageResourceTypeEnum ¶
type StorageResourceTypeEnum int
const ( SRType_Filesystem StorageResourceTypeEnum = 1 + iota SRType_ConsistencyGroup SRType_VmwareFs SRType_VmwareIscsi )
const ( SRType_Lun StorageResourceTypeEnum = 8 + iota SRType_VVolDataStoreFs SRType_VVolDataStoreIscsi )
type Type ¶
type Type struct { Name string Description string Documentation string Attributes []Attributes }
func (*Type) AllFieldString ¶
type Unity ¶
type Unity struct { Rsc Name string Model string Health Health SerialNumber string Platform string MacAddress string IsEULAAccepted bool IsUpgradeComplete bool IsAutoFailbackEnabled bool CurrentPower int AvgPower int }
func NewUnityByConn ¶
func NewUnityByConn(conn *Connection) *Unity
func (*Unity) GetHostById ¶
func (*Unity) GetHostByName ¶
func (*Unity) GetHostList ¶
func (*Unity) GetLunById ¶
func (*Unity) GetLunByName ¶
func (*Unity) GetLunList ¶
func (*Unity) GetPoolById ¶
func (*Unity) GetPoolByName ¶
func (*Unity) GetPoolList ¶
Click to show internal directories.
Click to hide internal directories.