fusionstorage

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BasicURI                   = "/dsware/service/"
	CallTimeout                = 50
	LoginSocketTimeout         = 32
	UnitGiShiftBit             = 10
	DefaultAZ                  = "default"
	NamePrefix                 = "opensds"
	LunId                      = "lunId"
	ConnectorType              = "connectorType"
	FusionstorageIscsi         = "fusionstorage_iscsi"
	InitiatorNotExistErrorCode = "32155103"
	VolumeNotExistErrorCode    = "32150005"
	CmdBin                     = "fsc_cli"
	MaxRetryNode               = 3
	DefaultConfPath            = "/etc/opensds/driver/fusionstorage.yaml"
)

Variables

View Source
var CliErrorMap = map[string]string{
	"50000001": "DSware error",
	"50150001": "Receive a duplicate request",
	"50150002": "Command type is not supported",
	"50150003": "Command format is error",
	"50150004": "Lost contact with major VBS",
	"50150005": "Volume does not exist",
	"50150006": "Snapshot does not exist",
	"50150007": "Volume already exists or name exists or name duplicates with a snapshot name",
	"50150008": "The snapshot has already existed",
	"50150009": "VBS space is not enough",
	"50150010": "The node type is error",
	"50150011": "Volume and snapshot number is beyond max",
	"50150012": "VBS is not ready",
	"50150013": "The ref num of node is not 0",
	"50150014": "The volume is not in the pre-deletion state.",
	"50150015": "The storage resource pool is faulty",
	"50150016": "VBS handle queue busy",
	"50150017": "VBS handle request timeout",
	"50150020": "VBS metablock is locked",
	"50150021": "VBS pool dose not exist",
	"50150022": "VBS is not ok",
	"50150023": "VBS pool is not ok",
	"50150024": "VBS dose not exist",
	"50150064": "VBS load SCSI-3 lock pr meta failed",
	"50150100": "The disaster recovery relationship exists",
	"50150101": "The DR relationship does not exist",
	"50150102": "Volume has existed mirror",
	"50150103": "The volume does not have a mirror",
	"50150104": "Incorrect volume status",
	"50150105": "The mirror volume already exists",
}

Functions

func EncodeName

func EncodeName(id string) string

func NewCliError

func NewCliError(code string) error

Types

type AuthOptions

type AuthOptions struct {
	Username        string   `yaml:"username"`
	Password        string   `yaml:"password"`
	Url             string   `yaml:"url"`
	FmIp            string   `yaml:"fmIp,omitempty"`
	FsaIp           []string `yaml:"fsaIp,flow"`
	PwdEncrypter    string   `yaml:"PwdEncrypter,omitempty"`
	EnableEncrypted bool     `yaml:"EnableEncrypted,omitempty"`
}

type CliError

type CliError struct {
	Msg  string
	Code string
}

func NewCliErrorBase

func NewCliErrorBase(msg, code string) *CliError

func (*CliError) Error

func (c *CliError) Error() string

type Config

type Config struct {
	AuthOptions `yaml:"authOptions"`
	Pool        map[string]PoolProperties `yaml:"pool,flow"`
}

type Driver

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

func (*Driver) CreateSnapshot

func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*VolumeSnapshotSpec, error)

func (*Driver) CreateVolume

func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*VolumeSpec, error)

func (*Driver) CreateVolumeGroup

func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*VolumeGroupSpec, error)

func (*Driver) DeleteSnapshot

func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error

func (*Driver) DeleteVolume

func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error

func (*Driver) DeleteVolumeGroup

func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error

func (*Driver) ExtendVolume

func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*VolumeSpec, error)

func (*Driver) InitializeConnection

func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*ConnectionInfo, error)

func (*Driver) InitializeSnapshotConnection

func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*ConnectionInfo, error)

func (*Driver) ListPools

func (d *Driver) ListPools() ([]*StoragePoolSpec, error)

func (*Driver) PullSnapshot

func (d *Driver) PullSnapshot(snapIdentifier string) (*VolumeSnapshotSpec, error)

func (*Driver) PullVolume

func (d *Driver) PullVolume(volIdentifier string) (*VolumeSpec, error)

func (*Driver) Setup

func (d *Driver) Setup() error

func (*Driver) TerminateConnection

func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error

func (*Driver) TerminateSnapshotConnection

func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error

func (*Driver) Unset

func (d *Driver) Unset() error

func (*Driver) UpdateVolumeGroup

func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*VolumeGroupSpec, error)

type FsCli added in v0.5.1

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

func (*FsCli) RunCmd added in v0.5.1

func (c *FsCli) RunCmd(args ...string) ([]string, error)

func (*FsCli) StartServer added in v0.5.1

func (c *FsCli) StartServer() error

Jump to

Keyboard shortcuts

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