dsdk

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2018 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USetToken   = ""
	MaxPoolConn = 5
)
View Source
const (
	VERSION = "1.0.7"
)

Variables

View Source
var (
	Cpool *connectionPool
)

Functions

func InitLog

func InitLog(debug bool, output string, stdout bool) error

func NewUUID

func NewUUID() (string, error)

NewUUID generates a random UUID according to RFC 4122

Types

type AccessNetworkIpPool

type AccessNetworkIpPool struct {
	Descr        string                 `json:"descr,omitempty"`
	Name         string                 `json:"name,omitempty"`
	NetworkPaths map[string]interface{} `json:"network_paths,omitempty"`
	Path         string                 `json:"path,omitempty"`
}

AccessNetworkIpPool Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAccessNetworkIpPool

func NewAccessNetworkIpPool(arg []byte) (AccessNetworkIpPool, error)

func (*AccessNetworkIpPool) Unpack

func (en *AccessNetworkIpPool) Unpack(arg map[string]interface{}) error

func (*AccessNetworkIpPool) UnpackB

func (en *AccessNetworkIpPool) UnpackB(arg []byte) error

type AclPolicy

type AclPolicy struct {
	InitiatorGroups *[]InitiatorGroup `json:"initiator_groups,omitempty"`
	Initiators      *[]Initiator      `json:"initiators,omitempty"`
	Path            string            `json:"path,omitempty"`
}

AclPolicy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAclPolicy

func NewAclPolicy(arg []byte) (AclPolicy, error)

func (*AclPolicy) Unpack

func (en *AclPolicy) Unpack(arg map[string]interface{}) error

func (*AclPolicy) UnpackB

func (en *AclPolicy) UnpackB(arg []byte) error

type AppInstance

type AppInstance struct {
	AccessControlMode string             `json:"access_control_mode,omitempty"`
	AdminState        string             `json:"admin_state,omitempty"`
	AppTemplate       *AppTemplate       `json:"app_template,omitempty"`
	Causes            []interface{}      `json:"causes,omitempty"`
	CloneSrc          map[string]string  `json:"clone_src,omitempty"`
	CreateMode        string             `json:"create_mode,omitempty"`
	DeploymentState   string             `json:"deployment_state,omitempty"`
	Descr             string             `json:"descr,omitempty"`
	Health            string             `json:"health,omitempty"`
	Id                string             `json:"id,omitempty"`
	Name              string             `json:"name,omitempty"`
	OpState           string             `json:"op_state,omitempty"`
	Path              string             `json:"path,omitempty"`
	RestorePoint      string             `json:"restore_point,omitempty"`
	SnapshotPolicies  *[]SnapshotPolicy  `json:"snapshot_policies,omitempty"`
	Snapshots         *[]Snapshot        `json:"snapshots,omitempty"`
	StorageInstances  *[]StorageInstance `json:"storage_instances,omitempty"`
	Uuid              string             `json:"uuid,omitempty"`
}

AppInstance Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAppInstance

func NewAppInstance(arg []byte) (AppInstance, error)

func (*AppInstance) Unpack

func (en *AppInstance) Unpack(arg map[string]interface{}) error

func (*AppInstance) UnpackB

func (en *AppInstance) UnpackB(arg []byte) error

type AppTemplate

type AppTemplate struct {
	AppInstances     *[]AppInstance     `json:"app_instances,omitempty"`
	Descr            string             `json:"descr,omitempty"`
	Name             string             `json:"name,omitempty"`
	Path             string             `json:"path,omitempty"`
	SnapshotPolicies *[]SnapshotPolicy  `json:"snapshot_policies,omitempty"`
	StorageTemplates *[]StorageTemplate `json:"storage_templates,omitempty"`
}

AppTemplate Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAppTemplate

func NewAppTemplate(arg []byte) (AppTemplate, error)

func (*AppTemplate) Unpack

func (en *AppTemplate) Unpack(arg map[string]interface{}) error

func (*AppTemplate) UnpackB

func (en *AppTemplate) UnpackB(arg []byte) error

type AuditLog

type AuditLog struct {
	Description string `json:"description,omitempty"`
	Id          string `json:"id,omitempty"`
	ObjectName  string `json:"object_name,omitempty"`
	ObjectType  string `json:"object_type,omitempty"`
	ObjectUrl   string `json:"object_url,omitempty"`
	Operation   string `json:"operation,omitempty"`
	ParamInfo   string `json:"param_info,omitempty"`
	Path        string `json:"path,omitempty"`
	SessionInfo string `json:"session_info,omitempty"`
	Timestamp   string `json:"timestamp,omitempty"`
	User        *User  `json:"user,omitempty"`
	Version     string `json:"version,omitempty"`
}

AuditLog Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAuditLog

func NewAuditLog(arg []byte) (AuditLog, error)

func (*AuditLog) Unpack

func (en *AuditLog) Unpack(arg map[string]interface{}) error

func (*AuditLog) UnpackB

func (en *AuditLog) UnpackB(arg []byte) error

type Auth

type Auth struct {
	InitiatorPswd     string `json:"initiator_pswd,omitempty"`
	InitiatorUserName string `json:"initiator_user_name,omitempty"`
	Path              string `json:"path,omitempty"`
	TargetPswd        string `json:"target_pswd,omitempty"`
	TargetUserName    string `json:"target_user_name,omitempty"`
	Type              string `json:"type,omitempty"`
}

Auth Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewAuth

func NewAuth(arg []byte) (Auth, error)

func (*Auth) Unpack

func (en *Auth) Unpack(arg map[string]interface{}) error

func (*Auth) UnpackB

func (en *Auth) UnpackB(arg []byte) error

type BootDrive

