model

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: Apache-2.0, Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockTypeProvioner = "provisioner"
	DockTypeAttacher  = "attacher"
)
View Source
const (
	// ErrorBadRequest
	ErrorBadRequest = 400
	// ErrorUnauthorized
	ErrorUnauthorized = 401
	// ErrorForbidden
	ErrorForbidden = 403
	// ErrorNotFound
	ErrorNotFound = 404
	// ErrorInternalServer
	ErrorInternalServer = 500
	// ErrorNotImplemented
	ErrorNotImplemented = 501
)
View Source
const (
	ReplicationTypeHost  = "HostBased"
	ReplicationTypeArray = "ArrayBased"
)
View Source
const (
	ReplicationDeleted        = "deleted"
	ReplicationCreating       = "creating"
	ReplicationDeleting       = "deleting"
	ReplicationEnabling       = "enabling"
	ReplicationDisabling      = "disabling"
	ReplicationFailingOver    = "failing_over"
	ReplicationFailingBack    = "failing_back"
	ReplicationAvailable      = "available"
	ReplicationError          = "error"
	ReplicationErrorDeleting  = "error_deleting"
	ReplicationErrorEnabling  = "error_enabling"
	ReplicationErrorDisabling = "error_disabling"
	ReplicationErrorFailover  = "error_failover"
	ReplicationErrorFailback  = "error_failback"
	ReplicationEnabled        = "enabled"
	ReplicationDisabled       = "disabled"
	ReplicationFailover       = "failed_over"
)

volume status

View Source
const (
	ReplicationModeSync         = "sync"
	ReplicationModeAsync        = "async"
	ReplicationDefaultBackendId = "default"
	ReplicationDefaultPeriod    = 60
)
View Source
const (
	VolumeCreating       = "creating"
	VolumeAvailable      = "available"
	VolumeInUse          = "inUse"
	VolumeDeleting       = "deleting"
	VolumeError          = "error"
	VolumeErrorDeleting  = "errorDeleting"
	VolumeErrorExtending = "errorExtending"
	VolumeExtending      = "extending"
)

volume status

View Source
const (
	VolumeAttacing       = "attaching"
	VolumeAttached       = "attached"
	VolumeDetached       = "detached"
	VolumeReserved       = "reserved"
	VolumeErrorAttaching = "errorAttaching"
	VolumeErrorDetaching = "errorDetaching"
)

volume attach status

View Source
const (
	VolumeSnapCreating      = "creating"
	VolumeSnapAvailable     = "available"
	VolumeSnapDeleting      = "deleting"
	VolumeSnapError         = "error"
	VolumeSnapErrorDeleting = "errorDeleting"
)

volume snapshot status

View Source
const (
	VolumeAttachCreating      = "creating"
	VolumeAttachAvailable     = "available"
	VolumeAttachErrorDeleting = "errorDeleting"
	VolumeAttachError         = "error"
)

volume attachment status

View Source
const (
	VolumeGroupCreating      = "creating"
	VolumeGroupAvailable     = "available"
	VolumeGroupErrorDeleting = "errorDeleting"
	VolumeGroupError         = "error"
	VolumeGroupDeleting      = "deleting"
	VolumeGroupUpdating      = "updating"
	VolumeGroupInUse         = "inUse"
)

volume group status

Variables

This section is empty.

Functions

func Current

func Current() string

func CurrentVersion

func CurrentVersion() string

func Deprecated

func Deprecated() string

func ErrorBadRequestStatus

func ErrorBadRequestStatus(message string) []byte

ErrorBadRequestStatus

func ErrorForbiddenStatus

func ErrorForbiddenStatus(message string) []byte

ErrorForbiddenStatus

func ErrorInternalServerStatus

func ErrorInternalServerStatus(message string) []byte

ErrorInternalServerStatus

func ErrorNotFoundStatus

func ErrorNotFoundStatus(message string) []byte

ErrorNotFoundStatus

func ErrorNotImplementedStatus

func ErrorNotImplementedStatus(message string) []byte

ErrorNotImplementedStatus

func ErrorUnauthorizedStatus

func ErrorUnauthorizedStatus(message string) []byte

ErrorUnauthorizedStatus

func HttpError

func HttpError(ctx *context.Context, code int, format string, a ...interface{}) error

