Documentation ¶
Overview ¶
This module implements the common data structure.
Index ¶
- Constants
- func Current() string
- func CurrentVersion() string
- func Deprecated() string
- func ErrorBadRequestStatus(message string) []byte
- func ErrorForbiddenStatus(message string) []byte
- func ErrorInternalServerStatus(message string) []byte
- func ErrorNotFoundStatus(message string) []byte
- func ErrorNotImplementedStatus(message string) []byte
- func ErrorUnauthorizedStatus(message string) []byte
- func NewNotFoundError(msg string) error
- func Supported() string
- type AlertSpec
- type BaseModel
- type CollectMetricSpec
- type ConnectionInfo
- type CustomPropertiesSpec
- type DataProtectionLoS
- type DataProtectionPropertiesSpec
- type DataStorageLoS
- type DockSpec
- type ErrorSpec
- type ExtendVolumeSpec
- type FailoverReplicationSpec
- type FileShareAclSpec
- type FileShareSnapshotSpec
- type FileShareSpec
- type GetMetricSpec
- type HostInfo
- type IOConnectivityLoS
- type LabelSet
- type Metric
- type MetricSpec
- type NotFoundError
- type NotImplementError
- type PostableAlertSpec
- type ProfileSpec
- type ProvisioningPropertiesSpec
- type ReplicationPropertiesSpec
- type ReplicationSpec
- type SnapshotPropertiesSpec
- type StoragePoolExtraSpec
- type StoragePoolSpec
- type VersionSpec
- type VolumeAttachmentSpec
- type VolumeGroupSpec
- type VolumeSnapshotSpec
- type VolumeSpec
Constants ¶
const ( DockTypeProvioner = "provisioner" DockTypeAttacher = "attacher" )
const ( ErrorBadRequest = http.StatusBadRequest ErrorForbidden = http.StatusForbidden ErrorNotFound = http.StatusNotFound ErrorInternalServer = http.StatusInternalServerError ErrorNotImplemented = http.StatusNotImplemented )
const ( ReplicationTypeHost = "HostBased" ReplicationTypeArray = "ArrayBased" )
const ( ReplicationModeSync = "sync" ReplicationModeAsync = "async" ReplicationDefaultBackendId = "default" ReplicationDefaultPeriod = 60 )
const ()
Fileshare status
const ()
fileshare snapshot status
const ( VolumeCreating = "creating" VolumeAvailable = "available" VolumeInUse = "inUse" VolumeDeleting = "deleting" VolumeError = "error" VolumeErrorDeleting = "errorDeleting" VolumeErrorExtending = "errorExtending" VolumeExtending = "extending" )
volume status
const ( VolumeAttaching = "attaching" VolumeAttached = "attached" VolumeDetached = "detached" VolumeReserved = "reserved" VolumeErrorAttaching = "errorAttaching" VolumeErrorDetaching = "errorDetaching" )
volume attach status
const ( VolumeSnapCreating = "creating" VolumeSnapAvailable = "available" VolumeSnapDeleting = "deleting" VolumeSnapError = "error" VolumeSnapErrorDeleting = "errorDeleting" )
volume snapshot status
const ( VolumeAttachCreating = "creating" VolumeAttachAvailable = "available" VolumeAttachErrorDeleting = "errorDeleting" VolumeAttachError = "error" )
volume attachment status
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 replication status
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 CurrentVersion ¶
func CurrentVersion() string
func Deprecated ¶
func Deprecated() string
func ErrorBadRequestStatus ¶
ErrorBadRequestStatus
func ErrorInternalServerStatus ¶
ErrorInternalServerStatus
func ErrorNotImplementedStatus ¶
ErrorNotImplementedStatus
func ErrorUnauthorizedStatus ¶
ErrorUnauthorizedStatus
func NewNotFoundError ¶
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 CollectMetricSpec ¶
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) GetCapabilitiesProperties ¶
func (cps CustomPropertiesSpec) GetCapabilitiesProperties() map[string]interface{}
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" 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"` CharacterCodeSet string `json:"characterCodeSet,omitempty" yaml:"characterCodeSet,omitempty"` MaxFileNameLengthBytes int64 `json:"maxFileNameLengthBytes,omitempty" yaml:"maxFileNameLengthBytes,omitempty"` StorageAccessCapability []string `json:"storageAccessCapability,omitempty" yaml:"storageAccessCapability,omitempty"` // IsSpaceEfficient indicates that the storage is compressed or deduplicated. // The default value for this prperty is false. IsSpaceEfficient bool `json:"isSpaceEfficient" 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 FileShareAclSpec ¶
type FileShareAclSpec struct { string `json:"tenantId,omitempty"` FileShareId string `json:"fileshareId,omitempty"` Type string `json:"type,omitempty"` AccessCapability []string `json:accessCapability",omitempty"` AccessTo []string `json:accessTo",omitempty"` Description string `json:"description,omitempty"` }TenantId
type FileShareSnapshotSpec ¶
type FileShareSnapshotSpec struct { string `json:"tenantId,omitempty"` // +optional UserId string `json:"userId,omitempty"` FileShareId string `json:"fileshareId,omitempty"` Name string `json:"name,omitempty"` Protocols []string `json:"protocols,omitempty"` // +optional Description string `json:"description,omitempty"` // Default unit of filesahre Size is GB. ShareSize int64 `json:"shareSize,omitempty"` SnapshotSize int64 `json:"snapshotSize,omitempty"` // One of: "available", "error", etc. Status string `json:"status,omitempty"` }TenantId
FileShareSnapshotSpec is a description of fileshare snapshot resource.
type FileShareSpec ¶
type FileShareSpec struct { string `json:"tenantId,omitempty"` // +optional UserId string `json:"userId,omitempty"` Name string `json:"name,omitempty"` Protocols []string `json:"protocols,omitempty"` // +optional Description string `json:"description,omitempty"` // Default unit of fileshare Size is GB. Size int64 `json:"size,omitempty"` AvailabilityZone string `json:"availabilityZone,omitempty"` // One of: "available", "error" etc. Status string `json:"status,omitempty"` // +readOnly PoolId string `json:"poolId,omitempty"` ProfileId string `json:"profileId,omitempty"` SnapshotId string `json:"snapshotId,omitempty"` ExportLocations []string `json:"exportLocations,omitempty"` }TenantId
type GetMetricSpec ¶
type GetMetricSpec struct { *BaseModel // the instance on which the metrics are to be collected InstanceId string `json:"instanceId,omitempty"` // the name of the metric to retrieve MetricName string `json:"metricName,omitempty"` StartTime string `json:"startTime,omitempty"` EndTime string `json:"endTime,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 MetricSpec ¶
type MetricSpec struct { InstanceID string `json:"instanceID,omitempty"` InstanceName string `json:"instanceName,omitempty"` Job string `json:"job,omitempty"` Labels map[string]string `json:"labels,omitempty"` Component string `json:"component,omitempty"` Name string `json:"name,omitempty"` Unit string `json:"unit,omitempty"` // Can be used to determine Total/Avg etc AggrType string `json:"aggrType,omitempty"` MetricValues []*Metric `json:"metricValues,omitempty"` }
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 PostableAlertSpec ¶
type PostableAlertSpec struct { // annotations Annotations LabelSet `json:"annotations,omitempty"` // end at // Format: date-time EndAt time.Time `json:"endAt,omitempty"` // start at // Format: date-time StartAt time.Time `json:"startAt,omitempty"` AlertSpec `json:"alert,omitempty"` }
PostableAlertSpec is a data structure that models the alert information to be sent to the Prometheus Alert Manager
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.
func NewProfileFromJson ¶
func NewProfileFromJson(s string) *ProfileSpec
func (*ProfileSpec) ToJson ¶
func (p *ProfileSpec) ToJson() string
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"` Topology struct { Bucket string `json:"bucket,omitempty"` // This is virtual bucket managed by multi-cloud } `json:"topology,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"` // MultiAttach // If true, this volume can attach to more than one instance. Default will be multiattach:False MultiAttach bool `json:"multiAttach"` // 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 protocol AccessProtocol string `json:"accessProtocol,omitempty"` // read-only (‘ro’) or read-and-write (‘rw’), default is ‘rw’ AttachMode string `json:"attachMode,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 uuid of the profile which the volume belongs to. ProfileId string `json:"profileId,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"` // Download Snapshot From Cloud SnapshotFromCloud bool `json:"snapshotFromCloud,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 // Whether the volume can be attached more than once, default value is false. MultiAttach bool `json:"multiAttach,omitempty"` }
VolumeSpec is an block device created by storage service, it can be attached to physical machine or virtual machine instance.