elementsw

package
v0.0.0-...-1403f21 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2022 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Provider

func Provider() terraform.ResourceProvider

Provider is the main meathod for ElementSW Terraform provider

Types

type APIError

type APIError struct {
	ID    int `json:"id"`
	Error struct {
		Code    int    `json:"code"`
		Message string `json:"message"`
		Name    string `json:"name"`
	} `json:"error"`
}

APIError is any error the api gives

type Client

type Client struct {
	Host                  string
	Username              string
	Password              string
	MaxConcurrentRequests int
	HTTPTransport         http.RoundTripper
	// contains filtered or unexported fields
}

A Client to interact with the Element API

func (*Client) CallAPIMethod

func (c *Client) CallAPIMethod(method string, params map[string]interface{}) (*json.RawMessage, error)

CallAPIMethod can be used to make a request to any Element API method, receiving results as raw JSON

func (*Client) GetAPIVersion

func (c *Client) GetAPIVersion() string

GetAPIVersion returns the API version that will be used for Element API requests

func (*Client) SetAPIVersion

func (c *Client) SetAPIVersion(apiVersion string)

SetAPIVersion for the client to use for requests to the Element API

type CreateAccountRequest

type CreateAccountRequest struct {
	Username        string      `structs:"username"`
	InitiatorSecret string      `structs:"initiatorSecret,omitempty"`
	TargetSecret    string      `structs:"targetSecret,omitempty"`
	Attributes      interface{} `structs:"attributes,omitempty"`
}

CreateAccountRequest is the user input for creating an account

type CreateAccountResult

type CreateAccountResult struct {
	Account account `json:"account"`
}

CreateAccountResult is the api returned output

type CreateInitiatorsRequest

type CreateInitiatorsRequest struct {
	Initiators []initiator `structs:"initiators"`
}

CreateInitiatorsRequest the user input for creating an initiator

type CreateInitiatorsResult

type CreateInitiatorsResult struct {
	Initiators []initiatorResponse `json:"initiators"`
}

CreateInitiatorsResult the API resutls for creatin an initiator

type CreateVolumeAccessGroupRequest

type CreateVolumeAccessGroupRequest struct {
	Name       string      `structs:"name"`
	Initiators []string    `structs:"initiators"`
	Volumes    []int       `structs:"volumes"`
	Attributes interface{} `structs:"attributes"`
	ID         int         `structs:"id"`
}

CreateVolumeAccessGroupRequest the users input for creating an volume access group

type CreateVolumeAccessGroupResult

type CreateVolumeAccessGroupResult struct {
	VolumeAccessGroupID int `json:"volumeAccessGroupID"`
	// contains filtered or unexported fields
}

CreateVolumeAccessGroupResult the API results for creating an aaccess group

type CreateVolumeRequest

type CreateVolumeRequest struct {
	Name       string           `structs:"name"`
	AccountID  int              `structs:"accountID"`
	TotalSize  int              `structs:"totalSize"`
	Enable512E bool             `structs:"enable512e"`
	Attributes interface{}      `structs:"attributes"`
	QOS        QualityOfService `structs:"qos"`
}

CreateVolumeRequest the users input for creating a Volume

type CreateVolumeResult

type CreateVolumeResult struct {
	VolumeID int    `json:"volumeID"`
	Volume   volume `json:"volume"`
}

CreateVolumeResult the api results for creating a volume

type DeleteInitiatorsRequest

type DeleteInitiatorsRequest struct {
	Initiators []int `structs:"initiators"`
}

DeleteInitiatorsRequest the users input for deleteing an initiator

type DeleteVolumeAccessGroupRequest

type DeleteVolumeAccessGroupRequest struct {
	VolumeAccessGroupID    int  `structs:"volumeAccessGroupID"`
	DeleteOrphanInitiators bool `structs:"deleteOrphanInitiators"`
	Force                  bool `structs:"force"`
}

DeleteVolumeAccessGroupRequest the user input for deleteing an volume access group

type DeleteVolumeRequest

type DeleteVolumeRequest struct {
	VolumeID int `structs:"volumeID"`
}

DeleteVolumeRequest the user input for deleteing a volume

type ModifyAccountRequest

type ModifyAccountRequest struct {
	AccountID       int         `structs:"accountID"`
	InitiatorSecret string      `structs:"initiatorSecret,omitempty"`
	TargetSecret    string      `structs:"targetSecret,omitempty"`
	Attributes      interface{} `structs:"attributes,omitempty"`
	Username        string      `structs:"username,omitempty"`
}

ModifyAccountRequest is the users input for modifying an account

type ModifyInitiatorsRequest

type ModifyInitiatorsRequest struct {
	Initiators []initiator `structs:"initiators"`
}

ModifyInitiatorsRequest the users input for modifying a Request

type ModifyVolumeAccessGroupRequest

type ModifyVolumeAccessGroupRequest struct {
	VolumeAccessGroupID    int         `structs:"volumeAccessGroupID"`
	Name                   string      `structs:"name"`
	Attributes             interface{} `structs:"attributes"`
	Initiators             []int       `structs:"initiators"`
	DeleteOrphanInitiators bool        `structs:"deleteOrphanInitiators"`
	Volumes                []int       `structs:"volumes"`
}

ModifyVolumeAccessGroupRequest the users input for modifying a colume access group

type ModifyVolumeRequest

type ModifyVolumeRequest struct {
	VolumeID   int              `structs:"volumeID"`
	AccountID  int              `structs:"accountID"`
	Attributes interface{}      `structs:"attributes"`
	QOS        QualityOfService `structs:"qos"`
	TotalSize  int              `structs:"totalSize"`
}

ModifyVolumeRequest the user input for modify a volume

type QualityOfService

type QualityOfService struct {
	MinIOPS   int `structs:"minIOPS"`
	MaxIOPS   int `structs:"maxIOPS"`
	BurstIOPS int `structs:"burstIOPS"`
}

QualityOfService quailty of service information

type RemoveAccountRequest

type RemoveAccountRequest struct {
	AccountID int `structs:"accountID"`
}

RemoveAccountRequest is the users input for deleteing an account

Directories

Path Synopsis
element

Jump to

Keyboard shortcuts

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