func NewNotFoundError

func NewNotFoundError(msg string) error

func Supported

func Supported() string

Types

type BaseModel

type BaseModel struct {
	// The uuid of the object, it's unique in the context and generated by system
	// on successful creation of the object. It's not allowed to be modified by
	// the user.
	// +readOnly
	Id string `json:"id"`

	// CreateAt representing the server time when the object was created successfully.
	// Now, it's represented as a time string in RFC8601 format.
	// +readOnly
	CreatedAt string `json:"createdAt"`

	// UpdatedAt representing the server time when the object was updated successfully.
	// Now, it's represented as a time string in RFC8601 format.
	// +readOnly
	UpdatedAt string `json:"updatedAt"`
}

type ConnectionInfo

type ConnectionInfo struct {
	DriverVolumeType     string                 `json:"driverVolumeType,omitempty"`
	ConnectionData       map[string]interface{} `json:"data,omitempty"`
	AdditionalProperties map[string]interface{} `json:"additionalProperties,omitempty"`
}

ConnectionInfo is a structure for all properties of connection when create a volume attachment.

func (*ConnectionInfo) EncodeConnectionData

func (con *ConnectionInfo) EncodeConnectionData() []byte

type CustomPropertiesSpec

type CustomPropertiesSpec map[string]interface{}

CustomPropertiesSpec is a dictionary object that contains unique keys and JSON objects.

func (CustomPropertiesSpec) Encode

func (cps CustomPropertiesSpec) Encode() []byte

func (CustomPropertiesSpec) IsEmpty

func (cps CustomPropertiesSpec) IsEmpty() bool

type DataProtectionLoS

type DataProtectionLoS struct {
	// IsIsolated shall indicate if the replica is in a separate fault domain.
	IsIsolated bool `json:"isIsolated,omitempty" yaml:"isIsolated,omitempty"`

	// MinLifetime shall be an ISO 8601 duration that specifies the minimum
	// required lifetime of the replica. For example, "P3Y6M4DT12H30M5S"
	// represents a duration of "3 years, 6 months, 4 days, 12 hours, 30 minutes
	// and 5 seconds".
	MinLifetime string `json:"minLifetime,omitempty" yaml:"minLifetime,omitempty"`

	// The enumeration literal specifies the geograhic scope of the failure
	// domain, and currently contains these options:
	// * Datacenter: A facility that provides communication, power, or cooling
	//   infrastructure to a co-located set of servers, networking and storage.
	// * Rack: A container within a datacenter that provides communication,
	//   power, or cooling to a set of components.
	// * RackGroup: A set of racks that may share common communication, power,
	//   or cooling.
	// * Region: A set of resources that are required to be either geographically
	//   or politically isolated from resources not in the resources.
	// * Row: A set of adjacent racks or rackgroups that may share common
	//   communication, power, or cooling.
	// * Server: Components of a CPU/memory complex that share the same
	//   infrastructure.
	RecoveryGeographicObject string `json:"recoveryGeographicObjective,omitempty" yaml:"recoveryGeographicObjective,omitempty"`

	// This value shall be an ISO 8601 duration that specifies the maximum time
	// over which source data may be lost on failure. For example,
	// "P3Y6M4DT12H30M5S" represents a duration of "3 years, 6 months, 4 days,
	// 12 hours, 30 minutes and 5 seconds".
	// In the case that IsIsolated = false, failure of the domain is not a
	// consideration.
	RecoveryPointObjectiveTime string `json:"recoveryPointObjectiveTime,omitempty" yaml:"recoveryPointObjectiveTime,omitempty"`

	// The enumeration literal specifies the time after a disaster that the
	// client shall regain conformant service level access to the primary
	// store. The possible values of this property could be:
	// * OnlineActive: Active access to synchronous replicas.
	// * OnlinePassive: Passive access to replicas via the same front-end
	//   interconnect.
	// * Nearline: Access to replica via a different front-end interconnect. A
	//   restore step is required before recovery can commence.
	// * Offline: No direct connection to the replica. (i.e. To a bunker
	//   containing backup media.)
	RecoveryTimeObjective string `json:"recoveryTimeObjective,omitempty" yaml:"recoveryTimeObjective,omitempty"`

	// The enumeration literals may be used to specify the intended outcome of
	// the replication. The possible values of this property could be:
	// * Clone: This enumeration literal shall indicate that replication shall
	//   create a point in time, full copy the source.
	// * Mirror: This enumeration literal shall indicate that replication shall
	//   create and maintain a copy of the source.
	// * Snapshot: This enumeration literal shall indicate that replication
	//   shall create a point in time, virtual copy of the source.
	// * TokenizedClone: This enumeration literal shall indicate that replication
	//   shall create a token based clone.
	ReplicaType string `json:"replicaType,omitempty" yaml:"replicaType,omitempty"`
}