type BootDrive struct {
	Causes    []interface{} `json:"causes,omitempty"`
	Health    string        `json:"health,omitempty"`
	Id        string        `json:"id,omitempty"`
	OpState   string        `json:"op_state,omitempty"`
	Path      string        `json:"path,omitempty"`
	Size      int           `json:"size,omitempty"`
	SlotLabel string        `json:"slot_label,omitempty"`
}

BootDrive Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewBootDrive

func NewBootDrive(arg []byte) (BootDrive, error)

func (*BootDrive) Unpack

func (en *BootDrive) Unpack(arg map[string]interface{}) error

func (*BootDrive) UnpackB

func (en *BootDrive) UnpackB(arg []byte) error

type Dns

type Dns struct {
	Domain string `json:"domain,omitempty"`
	Path   string `json:"path,omitempty"`
}

Dns Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewDns

func NewDns(arg []byte) (Dns, error)

func (*Dns) Unpack

func (en *Dns) Unpack(arg map[string]interface{}) error

func (*Dns) UnpackB

func (en *Dns) UnpackB(arg []byte) error

type DnsSearchDomain

type DnsSearchDomain struct {
	Domain string `json:"domain,omitempty"`
	Order  int    `json:"order,omitempty"`
	Path   string `json:"path,omitempty"`
}

DnsSearchDomain Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewDnsSearchDomain

func NewDnsSearchDomain(arg []byte) (DnsSearchDomain, error)

func (*DnsSearchDomain) Unpack

func (en *DnsSearchDomain) Unpack(arg map[string]interface{}) error

func (*DnsSearchDomain) UnpackB

func (en *DnsSearchDomain) UnpackB(arg []byte) error

type DnsServer

type DnsServer struct {
	Ip    string `json:"ip,omitempty"`
	Order int    `json:"order,omitempty"`
	Path  string `json:"path,omitempty"`
}

DnsServer Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewDnsServer

func NewDnsServer(arg []byte) (DnsServer, error)

func (*DnsServer) Unpack

func (en *DnsServer) Unpack(arg map[string]interface{}) error

func (*DnsServer) UnpackB

func (en *DnsServer) UnpackB(arg []byte) error

type Endpoint

type Endpoint struct {
	Path string
}

func (Endpoint) Create

func (ep Endpoint) Create(ctxt context.Context, bodyp ...interface{}) (IEntity, error)

Create an Entity via this Endpoint. The IEntity object can be unmarshalled into the matching Entity from the entity.go file bodyp arguments can be in one of two forms

  1. Vararg strings follwing this pattern: "key=value" These strings have a limitation in that they cannot be arbitrarily nested JSON values, instead they must be simple strings Eg. "key=value" is fine, but `key=["some", "list"]` will fail the arbitrary JSON usecase is handled by #2
  1. A single map[string]interface{} argument. This handles the case where we need to send arbitrarily nested JSON as an argument

