Documentation ¶
Overview ¶
This module implements the common data structure.
Index ¶
- Constants
- 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
- type AlertSpec
- type BaseModel
- type CollectMetricSpec
- type ConnectionInfo
- type DataProtectionLoS
- type DataStorageLoS
- type DockSpec
- type ErrorSpec
- type ExtendVolumeSpec
- type FailoverReplicationSpec
- type FileShareAclSpec
- type FileShareSnapshotSpec
- type FileShareSpec
- type GetMetricSpec
- type HostSpec
- type IOConnectivityLoS
- type Identifier
- type Initiator
- type LabelSet
- type Metric
- type MetricSpec
- type NoParam
- type NotFoundError
- type NotImplementError
- type PostableAlertSpec
- type ReplicationSpec
- type StoragePoolExtraSpec
- type StoragePoolSpec
- type UrlDesc
- type UrlSpec
- 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 ()
fileshare acl 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" VolumeAttachDeleting = "deleting" 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 ErrorBadRequestStatus ¶
ErrorBadRequestStatus
func ErrorInternalServerStatus ¶
ErrorInternalServerStatus
func ErrorNotImplementedStatus ¶
ErrorNotImplementedStatus
func ErrorUnauthorizedStatus ¶
ErrorUnauthorizedStatus
func NewNotFoundError ¶ added in v0.2.1
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 ¶ added in v0.5.2
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
EncodeConnectionData will marshal itself to byte
type DataProtectionLoS ¶ added in v0.3.1
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 ¶ added in v0.3.1
func (dp DataProtectionLoS) IsEmpty() bool
type DataStorageLoS ¶ added in v0.1.6
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"` // Compression/Deduplication indicates that the storage is compressed or/and deduplicated. // The default value for these prperties are false. Compression bool `json:"compression" yaml:"compression,omitempty"` Deduplication bool `json:"deduplication" yaml:"deduplication,omitempty"` }
DataStorageLoS can be used to describe a service option covering storage provisioning and availability.
func (DataStorageLoS) IsEmpty ¶ added in v0.3.1
func (ds DataStorageLoS) IsEmpty() bool
func (DataStorageLoS) IsEmptyStorageAccessCapability ¶ added in v0.5.3
func (ds DataStorageLoS) IsEmptyStorageAccessCapability() 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 ¶ added in v0.1.1
type ExtendVolumeSpec struct {
NewSize int64 `json:"newSize,omitempty"`
}
ExtendVolumeSpec ...
type FailoverReplicationSpec ¶ added in v0.1.8
type FileShareAclSpec ¶ added in v0.5.3
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"` // One of: "available", "error" etc. Status string `json:"status,omitempty"` // and backend storage resouce description are clear. // +optional Metadata map[string]string `json:"metadata,omitempty"` }TenantId
type FileShareSnapshotSpec ¶ added in v0.5.2
type FileShareSnapshotSpec struct { string `json:"tenantId,omitempty"` // +optional UserId string `json:"userId,omitempty"` FileShareId string `json:"fileshareId,omitempty"` Name string `json:"name,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"` // and backend storage resouce description are clear. // +optional Metadata map[string]string `json:"metadata,omitempty"` }TenantId
FileShareSnapshotSpec is a description of fileshare snapshot resource.
type FileShareSpec ¶ added in v0.5.2
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"` SnapshotId string `json:"snapshotId,omitempty"` SnapshotName string `json:"snapshotName,omitempty"` ExportLocations []string `json:"exportLocations,omitempty"` // and backend storage resouce description are clear. // +optional Metadata map[string]string `json:"metadata,omitempty"` }TenantId
type GetMetricSpec ¶ added in v0.5.2
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 HostSpec ¶ added in v0.12.0
type HostSpec struct { *BaseModel // The uuid of the project that the host belongs to. TenantId string `json:"tenantId,omitempty"` // The uuid of the user that the host belongs to. // +optional UserId string `json:"userId,omitempty"` // The name of the host. // Only numbers, letters, '-', '_', '.' in ASCII characters are allowed. HostName string `json:"hostName,omitempty"` // The OS type of the host. OsType string `json:"osType,omitempty"` // The way to access host, system will access host to get more information // and install agent if accessMode is 'Agent'. // 'port', 'username'and 'password' are requried in 'Agent' mode. // Enum: [agent agentless] AccessMode string `json:"accessMode,omitempty"` // The locality that pool belongs to. IP string `json:"ip,omitempty"` // The accessible port for user connecting // +optional Port int64 `json:"port,omitempty"` // username // +optional Username string `json:"username,omitempty"` // password // +optional Password string `json:"password,omitempty"` // availability zones // +optional AvailabilityZones []string `json:"availabilityZones"` // initiators // +optional Initiators []*Initiator `json:"initiators"` }
HostSpec is a comupter system which can be discoveried manually in agentless mode or automatically in Agent mode. It's a consumer of volume or file share from storage.
func (HostSpec) MarshalJSON ¶ added in v0.12.0
MarshalJSON to remove sensitive data
type IOConnectivityLoS ¶ added in v0.1.6
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"` // MinIOPS shall be the minimum IOs per second that the connection shall // allow for the selected access protocol. // +units:[IO]/s MinIOPS int64 `json:"minIOPS,omitempty" yaml:"minIOPS,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"` // MinBWS shall be the minimum amount of data that can be transmitted in a // fixed amount of time. // +units:[MB]/s MinBWS int64 `json:"minBWS,omitempty" yaml:"minBWS,omitempty"` // maximum supported latency value Latency int64 `json:"latency,omitempty" yaml:"latency,omitempty"` }
IOConnectivityLoS can be used to specify the characteristics of storage connectivity.
func (IOConnectivityLoS) IsEmpty ¶ added in v0.3.1
func (ic IOConnectivityLoS) IsEmpty() bool
type Identifier ¶ added in v0.12.0
type Identifier struct { //This indicates the world wide, persistent name of the resource DurableName string `json:"durableName,omitempty"` DurableNameFormat string `json:"durableNameFormat,omitempty"` }
This type describes any additional identifiers for a resource which is used to uniquly identify the resource.
type Initiator ¶ added in v0.12.0
type Initiator struct { // port name PortName string `json:"portName,omitempty"` // protocol // Enum: [iSCSI FC] Protocol string `json:"protocol,omitempty"` }
Initiator can include any port which is used to connect storage
type MetricSpec ¶ added in v0.5.2
type MetricSpec struct { // Instance ID -\> volumeID/NodeID InstanceID string `json:"instanceID,omitempty"` // instance name -\> volume name / node name etc. InstanceName string `json:"instanceName,omitempty"` // job -\> Prometheus/openSDS Job string `json:"job,omitempty"` /*Labels - There can be multiple componets/properties associated with a metric , these are catured using this map Example: Labels[pool]="pool1";Labels[device]="dm-0" */ Labels map[string]string `json:"labels,omitempty"` // component -\> disk/logicalVolume/VG etc Component string `json:"component,omitempty"` // name -\> metric name -\> readRequests/WriteRequests/Latency etc Name string `json:"name,omitempty"` // unit -\> seconds/bytes/MBs etc 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 ¶ added in v0.2.1
type NotFoundError struct {
S string
}
func (*NotFoundError) Error ¶ added in v0.2.1
func (e *NotFoundError) Error() string
type NotImplementError ¶ added in v0.1.8
type NotImplementError struct {
S string
}
Volume group error
func (*NotImplementError) Error ¶ added in v0.1.8
func (e *NotImplementError) Error() string
type PostableAlertSpec ¶ added in v0.5.2
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 ReplicationSpec ¶ added in v0.1.8
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"` // 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 StoragePoolExtraSpec ¶ added in v0.1.6
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 consumed or used capaicty of the pool. // Default unit of ConsumedCapacity is GB. ConsumedCapacity int64 `json:"consumedCapacity,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 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 host which the attachment belongs to. HostId string `json:"hostId,omitempty"` // The uuid of the volume which the attachment belongs to. VolumeId string `json:"volumeId,omitempty"` // The status of the attachment. // One of: "attaching", "attached", "error", etc. Status string `json:"status,omitempty"` // The locaility when the volume was attached to a host. Mountpoint string `json:"mountpoint,omitempty"` // read-only (‘ro’) or read-and-write (‘rw’), default is ‘rw’ AttachMode string `json:"attachMode,omitempty"` // The protocol AccessProtocol string `json:"accessProtocol,omitempty"` // See details in `ConnectionInfo` ConnectionInfo `json:"connectionInfo,omitempty"` }
VolumeAttachmentSpec is a description of volume attached resource.
type VolumeGroupSpec ¶ added in v0.1.8
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 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"` // 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"` Identifier *Identifier `json:"identifier,omitempty"` }
VolumeSpec is an block device created by storage service, it can be attached to physical machine or virtual machine instance.