DataProtectionLoS describes a replica that protects data from loss. The requirements must be met collectively by the communication path and the replica. The expectation is that the services required to implement this capability are part of the advertising system.

func (DataProtectionLoS) IsEmpty

func (dp DataProtectionLoS) IsEmpty() bool

type DataProtectionPropertiesSpec

type DataProtectionPropertiesSpec struct {
	// DataProtection represents some suggested data protection capabilities.
	DataProtection DataProtectionLoS `json:"dataProtection,omitempty"`
	// ConsistencyEnabled indicates that the source and target shall be
	// consistent. The default value is false.
	ConsistencyEnabled bool `json:"consistencyEnabled,omitempty"`
}

func (DataProtectionPropertiesSpec) IsEmpty

func (dps DataProtectionPropertiesSpec) IsEmpty() bool

type DataStorageLoS

type DataStorageLoS struct {
	// The enumeration literal specifies the time after a disaster that the
	// client shall regain conformant service level access to the primary
	// store.
	// The expectation is that the services required to implement this
	// capability are part of the advertising system.
	// +units:min
	RecoveryTimeObjective int64 `json:"recoveryTimeObjective,omitempty" yaml:"recoveryTimeObjective,omitempty"`

	// ProvisioningPolicy only supports "Fixed" and "Thin".
	ProvisioningPolicy string `json:"provisioningPolicy,omitempty" yaml:"provisioningPolicy,omitempty"`

	// IsSpaceEfficient indicates that the storage is compressed or deduplicated.
	// The default value for this prperty is false.
	IsSpaceEfficient bool `json:"isSpaceEfficient,omitempty" yaml:"isSpaceEfficient,omitempty"`
}

DataStorageLoS can be used to describe a service option covering storage provisioning and availability.

func (DataStorageLoS) IsEmpty

func (ds DataStorageLoS) IsEmpty() bool

type DockSpec

type DockSpec struct {
	*BaseModel

	// The type of the dock(provisioner/attacher)
	Type string `json:"type,omitempty"`

	// The name of the dock.
	Name string `json:"name,omitempty"`

	// The description of the dock.
	// +optional
	Description string `json:"description,omitempty"`

	// The status of the dock.
	// One of: "available" or "unavailable".
	Status string `json:"status,omitempty"`

	// The storage type of the dock.
	// One of: "block", "file" or "object".
	StorageType string `json:"storageType,omitempty"`

	// Endpoint represents the dock server's access address.
	Endpoint string `json:"endpoint,omitempty"`

	// NodeId represents the identification of the host, it can be considered
	// as instance id or hostname.
	NodeId string `json:"nodeId,omitempty"`

	// DriverName represents the dock provider.
	// Currently One of: "cinder", "ceph", "lvm", "default".
	DriverName string `json:"driverName,omitempty"`

	// Metadata should be kept until the scemantics between opensds volume
	// attachment and backend attached storage resouce description are clear.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`
}

DockSpec is initialized by specific driver configuration. Each backend can be regarded as a docking service between SDS controller and storage service.

type ErrorSpec

type ErrorSpec struct {
	Code    int    `json:"code,omitempty"`
	Message string `json:"message,omitempty"`
}

ErrorSpec describes Detailed HTTP error response, which consists of a HTTP status code, and a custom error message unique for each failure case.

type ExtendVolumeSpec

type ExtendVolumeSpec struct {
	NewSize int64 `json:"newSize,omitempty"`
}

ExtendVolumeSpec ...

type FailoverReplicationSpec

type FailoverReplicationSpec struct {
	AllowAttachedVolume bool   `json:"allowAttachedVolume,omitempty"`
	SecondaryBackendId  string `json:"secondaryBackendId,omitempty"`
}