Function arguments are setup this way to provide an easy way to handle 90% of the use cases (where we're just passing key, value string pairs) but that remaining 10% we need to pass something more complex

func (Endpoint) Get

func (ep Endpoint) Get(ctxt context.Context, queryp ...string) (IEntity, error)

Get the Entity hosted on this Endpoint. The IEntity object can be unmarshalled into the matching Entity from the entity.go file

func (Endpoint) GetEp

func (ep Endpoint) GetEp(path string) IEndpoint

func (Endpoint) GetPath

func (ep Endpoint) GetPath() string

func (Endpoint) List

func (ep Endpoint) List(ctxt context.Context, queryp ...string) ([]IEntity, error)

List the Entities hosted on this Endpoint. The IEntity objects can be unmarshalled into the matching Entity from the entity.go file

func (Endpoint) Set

func (ep Endpoint) Set(ctxt context.Context, bodyp ...interface{}) (IEntity, error)

Update attributes of the Entity hosted on this Endpoint. The IEntity object can be unmarshalled into the matching Entity from the entity.go file bodyp arguments can be in one of two forms

  1. Vararg strings follwing this pattern: "key=value" These strings have a limitation in that they cannot be arbitrarily nested JSON values, instead they must be simple strings Eg. "key=value" is fine, but `key=["some", "list"]` will fail the arbitrary JSON usecase is handled by #2
  1. A single map[string]interface{} argument. This handles the case where we need to send arbitrarily nested JSON as an argument

Function arguments are setup this way to provide an easy way to handle 90% of the use cases (where we're just passing key, value string pairs) but that remaining 10% we need to pass something more complex

type Entity

type Entity struct {
	Path  string
	Items map[string]interface{}
}

func (Entity) Delete

func (en Entity) Delete(ctxt context.Context, bodyp ...interface{}) error

Delete this Entity. bodyp arguments can be in one of two forms

  1. Vararg strings follwing this pattern: "key=value" These strings have a limitation in that they cannot be arbitrarily nested JSON values, instead they must be simple strings Eg. "key=value" is fine, but `key=["some", "list"]` will fail the arbitrary JSON usecase is handled by #2
  1. A single map[string]interface{} argument. This handles the case where we need to send arbitrarily nested JSON as an argument

Function arguments are setup this way to provide an easy way to handle 90% of the use cases (where we're just passing key, value string pairs) but that remaining 10% we need to pass something more complex

func (Entity) Get

func (en Entity) Get(key string) interface{}

Access a key in this entity by name. Must be type asserted after recieving it

func (Entity) GetB

func (en Entity) GetB() []byte

Short for "Get Bytes". Used for Unmarshalling into an Entity from the entity.go file

func (Entity) GetEn

func (en Entity) GetEn(enKey string) []IEntity

Short for "Get Entities" Usage:

		ai, _ = client.GetEp("app_instances").Create("name=my-app")
		ai.GetEp("storage_instances").Create("name=my-stor")
		ai, _ = ai.Reload()
		si = ai.GetEn("storage_instances")[0]
     // Optionally you could unpack the IEntity object into a struct
     var unpackedSI StorageInstance
     unpackedSi.UnpackB(ai.GetB())
     fmt.Println("SI Name", unpackedSI.Name)

func (Entity) GetEp

func (en Entity) GetEp(path string) IEndpoint

Short for "Get Endpoint". Does not make any request to the backend, just used for constructing the path to that Endpoint. Can be chained together.

func (Entity) GetM

func (en Entity) GetM() map[string]interface{}

Short for "Get Map", returns the entire map of this Entity

func (Entity) GetPath

func (en Entity) GetPath() string

Returns the full path to this Entity

func (Entity) Reload

func (en Entity) Reload(ctxt context.Context) (IEntity, error)

Pull all the attributes of this Entity. Useful if it has been changed at some point and a newly updated version of the Entity is needed

func (Entity) Set

func (en Entity) Set(ctxt context.Context, bodyp ...interface{}) (IEntity, error)

Update attributes of this Entity. The IEntity object can be unmarshalled into the matching Entity from the entity.go file bodyp arguments can be in one of two forms

  1. Vararg strings follwing this pattern: "key=value" These strings have a limitation in that they cannot be arbitrarily nested JSON values, instead they must be simple strings Eg. "key=value" is fine, but `key=["some", "list"]` will fail the arbitrary JSON usecase is handled by #2
  1. A single map[string]interface{} argument. This handles the case where we need to send arbitrarily nested JSON as an argument

Function arguments are setup this way to provide an easy way to handle 90% of the use cases (where we're just passing key, value string pairs) but that remaining 10% we need to pass something more complex

type ErrResponse21

type ErrResponse21 struct {
	Name                string   `json:"name"`
	Code                int      `json:"code"`
	HTTP                int      `json:"http"`
	Message             string   `json:"message"`
	Debug               string   `json:"debug"`
	Ts                  string   `json:"ts"`
	APIReqId            int      `json:"api_req_id"`
	StorageNodeUUID     string   `json:"storage_node_uuid"`
	StorageNodeHostname string   `json:"storage_node_hostname"`
	Schema              string   `json:"schema,omitempty"`
	Errors              []string `json:"errors,omitempty"`
}

type EventLog

type EventLog struct {
	Cause        string `json:"cause,omitempty"`
	Code         string `json:"code,omitempty"`
	Id           string `json:"id,omitempty"`
	ObjectId     string `json:"object_id,omitempty"`
	ObjectLbl    string `json:"object_lbl,omitempty"`
	ObjectPath   string `json:"object_path,omitempty"`
	ObjectTenant string `json:"object_tenant,omitempty"`
	ObjectType   string `json:"object_type,omitempty"`
	ObjectUrl    string `json:"object_url,omitempty"`
	Path         string `json:"path,omitempty"`
	Severity     string `json:"severity,omitempty"`
	Timestamp    string `json:"timestamp,omitempty"`
	Type         string `json:"type,omitempty"`
}

EventLog Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewEventLog

func NewEventLog(arg []byte) (EventLog, error)

func (*EventLog) Unpack

func (en *EventLog) Unpack(arg map[string]interface{}) error

func (*EventLog) UnpackB

func (en *EventLog) UnpackB(arg []byte) error

type FaultLog

type FaultLog struct {
	Acknowledged    bool   `json:"acknowledged,omitempty"`
	CallhomeEnabled bool   `json:"callhome_enabled,omitempty"`
	Cause           string `json:"cause,omitempty"`
	Cleared         bool   `json:"cleared,omitempty"`
	Code            string `json:"code,omitempty"`
	Count           int    `json:"count,omitempty"`
	Id              string `json:"id,omitempty"`
	ObjectId        string `json:"object_id,omitempty"`
	ObjectLbl       string `json:"object_lbl,omitempty"`
	ObjectPath      string `json:"object_path,omitempty"`
	ObjectTenant    string `json:"object_tenant,omitempty"`
	ObjectType      string `json:"object_type,omitempty"`
	ObjectUrl       string `json:"object_url,omitempty"`
	Path            string `json:"path,omitempty"`
	Repeat          string `json:"repeat,omitempty"`
	Severity        string `json:"severity,omitempty"`
	Timestamp       int    `json:"timestamp,omitempty"`
	Type            string `json:"type,omitempty"`
}

FaultLog Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewFaultLog

func NewFaultLog(arg []byte) (FaultLog, error)

func (*FaultLog) Unpack

func (en *FaultLog) Unpack(arg map[string]interface{}) error

func (*FaultLog) UnpackB

func (en *FaultLog) UnpackB(arg []byte) error

type Hdd

type Hdd struct {
	Causes    []interface{} `json:"causes,omitempty"`
	Health    string        `json:"health,omitempty"`
	Id        string        `json:"id,omitempty"`
	OpState   string        `json:"op_state,omitempty"`
	Path      string        `json:"path,omitempty"`
	Size      int           `json:"size,omitempty"`
	SlotLabel string        `json:"slot_label,omitempty"`
}

Hdd Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewHdd

func NewHdd(arg []byte) (Hdd, error)

func (*Hdd) Unpack

func (en *Hdd) Unpack(arg map[string]interface{}) error

func (*Hdd) UnpackB

func (en *Hdd) UnpackB(arg []byte) error

type HttpProxy

type HttpProxy struct {
	Enabled  bool   `json:"enabled,omitempty"`
	Host     string `json:"host,omitempty"`
	Password string `json:"password,omitempty"`
	Path     string `json:"path,omitempty"`
	Port     int    `json:"port,omitempty"`
	User     *User  `json:"user,omitempty"`
}

HttpProxy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewHttpProxy

func NewHttpProxy(arg []byte) (HttpProxy, error)

func (*HttpProxy) Unpack

func (en *HttpProxy) Unpack(arg map[string]interface{}) error

func (*HttpProxy) UnpackB

func (en *HttpProxy) UnpackB(arg []byte) error

type IAPIConnection

type IAPIConnection interface {
	// contains filtered or unexported methods
}

type IEndpoint

type IEndpoint interface {
	GetEp(string) IEndpoint
	Create(context.Context, ...interface{}) (IEntity, error)
	List(context.Context, ...string) ([]IEntity, error)
	Set(context.Context, ...interface{}) (IEntity, error)
	Get(context.Context, ...string) (IEntity, error)
	GetPath() string
}

type IEntity

type IEntity interface {
	Get(string) interface{}
	GetM() map[string]interface{}
	GetB() []byte
	GetEn(string) []IEntity
	GetEp(string) IEndpoint
	GetPath() string
	Reload(context.Context) (IEntity, error)
	Set(context.Context, ...interface{}) (IEntity, error)
	Delete(context.Context, ...interface{}) error
}

type IHTTPClient

type IHTTPClient interface {
	Do(*http.Request) (*http.Response, error)
}

type Initiator

type Initiator struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
	Path string `json:"path,omitempty"`
}

Initiator Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewInitiator

func NewInitiator(arg []byte) (Initiator, error)

func (*Initiator) Unpack

func (en *Initiator) Unpack(arg map[string]interface{}) error

func (*Initiator) UnpackB

func (en *Initiator) UnpackB(arg []byte) error

type InitiatorGroup

type InitiatorGroup struct {
	Members []interface{} `json:"members,omitempty"`
	Name    string        `json:"name,omitempty"`
	Path    string        `json:"path,omitempty"`
}

InitiatorGroup Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewInitiatorGroup

func NewInitiatorGroup(arg []byte) (InitiatorGroup, error)

func (*InitiatorGroup) Unpack

func (en *InitiatorGroup) Unpack(arg map[string]interface{}) error

func (*InitiatorGroup) UnpackB

func (en *InitiatorGroup) UnpackB(arg []byte) error

type InternalIpBlock

type InternalIpBlock struct {
	Gateway string `json:"gateway,omitempty"`
	Mtu     int    `json:"mtu,omitempty"`
	Name    string `json:"name,omitempty"`
	Netmask int    `json:"netmask,omitempty"`
	Path    string `json:"path,omitempty"`
	Range   int    `json:"range,omitempty"`
	StartIp string `json:"start_ip,omitempty"`
	Vlan    int    `json:"vlan,omitempty"`
}

InternalIpBlock Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewInternalIpBlock

func NewInternalIpBlock(arg []byte) (InternalIpBlock, error)

func (*InternalIpBlock) Unpack

func (en *InternalIpBlock) Unpack(arg map[string]interface{}) error

func (*InternalIpBlock) UnpackB

func (en *InternalIpBlock) UnpackB(arg []byte) error

type IpAddress

type IpAddress struct {
	Gateway string `json:"gateway,omitempty"`
	Ip      string `json:"ip,omitempty"`
	Mtu     int    `json:"mtu,omitempty"`
	Name    string `json:"name,omitempty"`
	Netmask int    `json:"netmask,omitempty"`
	Path    string `json:"path,omitempty"`
	Vlan    int    `json:"vlan,omitempty"`
}

IpAddress Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewIpAddress

func NewIpAddress(arg []byte) (IpAddress, error)

func (*IpAddress) Unpack

func (en *IpAddress) Unpack(arg map[string]interface{}) error

func (*IpAddress) UnpackB

func (en *IpAddress) UnpackB(arg []byte) error

type IpBlock

type IpBlock struct {
	Gateway string `json:"gateway,omitempty"`
	Mtu     int    `json:"mtu,omitempty"`
	Name    string `json:"name,omitempty"`
	Netmask int    `json:"netmask,omitempty"`
	Path    string `json:"path,omitempty"`
	Range   int    `json:"range,omitempty"`
	StartIp string `json:"start_ip,omitempty"`
	Vlan    int    `json:"vlan,omitempty"`
}

IpBlock Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewIpBlock

func NewIpBlock(arg []byte) (IpBlock, error)

func (*IpBlock) Unpack

func (en *IpBlock) Unpack(arg map[string]interface{}) error

func (*IpBlock) UnpackB

func (en *IpBlock) UnpackB(arg []byte) error

type IpPool

type IpPool struct {
	Descr        string                 `json:"descr,omitempty"`
	Name         string                 `json:"name,omitempty"`
	NetworkPaths map[string]interface{} `json:"network_paths,omitempty"`
	Path         string                 `json:"path,omitempty"`
}

IpPool Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewIpPool

func NewIpPool(arg []byte) (IpPool, error)

func (*IpPool) Unpack

func (en *IpPool) Unpack(arg map[string]interface{}) error

func (*IpPool) UnpackB

func (en *IpPool) UnpackB(arg []byte) error

type MonitoringDestination

type MonitoringDestination struct {
	Facility  string `json:"facility,omitempty"`
	Host      string `json:"host,omitempty"`
	LastMsgTs string `json:"last_msg_ts,omitempty"`
	Name      string `json:"name,omitempty"`
	OpState   string `json:"op_state,omitempty"`
	Path      string `json:"path,omitempty"`
	Port      int    `json:"port,omitempty"`
	Type      string `json:"type,omitempty"`
}

MonitoringDestination Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewMonitoringDestination

func NewMonitoringDestination(arg []byte) (MonitoringDestination, error)

func (*MonitoringDestination) Unpack

func (en *MonitoringDestination) Unpack(arg map[string]interface{}) error

func (*MonitoringDestination) UnpackB

func (en *MonitoringDestination) UnpackB(arg []byte) error

type MonitoringPolicy

type MonitoringPolicy struct {
	Destinations []interface{} `json:"destinations,omitempty"`
	Enabled      bool          `json:"enabled,omitempty"`
	Name         string        `json:"name,omitempty"`
	Path         string        `json:"path,omitempty"`
}

MonitoringPolicy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewMonitoringPolicy

func NewMonitoringPolicy(arg []byte) (MonitoringPolicy, error)

func (*MonitoringPolicy) Unpack

func (en *MonitoringPolicy) Unpack(arg map[string]interface{}) error

func (*MonitoringPolicy) UnpackB

func (en *MonitoringPolicy) UnpackB(arg []byte) error

type Network

type Network struct {
	AccessNetworks  []interface{}          `json:"access_networks,omitempty"`
	AccessVip       map[string]interface{} `json:"access_vip,omitempty"`
	InternalNetwork map[string]interface{} `json:"internal_network,omitempty"`
	Mapping         map[string]interface{} `json:"mapping,omitempty"`
	MgmtVip         map[string]interface{} `json:"mgmt_vip,omitempty"`
	Path            string                 `json:"path,omitempty"`
}

Network Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewNetwork

func NewNetwork(arg []byte) (Network, error)

func (*Network) Unpack

func (en *Network) Unpack(arg map[string]interface{}) error

func (*Network) UnpackB

func (en *Network) UnpackB(arg []byte) error

type NetworkMapping

type NetworkMapping struct {
	Access1   string `json:"access_1,omitempty"`
	Access2   string `json:"access_2,omitempty"`
	Internal1 string `json:"internal_1,omitempty"`
	Internal2 string `json:"internal_2,omitempty"`
	Mgmt1     string `json:"mgmt_1,omitempty"`
	Mgmt2     string `json:"mgmt_2,omitempty"`
	Path      string `json:"path,omitempty"`
}

NetworkMapping Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewNetworkMapping

func NewNetworkMapping(arg []byte) (NetworkMapping, error)

func (*NetworkMapping) Unpack

func (en *NetworkMapping) Unpack(arg map[string]interface{}) error

func (*NetworkMapping) UnpackB

func (en *NetworkMapping) UnpackB(arg []byte) error

type Nic

type Nic struct {
	Causes    []interface{} `json:"causes,omitempty"`
	Health    string        `json:"health,omitempty"`
	Id        string        `json:"id,omitempty"`
	OpState   string        `json:"op_state,omitempty"`
	Path      string        `json:"path,omitempty"`
	SlotLabel string        `json:"slot_label,omitempty"`
}

Nic Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewNic

func NewNic(arg []byte) (Nic, error)

func (*Nic) Unpack

func (en *Nic) Unpack(arg map[string]interface{}) error

func (*Nic) UnpackB

func (en *Nic) UnpackB(arg []byte) error

type NtpServer

type NtpServer struct {
	Ip    string `json:"ip,omitempty"`
	Order int    `json:"order,omitempty"`
	Path  string `json:"path,omitempty"`
}

NtpServer Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewNtpServer

func NewNtpServer(arg []byte) (NtpServer, error)

func (*NtpServer) Unpack

func (en *NtpServer) Unpack(arg map[string]interface{}) error

func (*NtpServer) UnpackB

func (en *NtpServer) UnpackB(arg []byte) error

type NvmFlashDevice

type NvmFlashDevice struct {
	Causes    []interface{} `json:"causes,omitempty"`
	Health    string        `json:"health,omitempty"`
	Id        string        `json:"id,omitempty"`
	OpState   string        `json:"op_state,omitempty"`
	Path      string        `json:"path,omitempty"`
	Size      int           `json:"size,omitempty"`
	SlotLabel string        `json:"slot_label,omitempty"`
}

NvmFlashDevice Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewNvmFlashDevice

func NewNvmFlashDevice(arg []byte) (NvmFlashDevice, error)

func (*NvmFlashDevice) Unpack

func (en *NvmFlashDevice) Unpack(arg map[string]interface{}) error

func (*NvmFlashDevice) UnpackB

func (en *NvmFlashDevice) UnpackB(arg []byte) error

type PerformancePolicy

type PerformancePolicy struct {
	Path              string `json:"path,omitempty"`
	ReadBandwidthMax  int    `json:"read_bandwidth_max,omitempty"`
	ReadIopsMax       int    `json:"read_iops_max,omitempty"`
	TotalBandwidthMax int    `json:"total_bandwidth_max,omitempty"`
	TotalIopsMax      int    `json:"total_iops_max,omitempty"`
	WriteBandwidthMax int    `json:"write_bandwidth_max,omitempty"`
	WriteIopsMax      int    `json:"write_iops_max,omitempty"`
}

PerformancePolicy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewPerformancePolicy

func NewPerformancePolicy(arg []byte) (PerformancePolicy, error)

func (*PerformancePolicy) Unpack

func (en *PerformancePolicy) Unpack(arg map[string]interface{}) error

func (*PerformancePolicy) UnpackB

func (en *PerformancePolicy) UnpackB(arg []byte) error

type Response21

type Response21 struct {
	Tenant  string          `json:"tenant"`
	Path    string          `json:"path"`
	Version string          `json:"version"`
	DataRaw json.RawMessage `json:"data"`
}

type Role

type Role struct {
	Path       string        `json:"path,omitempty"`
	Privileges []interface{} `json:"privileges,omitempty"`
	RoleId     string        `json:"role_id,omitempty"`
}

Role Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewRole

func NewRole(arg []byte) (Role, error)

func (*Role) Unpack

func (en *Role) Unpack(arg map[string]interface{}) error

func (*Role) UnpackB

func (en *Role) UnpackB(arg []byte) error

type SDK

type SDK struct {
}

func NewPoolSDK

func NewPoolSDK(hostname, username, password, apiVersion, tenant, timeout string, headers map[string]string, secure bool, logfile string, stdout bool) (*SDK, error)

func NewSDK

func NewSDK(hostname, username, password, apiVersion, tenant, timeout string, headers map[string]string, secure bool, logfile string, stdout bool) (*SDK, error)

func (SDK) ForceClean

func (c SDK) ForceClean()

Cleans AppInstances, AppTemplates, StorageInstances, Initiators and InitiatorGroups under the currently configured tenant

func (SDK) GetEp

func (c SDK) GetEp(path string) IEndpoint

type Snapshot

type Snapshot struct {
	OpState   string `json:"op_state,omitempty"`
	Path      string `json:"path,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
	UtcTs     string `json:"utc_ts,omitempty"`
	Uuid      string `json:"uuid,omitempty"`
}

Snapshot Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSnapshot

func NewSnapshot(arg []byte) (Snapshot, error)

func (*Snapshot) Unpack

func (en *Snapshot) Unpack(arg map[string]interface{}) error

func (*Snapshot) UnpackB

func (en *Snapshot) UnpackB(arg []byte) error

type SnapshotPolicy

type SnapshotPolicy struct {
	Interval       string `json:"interval,omitempty"`
	Name           string `json:"name,omitempty"`
	Path           string `json:"path,omitempty"`
	RetentionCount int    `json:"retention_count,omitempty"`
	StartTime      string `json:"start_time,omitempty"`
}

SnapshotPolicy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSnapshotPolicy

func NewSnapshotPolicy(arg []byte) (SnapshotPolicy, error)

func (*SnapshotPolicy) Unpack

func (en *SnapshotPolicy) Unpack(arg map[string]interface{}) error

func (*SnapshotPolicy) UnpackB

func (en *SnapshotPolicy) UnpackB(arg []byte) error

type SnmpPolicy

type SnmpPolicy struct {
	Contact  string  `json:"contact,omitempty"`
	Enabled  bool    `json:"enabled,omitempty"`
	Location string  `json:"location,omitempty"`
	Path     string  `json:"path,omitempty"`
	Users    *[]User `json:"users,omitempty"`
}

SnmpPolicy Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSnmpPolicy

func NewSnmpPolicy(arg []byte) (SnmpPolicy, error)

func (*SnmpPolicy) Unpack

func (en *SnmpPolicy) Unpack(arg map[string]interface{}) error

func (*SnmpPolicy) UnpackB

func (en *SnmpPolicy) UnpackB(arg []byte) error

type SnmpUser

type SnmpUser struct {
	AuthPass      string `json:"auth_pass,omitempty"`
	AuthProtocol  string `json:"auth_protocol,omitempty"`
	EncrPass      string `json:"encr_pass,omitempty"`
	EncrProtocol  string `json:"encr_protocol,omitempty"`
	Path          string `json:"path,omitempty"`
	SecurityLevel string `json:"security_level,omitempty"`
	UserId        string `json:"user_id,omitempty"`
	Version       string `json:"version,omitempty"`
	View          string `json:"view,omitempty"`
}

SnmpUser Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSnmpUser

func NewSnmpUser(arg []byte) (SnmpUser, error)

func (*SnmpUser) Unpack

func (en *SnmpUser) Unpack(arg map[string]interface{}) error

func (*SnmpUser) UnpackB

func (en *SnmpUser) UnpackB(arg []byte) error

type StorageInstance

type StorageInstance struct {
	Access             map[string]interface{} `json:"access,omitempty"`
	AccessControlMode  string                 `json:"access_control_mode,omitempty"`
	AclPolicy          *AclPolicy             `json:"acl_policy,omitempty"`
	ActiveInitiators   []interface{}          `json:"active_initiators,omitempty"`
	ActiveStorageNodes []interface{}          `json:"active_storage_nodes,omitempty"`
	AdminState         string                 `json:"admin_state,omitempty"`
	Auth               *Auth                  `json:"auth,omitempty"`
	Causes             []interface{}          `json:"causes,omitempty"`
	DeploymentState    string                 `json:"deployment_state,omitempty"`
	Health             string                 `json:"health,omitempty"`
	IpPool             *IpPool                `json:"ip_pool,omitempty"`
	Name               string                 `json:"name,omitempty"`
	OpState            string                 `json:"op_state,omitempty"`
	Path               string                 `json:"path,omitempty"`
	Uuid               string                 `json:"uuid,omitempty"`
	Volumes            *[]Volume              `json:"volumes,omitempty"`
}

StorageInstance Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewStorageInstance

func NewStorageInstance(arg []byte) (StorageInstance, error)

func (*StorageInstance) Unpack

func (en *StorageInstance) Unpack(arg map[string]interface{}) error

func (*StorageInstance) UnpackB

func (en *StorageInstance) UnpackB(arg []byte) error

type StorageNode

type StorageNode struct {
	AdminState          string                 `json:"admin_state,omitempty"`
	AvailableCapacity   int                    `json:"available_capacity,omitempty"`
	BiosVersion         string                 `json:"bios_version,omitempty"`
	BootDrives          map[string]interface{} `json:"boot_drives,omitempty"`
	BuildVersion        string                 `json:"build_version,omitempty"`
	Causes              []interface{}          `json:"causes,omitempty"`
	CompressionEnabled  bool                   `json:"compression_enabled,omitempty"`
	CompressionRatio    string                 `json:"compression_ratio,omitempty"`
	Disconnected        bool                   `json:"disconnected,omitempty"`
	FlashDevices        map[string]interface{} `json:"flash_devices,omitempty"`
	Hdds                *[]Hdd                 `json:"hdds,omitempty"`
	Health              string                 `json:"health,omitempty"`
	HwHealth            string                 `json:"hw_health,omitempty"`
	HwState             string                 `json:"hw_state,omitempty"`
	InternalIp1         string                 `json:"internal_ip_1,omitempty"`
	InternalIp2         string                 `json:"internal_ip_2,omitempty"`
	LastRebootTimestamp int                    `json:"last_reboot_timestamp,omitempty"`
	MgmtIp1             string                 `json:"mgmt_ip_1,omitempty"`
	MgmtIp2             string                 `json:"mgmt_ip_2,omitempty"`
	Model               string                 `json:"model,omitempty"`
	Name                string                 `json:"name,omitempty"`
	Nics                *[]Nic                 `json:"nics,omitempty"`
	NvmFlashDevices     *[]NvmFlashDevice      `json:"nvm_flash_devices,omitempty"`
	OpProgress          map[string]interface{} `json:"op_progress,omitempty"`
	OpState             string                 `json:"op_state,omitempty"`
	OpStatus            string                 `json:"op_status,omitempty"`
	OsVersion           string                 `json:"os_version,omitempty"`
	Path                string                 `json:"path,omitempty"`
	Psus                map[string]interface{} `json:"psus,omitempty"`
	SerialNo            string                 `json:"serial_no,omitempty"`
	StorageInstances    *[]StorageInstance     `json:"storage_instances,omitempty"`
	SubsystemHealth     map[string]interface{} `json:"subsystem_health,omitempty"`
	SubsystemStates     map[string]interface{} `json:"subsystem_states,omitempty"`
	SwHealth            string                 `json:"sw_health,omitempty"`
	SwState             string                 `json:"sw_state,omitempty"`
	SwVersion           string                 `json:"sw_version,omitempty"`
	TotalCapacity       int                    `json:"total_capacity,omitempty"`
	TotalRawCapacity    int                    `json:"total_raw_capacity,omitempty"`
	Type                string                 `json:"type,omitempty"`
	Upgrade             map[string]interface{} `json:"upgrade,omitempty"`
	Uuid                string                 `json:"uuid,omitempty"`
	Vendor              string                 `json:"vendor,omitempty"`
	Volumes             *[]Volume              `json:"volumes,omitempty"`
}

StorageNode Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewStorageNode

func NewStorageNode(arg []byte) (StorageNode, error)

func (*StorageNode) Unpack

func (en *StorageNode) Unpack(arg map[string]interface{}) error

func (*StorageNode) UnpackB

func (en *StorageNode) UnpackB(arg []byte) error

type StorageTemplate

type StorageTemplate struct {
	Auth            *Auth             `json:"auth,omitempty"`
	IpPool          *IpPool           `json:"ip_pool,omitempty"`
	Name            string            `json:"name,omitempty"`
	Path            string            `json:"path,omitempty"`
	VolumeTemplates *[]VolumeTemplate `json:"volume_templates,omitempty"`
}

StorageTemplate Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewStorageTemplate

func NewStorageTemplate(arg []byte) (StorageTemplate, error)

func (*StorageTemplate) Unpack

func (en *StorageTemplate) Unpack(arg map[string]interface{}) error

func (*StorageTemplate) UnpackB

func (en *StorageTemplate) UnpackB(arg []byte) error

type Subsystem

type Subsystem struct {
	Causes      []interface{} `json:"causes,omitempty"`
	Fan         string        `json:"fan,omitempty"`
	Health      string        `json:"health,omitempty"`
	Network     *Network      `json:"network,omitempty"`
	Path        string        `json:"path,omitempty"`
	Power       string        `json:"power,omitempty"`
	Temperature string        `json:"temperature,omitempty"`
	Voltage     string        `json:"voltage,omitempty"`
}

Subsystem Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSubsystem

func NewSubsystem(arg []byte) (Subsystem, error)

func (*Subsystem) Unpack

func (en *Subsystem) Unpack(arg map[string]interface{}) error

func (*Subsystem) UnpackB

func (en *Subsystem) UnpackB(arg []byte) error

type System

type System struct {
	AccessInterfaceAggrType     string                 `json:"access_interface_aggr_type,omitempty"`
	AllFlashAvailableCapacity   int                    `json:"all_flash_available_capacity,omitempty"`
	AllFlashProvisionedCapacity int                    `json:"all_flash_provisioned_capacity,omitempty"`
	AllFlashTotalCapacity       int                    `json:"all_flash_total_capacity,omitempty"`
	AvailableCapacity           int                    `json:"available_capacity,omitempty"`
	BuildVersion                string                 `json:"build_version,omitempty"`
	CallhomeEnabled             bool                   `json:"callhome_enabled,omitempty"`
	Causes                      []interface{}          `json:"causes,omitempty"`
	CompressionEnabled          bool                   `json:"compression_enabled,omitempty"`
	CompressionRatio            string                 `json:"compression_ratio,omitempty"`
	Dns                         *Dns                   `json:"dns,omitempty"`
	Health                      string                 `json:"health,omitempty"`
	HttpProxy                   *HttpProxy             `json:"http_proxy,omitempty"`
	HybridAvailableCapacity     int                    `json:"hybrid_available_capacity,omitempty"`
	HybridProvisionedCapacity   int                    `json:"hybrid_provisioned_capacity,omitempty"`
	HybridTotalCapacity         int                    `json:"hybrid_total_capacity,omitempty"`
	InterfaceAggregationMode    string                 `json:"interface_aggregation_mode,omitempty"`
	InternalInterfaceAggrType   string                 `json:"internal_interface_aggr_type,omitempty"`
	L3Enabled                   bool                   `json:"l3_enabled,omitempty"`
	LastRebootTimestamp         string                 `json:"last_reboot_timestamp,omitempty"`
	Name                        string                 `json:"name,omitempty"`
	Network                     *Network               `json:"network,omitempty"`
	NetworkDevices              map[string]interface{} `json:"network_devices,omitempty"`
	NtpServers                  *[]NtpServer           `json:"ntp_servers,omitempty"`
	OpState                     string                 `json:"op_state,omitempty"`
	Path                        string                 `json:"path,omitempty"`
	SwVersion                   string                 `json:"sw_version,omitempty"`
	TotalCapacity               int                    `json:"total_capacity,omitempty"`
	TotalProvisionedCapacity    int                    `json:"total_provisioned_capacity,omitempty"`
	Upgrade                     map[string]interface{} `json:"upgrade,omitempty"`
	Uptime                      int                    `json:"uptime,omitempty"`
	Uuid                        string                 `json:"uuid,omitempty"`
}

System Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewSystem

func NewSystem(arg []byte) (System, error)

func (*System) Unpack

func (en *System) Unpack(arg map[string]interface{}) error

func (*System) UnpackB

func (en *System) UnpackB(arg []byte) error

type Tenant

type Tenant struct {
	Descr      string                 `json:"descr,omitempty"`
	Name       string                 `json:"name,omitempty"`
	ParentPath string                 `json:"parent_path,omitempty"`
	Path       string                 `json:"path,omitempty"`
	Subtenants map[string]interface{} `json:"subtenants,omitempty"`
}

Tenant Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewTenant

func NewTenant(arg []byte) (Tenant, error)

func (*Tenant) Unpack

func (en *Tenant) Unpack(arg map[string]interface{}) error

func (*Tenant) UnpackB

func (en *Tenant) UnpackB(arg []byte) error

type User

type User struct {
	Email    string    `json:"email,omitempty"`
	Enabled  bool      `json:"enabled,omitempty"`
	FullName string    `json:"full_name,omitempty"`
	Password string    `json:"password,omitempty"`
	Path     string    `json:"path,omitempty"`
	Roles    *[]Role   `json:"roles,omitempty"`
	Tenants  *[]Tenant `json:"tenants,omitempty"`
	UserId   string    `json:"user_id,omitempty"`
	Version  string    `json:"version,omitempty"`
}

User Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewUser

func NewUser(arg []byte) (User, error)

func (*User) Unpack

func (en *User) Unpack(arg map[string]interface{}) error

func (*User) UnpackB

func (en *User) UnpackB(arg []byte) error

type Vip

type Vip struct {
	Name         string                 `json:"name,omitempty"`
	NetworkPaths map[string]interface{} `json:"network_paths,omitempty"`
	Path         string                 `json:"path,omitempty"`
}

Vip Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewVip

func NewVip(arg []byte) (Vip, error)

func (*Vip) Unpack

func (en *Vip) Unpack(arg map[string]interface{}) error

func (*Vip) UnpackB

func (en *Vip) UnpackB(arg []byte) error

type Volume

type Volume struct {
	ActiveStorageNodes []interface{} `json:"active_storage_nodes,omitempty"`
	AvailabilityState  string        `json:"availability_state,omitempty"`
	CapacityInUse      float64       `json:"capacity_in_use,omitempty"`
	Causes             []interface{} `json:"causes,omitempty"`
	DeploymentState    string        `json:"deployment_state,omitempty"`
	Health             string        `json:"health,omitempty"`
	Name               string        `json:"name,omitempty"`
	OpState            string        `json:"op_state,omitempty"`
	OpStatus           string        `json:"op_status,omitempty"`
	Path               string        `json:"path,omitempty"`
	PlacementMode      string        `json:"placement_mode,omitempty"`
	RecoveryState      string        `json:"recovery_state,omitempty"`
	ReplicaCount       int           `json:"replica_count,omitempty"`
	RestorePoint       string        `json:"restore_point,omitempty"`
	Size               float64       `json:"size,omitempty"`
	Snapshots          *[]Snapshot   `json:"snapshots,omitempty"`
	StorageState       string        `json:"storage_state,omitempty"`
	Uuid               string        `json:"uuid,omitempty"`
}

Volume Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewVolume

func NewVolume(arg []byte) (Volume, error)

func (*Volume) Unpack

func (en *Volume) Unpack(arg map[string]interface{}) error

func (*Volume) UnpackB

func (en *Volume) UnpackB(arg []byte) error

type VolumeTemplate

type VolumeTemplate struct {
	Name          string `json:"name,omitempty"`
	Path          string `json:"path,omitempty"`
	PlacementMode string `json:"placement_mode,omitempty"`
	ReplicaCount  int    `json:"replica_count,omitempty"`
	Size          int    `json:"size,omitempty"`
}

VolumeTemplate Entity Type for use when unpacking IEntity objects returned from an Endpoint call or in a Create or Set request to an Endpoint

func NewVolumeTemplate

func NewVolumeTemplate(arg []byte) (VolumeTemplate, error)

func (*VolumeTemplate) Unpack

func (en *VolumeTemplate) Unpack(arg map[string]interface{}) error

func (*VolumeTemplate) UnpackB

func (en *VolumeTemplate) UnpackB(arg []byte) error

Jump to

Keyboard shortcuts

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