type HostInfo

type HostInfo struct {
	Platform  string `json:"platform,omitempty"`
	OsType    string `json:"osType,omitempty"`
	Ip        string `json:"ip,omitempty"`
	Host      string `json:"host,omitempty"`
	Initiator string `json:"initiator,omitempty"`
}

HostInfo is a structure for all properties of host when create a volume attachment.

type IOConnectivityLoS

type IOConnectivityLoS struct {
	// The Enumeration Literal shall specify the Access protocol for this
	// service option.
	AccessProtocol string `json:"accessProtocol,omitempty" yaml:"accessProtocol,omitempty"`

	// MaxIOPS shall be the maximum IOs per second that the connection shall
	// allow for the selected access protocol.
	// +units:[IO]/s
	MaxIOPS int64 `json:"maxIOPS,omitempty" yaml:"maxIOPS,omitempty"`

	// MaxBWS shall be the maximum amount of data that can be transmitted in a
	// fixed amount of time.
	// +units:[MB]/s
	MaxBWS int64 `json:"maxBWS,omitempty" yaml:"maxBWS,omitempty"`
}

IOConnectivityLoS can be used to specify the characteristics of storage connectivity.

func (IOConnectivityLoS) IsEmpty

func (ic IOConnectivityLoS) IsEmpty() bool

type NotFoundError

type NotFoundError struct {
	S string
}

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

type NotImplementError

type NotImplementError struct {
	S string
}

Volume group error

func (*NotImplementError) Error

func (e *NotImplementError) Error() string

type ProfileSpec

type ProfileSpec struct {
	*BaseModel

	// The name of the profile.
	Name string `json:"name,omitempty"`

	// The description of the profile.
	// +optional
	Description string `json:"description,omitempty"`

	// The storage type of the profile.
	// One of: block, file or object.
	StorageType string `json:"storageType,omitempty"`

	// ProvisioningProperties represents some suggested properties for performing
	// provisioning policies.
	// +optional
	ProvisioningProperties ProvisioningPropertiesSpec `json:"provisioningProperties,omitempty"`

	// ReplicationProperties represents some suggested properties for performing
	// replicaiton policies.
	// +optional
	ReplicationProperties ReplicationPropertiesSpec `json:"replicationProperties,omitempty"`

	// SnapshotProperties represents some suggested properties for performing
	// snapshot policies.
	// +optional
	SnapshotProperties SnapshotPropertiesSpec `json:"snapshotProperties,omitempty"`

	// DataProtectionProperties represents some suggested properties for
	// performing data protection policies.
	// +optional
	DataProtectionProperties DataProtectionPropertiesSpec `json:"dataProtectionProperties,omitempty"`

	// CustomProperties is a map of keys and JSON object that represents the
	// customized properties of profile, such as requested capabilities
	// including diskType, latency, deduplicaiton, compression and so forth.
	// +optional
	CustomProperties CustomPropertiesSpec `json:"customProperties,omitempty"`
}

An OpenSDS profile is identified by a unique name and ID. With additional profile properties, each profile contains a set of tags of storage capabilities which are desirable features for a class of applications.

type ProvisioningPropertiesSpec

type ProvisioningPropertiesSpec struct {
	// DataStorage represents some suggested data storage capabilities.
	DataStorage DataStorageLoS `json:"dataStorage,omitempty"`
	// IOConnectivity represents some suggested IO connectivity capabilities.
	IOConnectivity IOConnectivityLoS `json:"ioConnectivity,omitempty"`
}

func (ProvisioningPropertiesSpec) IsEmpty

func (pps ProvisioningPropertiesSpec) IsEmpty() bool

type ReplicationPropertiesSpec

type ReplicationPropertiesSpec struct {
	// DataProtection represents some suggested data protection capabilities.
	DataProtection DataProtectionLoS `json:"dataProtection,omitempty"`
	// ReplicaInfos represents some suggested data replication information.
	ReplicaInfos struct {
		// The enumeration literal specifies whether the target elements will be
		// updated synchronously or asynchronously. The possible values of this
		// property could be:
		// * Active: Active-Active (i.e. bidirectional) synchronous updates.
		// * Adaptive: Allows implementation to switch between synchronous
		//   and asynchronous modes.
		// * Asynchronous: Asynchronous updates.
		// * Synchronous: Synchronous updates.
		ReplicaUpdateMode string `json:"replicaUpdateMode,omitempty"`
		// ConsistencyEnabled indicates that the source and target shall be
		// consistent. The default value is false.
		ConsistencyEnabled bool `json:"consistencyEnabled,omitempty"`
		// ReplicationPeriod shall be an ISO 8601 duration that defines the
		// duration of performing replication operation. For example,
		// "P3Y6M4DT12H30M5S" represents a duration of "3 years, 6 months,
		// 4 days, 12 hours, 30 minutes and 5 seconds".
		ReplicationPeriod string `json:"replicationPeriod,omitempty"`
		// ReplicationBandwidth specifies the maximum bandwidth for performing
		// replication operation.
		// +units:Mb/s
		ReplicationBandwidth int64 `json:"replicationBandwidth,omitempty"`
	} `json:"replicaInfos,omitempty"`
}

func (ReplicationPropertiesSpec) IsEmpty

func (rps ReplicationPropertiesSpec) IsEmpty() bool

type ReplicationSpec

type ReplicationSpec struct {
	*BaseModel
	// The uuid of the tenant that the replication belongs to.
	TenantId string `json:"tenantId,omitempty"`

	// The uuid of the user that the replication belongs to.
	// +optional
	UserId string `json:"userId,omitempty"`

	// The name of the replication.
	Name string `json:"name,omitempty"`

	// The description of the replication.
	// +optional
	Description string `json:"description,omitempty"`

	// The uuid of the volume on the primary site.
	PrimaryVolumeId string `json:"primaryVolumeId,omitempty"`

	// The uuid of the volume on the secondary site.
	SecondaryVolumeId string `json:"secondaryVolumeId,omitempty"`

	// NOTE: Need to figure out how to represent the relationship
	// when there are more than 2 sites. May need to use array.
	AvailabilityZone string `json:"availabilityZone,omitempty"`
	// region
	Region string `json:"region,omitempty"`
	// group id
	GroupId string `json:"groupId,omitempty"`
	// primary replication driver data
	PrimaryReplicationDriverData map[string]string `json:"primaryReplicationDriverData,omitempty"`
	// secondary replication driver data
	SecondaryReplicationDriverData map[string]string `json:"secondaryReplicationDriverData,omitempty"`
	// replication status
	ReplicationStatus string `json:"replicationStatus,omitempty"`
	// supports "async" or "sync" now
	ReplicationMode string `json:"replicationMode,omitempty"`
	// 0 means sync replication.
	ReplicationPeriod int64 `json:"replicationPeriod,omitempty"`
	// replication period
	ReplicationBandwidth int64 `json:"replicationBandwidth,omitempty"`
	// profile id
	ProfileId string `json:"profileId,omitempty"`
	// pool id
	PoolId string `json:"poolId,omitempty"`
	// metadata
	Metadata map[string]string `json:"metadata,omitempty"`
	// volume data list
	VolumeDataList []*proto.VolumeData `json:"volumeDataList,omitempty"`
}

ReplicationSpec represents a replication relationship between the volumes on the primary and secondary sites.

type SnapshotPropertiesSpec

type SnapshotPropertiesSpec struct {
	// The property defines how to take snapshots.
	Schedule struct {
		// This vaule is represented as a string in ISO 8601 datetime format.
		// ISO 8601 sets out an internationally agreed way to represent dates:
		// yyyy-mm-ddThh:mm:ss.ffffff. For example, "3:53pm, September 15, 2008"
		// is represented as "2008-09-15T15:53:00".
		Datetime string `json:"datetime,omitempty"`
		// The value specifies the duration of executing a operation, which
		// contains three options including Daily, Weekly and Monthly.
		Occurrence string `json:"occurrence,omitempty"`
	} `json:"schedule,omitempty"`
	Retention struct {
		// The value specifies the total number of snapshots for retention.
		// +optional
		Number int64 `json:"number,omitempty"`
		// The value specifies the duration of snapshots for retention.
		// +optional
		// +units:day
		Duration int64 `json:"duration,omitempty"`
	} `json:"retention,omitempty"`
}

func (SnapshotPropertiesSpec) IsEmpty

func (sps SnapshotPropertiesSpec) IsEmpty() bool

type StoragePoolExtraSpec

type StoragePoolExtraSpec struct {
	// DataStorage represents suggested some data storage capabilities.
	DataStorage DataStorageLoS `json:"dataStorage,omitempty" yaml:"dataStorage,omitempty"`
	// IOConnectivity represents some suggested IO connectivity capabilities.
	IOConnectivity IOConnectivityLoS `json:"ioConnectivity,omitempty" yaml:"ioConnectivity,omitempty"`
	// DataProtection represents some suggested data protection capabilities.
	DataProtection DataProtectionLoS `json:"dataProtection,omitempty" yaml:"dataProtection,omitempty"`

	// Besides those basic suggested pool properties above, vendors can configure
	// some advanced features (diskType, IOPS, throughout, latency, etc)
	// themselves, all these properties can be exposed to controller scheduler
	// and filtered by selector in a extensible way.
	Advanced map[string]interface{} `json:"advanced,omitempty" yaml:"advanced,omitempty"`
}

type StoragePoolSpec

type StoragePoolSpec struct {
	*BaseModel

	// The name of the pool.
	Name string `json:"name,omitempty"`

	// The description of the pool.
	// +optional
	Description string `json:"description,omitempty"`

	// The status of the pool.
	// One of: "available" or "unavailable".
	Status string `json:"status,omitempty"`

	// The uuid of the dock which the pool belongs to.
	DockId string `json:"dockId,omitempty"`

	// The locality that pool belongs to.
	AvailabilityZone string `json:"availabilityZone,omitempty"`

	// The total capacity of the pool.
	// Default unit of TotalCapacity is GB.
	TotalCapacity int64 `json:"totalCapacity,omitempty"`

	// The free capaicty of the pool.
	// Default unit of FreeCapacity is GB.
	FreeCapacity int64 `json:"freeCapacity,omitempty"`

	// The storage type of the storage pool.
	// One of: "block", "file" or "object".
	StorageType string `json:"storageType,omitempty"`

	// Map of keys and StoragePoolExtraSpec object that represents the properties
	// of the pool, such as supported capabilities.
	// +optional
	Extras StoragePoolExtraSpec `json:"extras,omitempty"`

	//Replication type host based or array based
	ReplicationType string `json:"replicationType,omitempty"`

	//Replication driver name
	ReplicationDriverName string `json:"replicationDriverName,omitempty"`
}

A pool is discoveried and updated by a dock service. Each pool can be regarded as a physical storage pool or a virtual storage pool. It's a logical and atomic pool and can be abstracted from any storage platform.

type VersionSpec

type VersionSpec struct {
	// Name is an API version string that consists of a ‘v’ + number,
	// or ‘v’ + number + ‘alpha’ or ‘beta’ + number.
	// +readOnly
	Name string `json:"name,omitempty"`

	// The status of the api version.
	// One of: "CURRENT", "SUPPORTED", "DEPRECATED".
	// +readOnly:true
	Status string `json:"status,omitempty"`

	// UpdatedAt representing the server time when the api version was updated
	// successfully. Now, it's represented as a time string in RFC8601 format.
	// +readOnly
	UpdatedAt string `json:"updatedAt,omitempty"`
}

An API version is a string that consists of a ‘v’ + number, or ‘v’ + number + ‘alpha’ or ‘beta’ + number.

type VolumeAttachmentSpec

type VolumeAttachmentSpec struct {
	*BaseModel

	// The uuid of the project that the volume belongs to.
	TenantId string `json:"tenantId,omitempty"`

	// The uuid of the user that the volume belongs to.
	// +optional
	UserId string `json:"userId,omitempty"`

	// The uuid of the volume which the attachment belongs to.
	VolumeId string `json:"volumeId,omitempty"`

	// The locaility when the volume was attached to a host.
	Mountpoint string `json:"mountpoint,omitempty"`

	// The status of the attachment.
	// One of: "attaching", "attached", "error", etc.
	Status string `json:"status,omitempty"`

	// Metadata should be kept until the scemantics between opensds volume
	// attachment and backend attached storage resouce description are clear.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`

	// See details in `HostInfo`
	HostInfo `json:"hostInfo,omitempty"`

	// See details in `ConnectionInfo`
	ConnectionInfo `json:"connectionInfo,omitempty"`

	// The protocl
	AccessProtocol string `json:"accessProtocol,omitempty"`
}

VolumeAttachmentSpec is a description of volume attached resource.

type VolumeGroupSpec

type VolumeGroupSpec struct {
	*BaseModel
	// The name of the volume group.
	Name string `json:"name,omitempty"`

	Status string `json:"status,omitempty"`

	// The uuid of the project that the volume snapshot belongs to.
	TenantId string `json:"tenantId,omitempty"`

	// The uuid of the user that the volume snapshot belongs to.
	// +optional
	UserId string `json:"userId,omitempty"`

	// The description of the volume group.
	// +optional
	Description string `json:"description,omitempty"`

	// The uuid of the profile which the volume group belongs to.
	Profiles []string `json:"profiles,omitempty"`

	// The locality that volume group belongs to.
	// +optional
	AvailabilityZone string `json:"availabilityZone,omitempty"`

	// The addVolumes contain UUIDs of volumes to be added to the group.
	AddVolumes []string `json:"addVolumes,omitempty"`

	// The removeVolumes contains the volumes to be removed from the group.
	RemoveVolumes []string `json:"removeVolumes,omitempty"`

	// The uuid of the pool which the volume belongs to.
	// +readOnly
	PoolId string `json:"poolId,omitempty"`

	GroupSnapshots []string `json:"groupSnapshots,omitempty"`
}

type VolumeSnapshotSpec

type VolumeSnapshotSpec struct {
	*BaseModel

	// The uuid of the project that the volume snapshot belongs to.
	TenantId string `json:"tenantId,omitempty"`

	// The uuid of the user that the volume snapshot belongs to.
	// +optional
	UserId string `json:"userId,omitempty"`

	// The name of the volume snapshot.
	Name string `json:"name,omitempty"`

	// The description of the volume snapshot.
	// +optional
	Description string `json:"description,omitempty"`

	// The size of the volume which the snapshot belongs to.
	// Default unit of volume Size is GB.
	Size int64 `json:"size,omitempty"`

	// The status of the volume snapshot.
	// One of: "available", "error", etc.
	Status string `json:"status,omitempty"`

	// The uuid of the volume which the snapshot belongs to.
	VolumeId string `json:"volumeId,omitempty"`

	// Metadata should be kept until the scemantics between opensds volume
	// snapshot and backend storage resouce snapshot description are clear.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`
}

VolumeSnapshotSpec is a description of volume snapshot resource.

type VolumeSpec

type VolumeSpec struct {
	*BaseModel

	// The uuid of the project that the volume belongs to.
	TenantId string `json:"tenantId,omitempty"`

	// The uuid of the user that the volume belongs to.
	// +optional
	UserId string `json:"userId,omitempty"`

	// The name of the volume.
	Name string `json:"name,omitempty"`

	// The description of the volume.
	// +optional
	Description string `json:"description,omitempty"`

	// The group id of the volume.
	GroupId string `json:"groupId,omitempty"`

	// The size of the volume requested by the user.
	// Default unit of volume Size is GB.
	Size int64 `json:"size,omitempty"`

	// The locality that volume belongs to.
	AvailabilityZone string `json:"availabilityZone,omitempty"`

	// The status of the volume.
	// One of: "available", "error", "in-use", etc.
	Status string `json:"status,omitempty"`

	// The uuid of the pool which the volume belongs to.
	// +readOnly
	PoolId string `json:"poolId,omitempty"`

	// The uuid of the profile which the volume belongs to.
	ProfileId string `json:"profileId,omitempty"`

	// Metadata should be kept until the scemantics between opensds volume
	// and backend storage resouce description are clear.
	// +optional
	Metadata map[string]string `json:"metadata,omitempty"`

	// The uuid of the snapshot which the volume is created
	SnapshotId string `json:"snapshotId, omitempty"`

	// The uuid of the replication which the volume belongs to.
	ReplicationId string `json:"replicationId,omitempty"`

	// The uuid of the replication which the volume belongs to.
	ReplicationDriverData map[string]string `json:"replicationDriverData,omitempty"`
	// Attach status of the volume.
	AttachStatus string
}

VolumeSpec is an block device created by storage service, it can be attached to physical machine or virtual machine instance.

Jump to

Keyboard shortcuts

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