api

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

README

OpenStorage API usage

Any storage product that uses the openstorage API can be managed via this API. Below are some examples of using this API.

Enumerate nodes in a cluster

import (
    ...
    
    "github.com/libopenstorage/gossip/types"
    "github.com/libopenstorage/openstorage/api"
    "github.com/libopenstorage/openstorage/api/client/cluster"
)

type myapp struct {
    manager cluster.Cluster
}

func (c *myapp) init() {
    // Choose the default version.
    // Leave the host blank to use the local UNIX socket, or pass in an IP and a port at which the server is listening on.
    clnt, err := cluster.NewClusterClient("", cluster.APIVersion)
    if err != nil {
        fmt.Printf("Failed to initialize client library: %v\n", err)
        os.Exit(1)
    }
    c.manager = cluster.ClusterManager(clnt)
}

func (c *myapp) listNodes() {
    cluster, err := c.manager.Enumerate()
    if err != nil {
        cmdError(context, fn, err)
        return
    }
    
    // cluster is now a hashmap of nodes... do something useful with it:
    for _, n := range cluster.Nodes {
    
     }
}
Inspect a volume in a cluster

import (
    ...
    
    "github.com/libopenstorage/openstorage/api"
    volumeclient "github.com/libopenstorage/openstorage/api/client/volume"
    "github.com/libopenstorage/openstorage/volume"
)

type myapp struct {
    volDriver volume.VolumeDriver
}

func (c *myapp) init() {
    // Choose the default version.
    // Leave the host blank to use the local UNIX socket, or pass in an IP and a port at which the server is listening on.
    clnt, err := volumeclient.NewDriverClient("", v.name, volume.APIVersion)
    if err != nil {
        fmt.Printf("Failed to initialize client library: %v\n", err)
        os.Exit(1)
    }
    v.volDriver = volumeclient.VolumeDriver(clnt)
}

func (c *myapp) inspect(id string) {
    stats, err := v.volDriver.Stats(id, true)
    if err != nil {
        return
    }
    
    // stats is an object that has various volume properties and statistics.
}

Documentation

Overview

Package api is a generated protocol buffer package.

It is generated from these files:

api/api.proto

It has these top-level messages:

StorageResource
StoragePool
VolumeLocator
Source
Group
VolumeSpec
ReplicaSet
RuntimeStateMap
Volume
Stats
Alert
Alerts
VolumeCreateRequest
VolumeResponse
VolumeCreateResponse
VolumeStateAction
VolumeSetRequest
VolumeSetResponse
SnapCreateRequest
SnapCreateResponse
VolumeInfo
GraphDriverChanges
ClusterResponse
ActiveRequest
ActiveRequests

Index

Constants

View Source
const (
	Name                     = "name"
	SpecNodes                = "nodes"
	SpecParent               = "parent"
	SpecEphemeral            = "ephemeral"
	SpecShared               = "shared"
	SpecSticky               = "sticky"
	SpecSecure               = "secure"
	SpecCompressed           = "compressed"
	SpecSize                 = "size"
	SpecScale                = "scale"
	SpecFilesystem           = "fs"
	SpecBlockSize            = "block_size"
	SpecHaLevel              = "repl"
	SpecPriority             = "io_priority"
	SpecSnapshotInterval     = "snap_interval"
	SpecSnapshotSchedule     = "snap_schedule"
	SpecAggregationLevel     = "aggregation_level"
	SpecDedupe               = "dedupe"
	SpecPassphrase           = "secret_key"
	SpecAutoAggregationValue = "auto"
	SpecGroup                = "group"
	SpecGroupEnforce         = "fg"
	SpecZones                = "zones"
	SpecRacks                = "racks"
	SpecRegions              = "regions"
	SpecLabels               = "labels"
	SpecPriorityAlias        = "priority_io"
	SpecIoProfile            = "io_profile"
)

Strings for VolumeSpec

View Source
const (
	// OptName query parameter used to lookup volume by name.
	OptName = "Name"
	// OptVolumeID query parameter used to lookup volume by ID.
	OptVolumeID = "VolumeID"
	// OptSnapID query parameter used to lookup snapshot by ID.
	OptSnapID = "SnapID"
	// OptLabel query parameter used to lookup volume by set of labels.
	OptLabel = "Label"
	// OptConfigLabel query parameter used to lookup volume by set of labels.
	OptConfigLabel = "ConfigLabel"
	// OptCumulative query parameter used to request cumulative stats.
	OptCumulative = "Cumulative"
)

OptionKey specifies a set of recognized query params.

View Source
const (
	OsdVolumePath   = "osd-volumes"
	OsdSnapshotPath = "osd-snapshot"
	TimeLayout      = "Jan 2 15:04:05 UTC 2006"
)

Api client-server Constants

View Source
const (
	// AutoAggregation value indicates driver to select aggregation level.
	AutoAggregation = math.MaxUint32
)

Variables

View Source
var AlertActionType_name = map[int32]string{
	0: "ALERT_ACTION_TYPE_NONE",
	1: "ALERT_ACTION_TYPE_DELETE",
	2: "ALERT_ACTION_TYPE_CREATE",
	3: "ALERT_ACTION_TYPE_UPDATE",
}
View Source
var AlertActionType_value = map[string]int32{
	"ALERT_ACTION_TYPE_NONE":   0,
	"ALERT_ACTION_TYPE_DELETE": 1,
	"ALERT_ACTION_TYPE_CREATE": 2,
	"ALERT_ACTION_TYPE_UPDATE": 3,
}
View Source
var AttachState_name = map[int32]string{
	0: "ATTACH_STATE_EXTERNAL",
	1: "ATTACH_STATE_INTERNAL",
	2: "ATTACH_STATE_INTERNAL_SWITCH",
}
View Source
var AttachState_value = map[string]int32{
	"ATTACH_STATE_EXTERNAL":        0,
	"ATTACH_STATE_INTERNAL":        1,
	"ATTACH_STATE_INTERNAL_SWITCH": 2,
}
View Source
var ClusterNotify_name = map[int32]string{
	0: "CLUSTER_NOTIFY_DOWN",
}
View Source
var ClusterNotify_value = map[string]int32{
	"CLUSTER_NOTIFY_DOWN": 0,
}
View Source
var CosType_name = map[int32]string{
	0: "NONE",
	1: "LOW",
	2: "MEDIUM",
	3: "HIGH",
}
View Source
var CosType_value = map[string]int32{
	"NONE":   0,
	"LOW":    1,
	"MEDIUM": 2,
	"HIGH":   3,
}
View Source
var DriverType_name = map[int32]string{
	0: "DRIVER_TYPE_NONE",
	1: "DRIVER_TYPE_FILE",
	2: "DRIVER_TYPE_BLOCK",
	3: "DRIVER_TYPE_OBJECT",
	4: "DRIVER_TYPE_CLUSTERED",
	5: "DRIVER_TYPE_GRAPH",
}
View Source
var DriverType_value = map[string]int32{
	"DRIVER_TYPE_NONE":      0,
	"DRIVER_TYPE_FILE":      1,
	"DRIVER_TYPE_BLOCK":     2,
	"DRIVER_TYPE_OBJECT":    3,
	"DRIVER_TYPE_CLUSTERED": 4,
	"DRIVER_TYPE_GRAPH":     5,
}
View Source
var FSType_name = map[int32]string{
	0: "FS_TYPE_NONE",
	1: "FS_TYPE_BTRFS",
	2: "FS_TYPE_EXT4",
	3: "FS_TYPE_FUSE",
	4: "FS_TYPE_NFS",
	5: "FS_TYPE_VFS",
	6: "FS_TYPE_XFS",
	7: "FS_TYPE_ZFS",
}
View Source
var FSType_value = map[string]int32{
	"FS_TYPE_NONE":  0,
	"FS_TYPE_BTRFS": 1,
	"FS_TYPE_EXT4":  2,
	"FS_TYPE_FUSE":  3,
	"FS_TYPE_NFS":   4,
	"FS_TYPE_VFS":   5,
	"FS_TYPE_XFS":   6,
	"FS_TYPE_ZFS":   7,
}
View Source
var GraphDriverChangeType_name = map[int32]string{
	0: "GRAPH_DRIVER_CHANGE_TYPE_NONE",
	1: "GRAPH_DRIVER_CHANGE_TYPE_MODIFIED",
	2: "GRAPH_DRIVER_CHANGE_TYPE_ADDED",
	3: "GRAPH_DRIVER_CHANGE_TYPE_DELETED",
}
View Source
var GraphDriverChangeType_value = map[string]int32{
	"GRAPH_DRIVER_CHANGE_TYPE_NONE":     0,
	"GRAPH_DRIVER_CHANGE_TYPE_MODIFIED": 1,
	"GRAPH_DRIVER_CHANGE_TYPE_ADDED":    2,
	"GRAPH_DRIVER_CHANGE_TYPE_DELETED":  3,
}
View Source
var IoProfile_name = map[int32]string{
	0: "IO_PROFILE_SEQUENTIAL",
	1: "IO_PROFILE_RANDOM",
	2: "IO_PROFILE_DB",
	3: "IO_PROFILE_DB_REMOTE",
}
View Source
var IoProfile_value = map[string]int32{
	"IO_PROFILE_SEQUENTIAL": 0,
	"IO_PROFILE_RANDOM":     1,
	"IO_PROFILE_DB":         2,
	"IO_PROFILE_DB_REMOTE":  3,
}
View Source
var ResourceType_name = map[int32]string{
	0: "RESOURCE_TYPE_NONE",
	1: "RESOURCE_TYPE_VOLUME",
	2: "RESOURCE_TYPE_NODE",
	3: "RESOURCE_TYPE_CLUSTER",
	4: "RESOURCE_TYPE_DRIVE",
}
View Source
var ResourceType_value = map[string]int32{
	"RESOURCE_TYPE_NONE":    0,
	"RESOURCE_TYPE_VOLUME":  1,
	"RESOURCE_TYPE_NODE":    2,
	"RESOURCE_TYPE_CLUSTER": 3,
	"RESOURCE_TYPE_DRIVE":   4,
}
View Source
var SeverityType_name = map[int32]string{
	0: "SEVERITY_TYPE_NONE",
	1: "SEVERITY_TYPE_ALARM",
	2: "SEVERITY_TYPE_WARNING",
	3: "SEVERITY_TYPE_NOTIFY",
}
View Source
var SeverityType_value = map[string]int32{
	"SEVERITY_TYPE_NONE":    0,
	"SEVERITY_TYPE_ALARM":   1,
	"SEVERITY_TYPE_WARNING": 2,
	"SEVERITY_TYPE_NOTIFY":  3,
}
View Source
var Status_name = map[int32]string{
	0:  "STATUS_NONE",
	1:  "STATUS_INIT",
	2:  "STATUS_OK",
	3:  "STATUS_OFFLINE",
	4:  "STATUS_ERROR",
	5:  "STATUS_NOT_IN_QUORUM",
	6:  "STATUS_DECOMMISSION",
	7:  "STATUS_MAINTENANCE",
	8:  "STATUS_STORAGE_DOWN",
	9:  "STATUS_STORAGE_DEGRADED",
	10: "STATUS_NEEDS_REBOOT",
	11: "STATUS_STORAGE_REBALANCE",
	12: "STATUS_STORAGE_DRIVE_REPLACE",
	13: "STATUS_MAX",
}
View Source
var Status_value = map[string]int32{
	"STATUS_NONE":                  0,
	"STATUS_INIT":                  1,
	"STATUS_OK":                    2,
	"STATUS_OFFLINE":               3,
	"STATUS_ERROR":                 4,
	"STATUS_NOT_IN_QUORUM":         5,
	"STATUS_DECOMMISSION":          6,
	"STATUS_MAINTENANCE":           7,
	"STATUS_STORAGE_DOWN":          8,
	"STATUS_STORAGE_DEGRADED":      9,
	"STATUS_NEEDS_REBOOT":          10,
	"STATUS_STORAGE_REBALANCE":     11,
	"STATUS_STORAGE_DRIVE_REPLACE": 12,
	"STATUS_MAX":                   13,
}
View Source
var StorageMedium_name = map[int32]string{
	0: "STORAGE_MEDIUM_MAGNETIC",
	1: "STORAGE_MEDIUM_SSD",
	2: "STORAGE_MEDIUM_NVME",
}
View Source
var StorageMedium_value = map[string]int32{
	"STORAGE_MEDIUM_MAGNETIC": 0,
	"STORAGE_MEDIUM_SSD":      1,
	"STORAGE_MEDIUM_NVME":     2,
}
View Source
var VolumeActionParam_name = map[int32]string{
	0: "VOLUME_ACTION_PARAM_NONE",
	1: "VOLUME_ACTION_PARAM_OFF",
	2: "VOLUME_ACTION_PARAM_ON",
}
View Source
var VolumeActionParam_value = map[string]int32{
	"VOLUME_ACTION_PARAM_NONE": 0,
	"VOLUME_ACTION_PARAM_OFF":  1,
	"VOLUME_ACTION_PARAM_ON":   2,
}
View Source
var VolumeState_name = map[int32]string{
	0: "VOLUME_STATE_NONE",
	1: "VOLUME_STATE_PENDING",
	2: "VOLUME_STATE_AVAILABLE",
	3: "VOLUME_STATE_ATTACHED",
	4: "VOLUME_STATE_DETACHED",
	5: "VOLUME_STATE_DETATCHING",
	6: "VOLUME_STATE_ERROR",
	7: "VOLUME_STATE_DELETED",
	8: "VOLUME_STATE_TRY_DETACHING",
	9: "VOLUME_STATE_RESTORE",
}
View Source
var VolumeState_value = map[string]int32{
	"VOLUME_STATE_NONE":          0,
	"VOLUME_STATE_PENDING":       1,
	"VOLUME_STATE_AVAILABLE":     2,
	"VOLUME_STATE_ATTACHED":      3,
	"VOLUME_STATE_DETACHED":      4,
	"VOLUME_STATE_DETATCHING":    5,
	"VOLUME_STATE_ERROR":         6,
	"VOLUME_STATE_DELETED":       7,
	"VOLUME_STATE_TRY_DETACHING": 8,
	"VOLUME_STATE_RESTORE":       9,
}
View Source
var VolumeStatus_name = map[int32]string{
	0: "VOLUME_STATUS_NONE",
	1: "VOLUME_STATUS_NOT_PRESENT",
	2: "VOLUME_STATUS_UP",
	3: "VOLUME_STATUS_DOWN",
	4: "VOLUME_STATUS_DEGRADED",
}
View Source
var VolumeStatus_value = map[string]int32{
	"VOLUME_STATUS_NONE":        0,
	"VOLUME_STATUS_NOT_PRESENT": 1,
	"VOLUME_STATUS_UP":          2,
	"VOLUME_STATUS_DOWN":        3,
	"VOLUME_STATUS_DEGRADED":    4,
}

Functions

func StatusKindMapLength

func StatusKindMapLength() int

StatusKindMapLength used only for unit testing

Types

type ActiveRequest

type ActiveRequest struct {
	ReqestKV map[int64]string `` /* 151-byte string literal not displayed */
}

func (*ActiveRequest) Descriptor

func (*ActiveRequest) Descriptor() ([]byte, []int)

func (*ActiveRequest) GetReqestKV

func (m *ActiveRequest) GetReqestKV() map[int64]string

func (*ActiveRequest) ProtoMessage

func (*ActiveRequest) ProtoMessage()

func (*ActiveRequest) Reset

func (m *ActiveRequest) Reset()

func (*ActiveRequest) String

func (m *ActiveRequest) String() string

type ActiveRequests

type ActiveRequests struct {
	RequestCount  int64            `protobuf:"varint,1,opt,name=RequestCount,json=requestCount" json:"RequestCount,omitempty"`
	ActiveRequest []*ActiveRequest `protobuf:"bytes,2,rep,name=ActiveRequest,json=activeRequest" json:"ActiveRequest,omitempty"`
}

func (*ActiveRequests) Descriptor

func (*ActiveRequests) Descriptor() ([]byte, []int)

func (*ActiveRequests) GetActiveRequest

func (m *ActiveRequests) GetActiveRequest() []*ActiveRequest

func (*ActiveRequests) GetRequestCount

func (m *ActiveRequests) GetRequestCount() int64

func (*ActiveRequests) ProtoMessage

func (*ActiveRequests) ProtoMessage()

func (*ActiveRequests) Reset

func (m *ActiveRequests) Reset()

func (*ActiveRequests) String

func (m *ActiveRequests) String() string

type Alert

type Alert struct {
	// Id for Alert
	Id int64 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
	// Severity of the Alert
	Severity SeverityType `protobuf:"varint,2,opt,name=severity,enum=openstorage.api.SeverityType" json:"severity,omitempty"`
	// AlertType user defined alert type
	AlertType int64 `protobuf:"varint,3,opt,name=alert_type,json=alertType" json:"alert_type,omitempty"`
	// Message describing the Alert
	Message string `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"`
	// Timestamp when Alert occured
	Timestamp *google_protobuf.Timestamp `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"`
	// ResourceId where Alert occured
	ResourceId string `protobuf:"bytes,6,opt,name=resource_id,json=resourceId" json:"resource_id,omitempty"`
	// Resource where Alert occured
	Resource ResourceType `protobuf:"varint,7,opt,name=resource,enum=openstorage.api.ResourceType" json:"resource,omitempty"`
	// Cleared Flag
	Cleared bool `protobuf:"varint,8,opt,name=cleared" json:"cleared,omitempty"`
	// TTL in seconds for this Alert
	Ttl uint64 `protobuf:"varint,9,opt,name=ttl" json:"ttl,omitempty"`
	// UniqueTag helps identify a unique alert for a given resouce
	UniqueTag string `protobuf:"bytes,10,opt,name=unique_tag,json=uniqueTag" json:"unique_tag,omitempty"`
}

func (*Alert) Descriptor

func (*Alert) Descriptor() ([]byte, []int)

func (*Alert) GetAlertType

func (m *Alert) GetAlertType() int64

func (*Alert) GetCleared

func (m *Alert) GetCleared() bool

func (*Alert) GetId

func (m *Alert) GetId() int64

func (*Alert) GetMessage

func (m *Alert) GetMessage() string

func (*Alert) GetResource

func (m *Alert) GetResource() ResourceType

func (*Alert) GetResourceId

func (m *Alert) GetResourceId() string

func (*Alert) GetSeverity

func (m *Alert) GetSeverity() SeverityType

func (*Alert) GetTimestamp

func (m *Alert) GetTimestamp() *google_protobuf.Timestamp

func (*Alert) GetTtl

func (m *Alert) GetTtl() uint64

func (*Alert) GetUniqueTag

func (m *Alert) GetUniqueTag() string

func (*Alert) ProtoMessage

func (*Alert) ProtoMessage()

func (*Alert) Reset

func (m *Alert) Reset()

func (*Alert) String

func (m *Alert) String() string

type AlertActionType

type AlertActionType int32
const (
	AlertActionType_ALERT_ACTION_TYPE_NONE   AlertActionType = 0
	AlertActionType_ALERT_ACTION_TYPE_DELETE AlertActionType = 1
	AlertActionType_ALERT_ACTION_TYPE_CREATE AlertActionType = 2
	AlertActionType_ALERT_ACTION_TYPE_UPDATE AlertActionType = 3
)

func (AlertActionType) EnumDescriptor

func (AlertActionType) EnumDescriptor() ([]byte, []int)

func (AlertActionType) String

func (x AlertActionType) String() string

type Alerts

type Alerts struct {
	Alert []*Alert `protobuf:"bytes,1,rep,name=alert" json:"alert,omitempty"`
}

func (*Alerts) Descriptor

func (*Alerts) Descriptor() ([]byte, []int)

func (*Alerts) GetAlert

func (m *Alerts) GetAlert() []*Alert

func (*Alerts) ProtoMessage

func (*Alerts) ProtoMessage()

func (*Alerts) Reset

func (m *Alerts) Reset()

func (*Alerts) String

func (m *Alerts) String() string

type AttachState

type AttachState int32
const (
	// Attached and available externally
	AttachState_ATTACH_STATE_EXTERNAL AttachState = 0
	// Attached but only available internally
	AttachState_ATTACH_STATE_INTERNAL AttachState = 1
	// Switching from External to Internal
	AttachState_ATTACH_STATE_INTERNAL_SWITCH AttachState = 2
)

func (AttachState) EnumDescriptor

func (AttachState) EnumDescriptor() ([]byte, []int)

func (AttachState) String

func (x AttachState) String() string

type Cluster

type Cluster struct {
	Status Status

	// Id is the ID of the cluster.
	Id string

	// NodeId is the ID of the node on which this cluster object
	// is initialized
	NodeId string

	// Nodes is an array of all the nodes in the cluster.
	Nodes []Node

	// Logging url for the cluster.
	LoggingURL string

	// Management url for the cluster
	ManagementURL string

	// FluentD Host for the cluster
	FluentDConfig FluentDConfig

	// TunnelConfig for the cluster [key, cert, endpoint]
	TunnelConfig TunnelConfig
}

Cluster represents the state of the cluster.

type ClusterNotify

type ClusterNotify int32
const (
	// Node is down
	ClusterNotify_CLUSTER_NOTIFY_DOWN ClusterNotify = 0
)

func (ClusterNotify) EnumDescriptor

func (ClusterNotify) EnumDescriptor() ([]byte, []int)

func (ClusterNotify) String

func (x ClusterNotify) String() string

type ClusterResponse

type ClusterResponse struct {
	Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}

func (*ClusterResponse) Descriptor

func (*ClusterResponse) Descriptor() ([]byte, []int)

func (*ClusterResponse) GetError

func (m *ClusterResponse) GetError() string

func (*ClusterResponse) ProtoMessage

func (*ClusterResponse) ProtoMessage()

func (*ClusterResponse) Reset

func (m *ClusterResponse) Reset()

func (*ClusterResponse) String

func (m *ClusterResponse) String() string

type CosType

type CosType int32
const (
	CosType_NONE   CosType = 0
	CosType_LOW    CosType = 1
	CosType_MEDIUM CosType = 2
	CosType_HIGH   CosType = 3
)

func CosTypeSimpleValueOf

func CosTypeSimpleValueOf(s string) (CosType, error)

CosTypeSimpleValueOf returns the string format of CosType

func (CosType) EnumDescriptor

func (CosType) EnumDescriptor() ([]byte, []int)

func (CosType) SimpleString

func (x CosType) SimpleString() string

SimpleString returns the string format of CosType

func (CosType) String

func (x CosType) String() string

type DriverType

type DriverType int32
const (
	DriverType_DRIVER_TYPE_NONE      DriverType = 0
	DriverType_DRIVER_TYPE_FILE      DriverType = 1
	DriverType_DRIVER_TYPE_BLOCK     DriverType = 2
	DriverType_DRIVER_TYPE_OBJECT    DriverType = 3
	DriverType_DRIVER_TYPE_CLUSTERED DriverType = 4
	DriverType_DRIVER_TYPE_GRAPH     DriverType = 5
)

func DriverTypeSimpleValueOf

func DriverTypeSimpleValueOf(s string) (DriverType, error)

DriverTypeSimpleValueOf returns the string format of DriverType

func (DriverType) EnumDescriptor

func (DriverType) EnumDescriptor() ([]byte, []int)

func (DriverType) SimpleString

func (x DriverType) SimpleString() string

SimpleString returns the string format of DriverType

func (DriverType) String

func (x DriverType) String() string

type FSType

type FSType int32
const (
	FSType_FS_TYPE_NONE  FSType = 0
	FSType_FS_TYPE_BTRFS FSType = 1
	FSType_FS_TYPE_EXT4  FSType = 2
	FSType_FS_TYPE_FUSE  FSType = 3
	FSType_FS_TYPE_NFS   FSType = 4
	FSType_FS_TYPE_VFS   FSType = 5
	FSType_FS_TYPE_XFS   FSType = 6
	FSType_FS_TYPE_ZFS   FSType = 7
)

func FSTypeSimpleValueOf

func FSTypeSimpleValueOf(s string) (FSType, error)

FSTypeSimpleValueOf returns the string format of FSType

func (FSType) EnumDescriptor

func (FSType) EnumDescriptor() ([]byte, []int)

func (FSType) SimpleString

func (x FSType) SimpleString() string

SimpleString returns the string format of DriverType

func (FSType) String

func (x FSType) String() string

type FluentDConfig

type FluentDConfig struct {
	IP   string `json:"ip"`
	Port string `json:"port"`
}

type GraphDriverChangeType

type GraphDriverChangeType int32
const (
	GraphDriverChangeType_GRAPH_DRIVER_CHANGE_TYPE_NONE     GraphDriverChangeType = 0
	GraphDriverChangeType_GRAPH_DRIVER_CHANGE_TYPE_MODIFIED GraphDriverChangeType = 1
	GraphDriverChangeType_GRAPH_DRIVER_CHANGE_TYPE_ADDED    GraphDriverChangeType = 2
	GraphDriverChangeType_GRAPH_DRIVER_CHANGE_TYPE_DELETED  GraphDriverChangeType = 3
)

func GraphDriverChangeTypeSimpleValueOf

func GraphDriverChangeTypeSimpleValueOf(s string) (GraphDriverChangeType, error)

GraphDriverChangeTypeSimpleValueOf returns the string format of GraphDriverChangeType

func (GraphDriverChangeType) EnumDescriptor

func (GraphDriverChangeType) EnumDescriptor() ([]byte, []int)

func (GraphDriverChangeType) SimpleString

func (x GraphDriverChangeType) SimpleString() string

SimpleString returns the string format of GraphDriverChangeType

func (GraphDriverChangeType) String

func (x GraphDriverChangeType) String() string

type GraphDriverChanges

type GraphDriverChanges struct {
	Path string                `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"`
	Kind GraphDriverChangeType `protobuf:"varint,2,opt,name=kind,enum=openstorage.api.GraphDriverChangeType" json:"kind,omitempty"`
}

GraphDriverChanges represent a list of changes between the filesystem layers specified by the ID and Parent. // Parent may be an empty string, in which case there is no parent. Where the Path is the filesystem path within the layered filesystem

func (*GraphDriverChanges) Descriptor

func (*GraphDriverChanges) Descriptor() ([]byte, []int)

func (*GraphDriverChanges) GetKind

func (*GraphDriverChanges) GetPath

func (m *GraphDriverChanges) GetPath() string

func (*GraphDriverChanges) ProtoMessage

func (*GraphDriverChanges) ProtoMessage()

func (*GraphDriverChanges) Reset

func (m *GraphDriverChanges) Reset()

func (*GraphDriverChanges) String

func (m *GraphDriverChanges) String() string

type Group

type Group struct {
	// Id common identifier across volumes that have the same group.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}

func (*Group) Descriptor

func (*Group) Descriptor() ([]byte, []int)

func (*Group) GetId

func (m *Group) GetId() string

func (*Group) ProtoMessage

func (*Group) ProtoMessage()

func (*Group) Reset

func (m *Group) Reset()

func (*Group) String

func (m *Group) String() string

type IoProfile

type IoProfile int32
const (
	IoProfile_IO_PROFILE_SEQUENTIAL IoProfile = 0
	IoProfile_IO_PROFILE_RANDOM     IoProfile = 1
	IoProfile_IO_PROFILE_DB         IoProfile = 2
	IoProfile_IO_PROFILE_DB_REMOTE  IoProfile = 3
)

func IoProfileSimpleValueOf

func IoProfileSimpleValueOf(s string) (IoProfile, error)

IoProfileSimpleValueOf returns the string format of IoProfile

func (IoProfile) EnumDescriptor

func (IoProfile) EnumDescriptor() ([]byte, []int)

func (IoProfile) SimpleString

func (x IoProfile) SimpleString() string

SimpleString returns the string format of IoProfile

func (IoProfile) String

func (x IoProfile) String() string

type Node

type Node struct {
	Id        string
	Cpu       float64 // percentage.
	MemTotal  uint64
	MemUsed   uint64
	MemFree   uint64
	Avgload   int
	Status    Status
	GenNumber uint64
	Disks     map[string]StorageResource
	Pools     []StoragePool
	MgmtIp    string
	DataIp    string
	Timestamp time.Time
	StartTime time.Time
	Hostname  string
	NodeData  map[string]interface{}
	// User defined labels for node. Key Value pairs
	NodeLabels map[string]string
}

Node describes the state of a node. It includes the current physical state (CPU, memory, storage, network usage) as well as the containers running on the system.

func (*Node) Copy

func (s *Node) Copy() *Node

Copy makes a deep copy of Node

type ReplicaSet

type ReplicaSet struct {
	Nodes []string `protobuf:"bytes,1,rep,name=nodes" json:"nodes,omitempty"`
}

ReplicaSet set of machine IDs (nodes) to which part of this volume is erasure coded - for clustered storage arrays

func (*ReplicaSet) Descriptor

func (*ReplicaSet) Descriptor() ([]byte, []int)

func (*ReplicaSet) GetNodes

func (m *ReplicaSet) GetNodes() []string

func (*ReplicaSet) ProtoMessage

func (*ReplicaSet) ProtoMessage()

func (*ReplicaSet) Reset

func (m *ReplicaSet) Reset()

func (*ReplicaSet) String

func (m *ReplicaSet) String() string

type ResourceType

type ResourceType int32
const (
	ResourceType_RESOURCE_TYPE_NONE    ResourceType = 0
	ResourceType_RESOURCE_TYPE_VOLUME  ResourceType = 1
	ResourceType_RESOURCE_TYPE_NODE    ResourceType = 2
	ResourceType_RESOURCE_TYPE_CLUSTER ResourceType = 3
	ResourceType_RESOURCE_TYPE_DRIVE   ResourceType = 4
)

func (ResourceType) EnumDescriptor

func (ResourceType) EnumDescriptor() ([]byte, []int)

func (ResourceType) String

func (x ResourceType) String() string

type RuntimeStateMap

type RuntimeStateMap struct {
	RuntimeState map[string]string `` /* 164-byte string literal not displayed */
}

RuntimeStateMap is a list of name value mapping of driver specific runtime information.

func (*RuntimeStateMap) Descriptor

func (*RuntimeStateMap) Descriptor() ([]byte, []int)

func (*RuntimeStateMap) GetRuntimeState

func (m *RuntimeStateMap) GetRuntimeState() map[string]string

func (*RuntimeStateMap) ProtoMessage

func (*RuntimeStateMap) ProtoMessage()

func (*RuntimeStateMap) Reset

func (m *RuntimeStateMap) Reset()

func (*RuntimeStateMap) String

func (m *RuntimeStateMap) String() string

type SeverityType

type SeverityType int32
const (
	SeverityType_SEVERITY_TYPE_NONE    SeverityType = 0
	SeverityType_SEVERITY_TYPE_ALARM   SeverityType = 1
	SeverityType_SEVERITY_TYPE_WARNING SeverityType = 2
	SeverityType_SEVERITY_TYPE_NOTIFY  SeverityType = 3
)

func (SeverityType) EnumDescriptor

func (SeverityType) EnumDescriptor() ([]byte, []int)

func (SeverityType) String

func (x SeverityType) String() string

type SnapCreateRequest

type SnapCreateRequest struct {
	// volume id
	Id       string         `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	Locator  *VolumeLocator `protobuf:"bytes,2,opt,name=locator" json:"locator,omitempty"`
	Readonly bool           `protobuf:"varint,3,opt,name=readonly" json:"readonly,omitempty"`
}

func (*SnapCreateRequest) Descriptor

func (*SnapCreateRequest) Descriptor() ([]byte, []int)

func (*SnapCreateRequest) GetId

func (m *SnapCreateRequest) GetId() string

func (*SnapCreateRequest) GetLocator

func (m *SnapCreateRequest) GetLocator() *VolumeLocator

func (*SnapCreateRequest) GetReadonly

func (m *SnapCreateRequest) GetReadonly() bool

func (*SnapCreateRequest) ProtoMessage

func (*SnapCreateRequest) ProtoMessage()

func (*SnapCreateRequest) Reset

func (m *SnapCreateRequest) Reset()

func (*SnapCreateRequest) String

func (m *SnapCreateRequest) String() string

type SnapCreateResponse

type SnapCreateResponse struct {
	VolumeCreateResponse *VolumeCreateResponse `protobuf:"bytes,1,opt,name=volume_create_response,json=volumeCreateResponse" json:"volume_create_response,omitempty"`
}

func (*SnapCreateResponse) Descriptor

func (*SnapCreateResponse) Descriptor() ([]byte, []int)

func (*SnapCreateResponse) GetVolumeCreateResponse

func (m *SnapCreateResponse) GetVolumeCreateResponse() *VolumeCreateResponse

func (*SnapCreateResponse) ProtoMessage

func (*SnapCreateResponse) ProtoMessage()

func (*SnapCreateResponse) Reset

func (m *SnapCreateResponse) Reset()

func (*SnapCreateResponse) String

func (m *SnapCreateResponse) String() string

type Source

type Source struct {
	// A volume id, if specified will create a clone of the parent.
	Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
	// Seed will seed the volume from the specified URI
	// Any additional config for the source comes from the labels in the spec
	Seed string `protobuf:"bytes,2,opt,name=seed" json:"seed,omitempty"`
}

func (*Source) Descriptor

func (*Source) Descriptor() ([]byte, []int)

func (*Source) GetParent

func (m *Source) GetParent() string

func (*Source) GetSeed

func (m *Source) GetSeed() string

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) Reset

func (m *Source) Reset()

func (*Source) String

func (m *Source) String() string

type StatPoint

type StatPoint struct {
	// Name of the Stat
	Name string
	// Tags for the Stat
	Tags map[string]string
	// Fields and values of the stat
	Fields map[string]interface{}
	// Timestamp in Unix format
	Timestamp int64
}

StatPoint represents the basic structure of a single Stat reported TODO: This is the first step to introduce stats in openstorage.

Follow up task is to introduce an API for logging stats

type Stats

type Stats struct {
	// Reads completed successfully
	Reads uint64 `protobuf:"varint,1,opt,name=reads" json:"reads,omitempty"`
	// Time spent in reads in ms
	ReadMs    uint64 `protobuf:"varint,2,opt,name=read_ms,json=readMs" json:"read_ms,omitempty"`
	ReadBytes uint64 `protobuf:"varint,3,opt,name=read_bytes,json=readBytes" json:"read_bytes,omitempty"`
	// Writes completed successfully
	Writes uint64 `protobuf:"varint,4,opt,name=writes" json:"writes,omitempty"`
	// Time spent in writes in ms
	WriteMs    uint64 `protobuf:"varint,5,opt,name=write_ms,json=writeMs" json:"write_ms,omitempty"`
	WriteBytes uint64 `protobuf:"varint,6,opt,name=write_bytes,json=writeBytes" json:"write_bytes,omitempty"`
	// IOs curently in progress
	IoProgress uint64 `protobuf:"varint,7,opt,name=io_progress,json=ioProgress" json:"io_progress,omitempty"`
	// Time spent doing IOs ms
	IoMs uint64 `protobuf:"varint,8,opt,name=io_ms,json=ioMs" json:"io_ms,omitempty"`
	// BytesUsed
	BytesUsed uint64 `protobuf:"varint,9,opt,name=bytes_used,json=bytesUsed" json:"bytes_used,omitempty"`
	// Interval in ms during which stats were collected
	IntervalMs uint64 `protobuf:"varint,10,opt,name=interval_ms,json=intervalMs" json:"interval_ms,omitempty"`
}

func (*Stats) Descriptor

func (*Stats) Descriptor() ([]byte, []int)

func (*Stats) GetBytesUsed

func (m *Stats) GetBytesUsed() uint64

func (*Stats) GetIntervalMs

func (m *Stats) GetIntervalMs() uint64

func (*Stats) GetIoMs

func (m *Stats) GetIoMs() uint64

func (*Stats) GetIoProgress

func (m *Stats) GetIoProgress() uint64

func (*Stats) GetReadBytes

func (m *Stats) GetReadBytes() uint64

func (*Stats) GetReadMs

func (m *Stats) GetReadMs() uint64

func (*Stats) GetReads

func (m *Stats) GetReads() uint64

func (*Stats) GetWriteBytes

func (m *Stats) GetWriteBytes() uint64

func (*Stats) GetWriteMs

func (m *Stats) GetWriteMs() uint64

func (*Stats) GetWrites

func (m *Stats) GetWrites() uint64

func (*Stats) Iops

func (v *Stats) Iops() uint64

Iops returns iops

func (*Stats) Latency

func (v *Stats) Latency() uint64

Latency returns latency

func (*Stats) ProtoMessage

func (*Stats) ProtoMessage()

func (*Stats) ReadLatency

func (v *Stats) ReadLatency() uint64

Read latency returns avg. time required for read operation to complete

func (*Stats) ReadThroughput

func (v *Stats) ReadThroughput() uint64

ReadThroughput returns the read throughput

func (*Stats) Reset

func (m *Stats) Reset()

func (*Stats) String

func (m *Stats) String() string

func (*Stats) WriteLatency

func (v *Stats) WriteLatency() uint64

Write latency returns avg. time required for write operation to complete

func (*Stats) WriteThroughput

func (v *Stats) WriteThroughput() uint64

WriteThroughput returns the write throughput

type Status

type Status int32
const (
	Status_STATUS_NONE                  Status = 0
	Status_STATUS_INIT                  Status = 1
	Status_STATUS_OK                    Status = 2
	Status_STATUS_OFFLINE               Status = 3
	Status_STATUS_ERROR                 Status = 4
	Status_STATUS_NOT_IN_QUORUM         Status = 5
	Status_STATUS_DECOMMISSION          Status = 6
	Status_STATUS_MAINTENANCE           Status = 7
	Status_STATUS_STORAGE_DOWN          Status = 8
	Status_STATUS_STORAGE_DEGRADED      Status = 9
	Status_STATUS_NEEDS_REBOOT          Status = 10
	Status_STATUS_STORAGE_REBALANCE     Status = 11
	Status_STATUS_STORAGE_DRIVE_REPLACE Status = 12
	// Add statuses before MAX and update the number for MAX
	Status_STATUS_MAX Status = 13
)

func StatusSimpleValueOf

func StatusSimpleValueOf(s string) (Status, error)

StatusSimpleValueOf returns the string format of Status

func (Status) EnumDescriptor

func (Status) EnumDescriptor() ([]byte, []int)

func (Status) SimpleString

func (x Status) SimpleString() string

SimpleString returns the string format of Status

func (Status) StatusKind

func (x Status) StatusKind() StatusKind

StatusKind returns the king of status

func (Status) String

func (x Status) String() string

type StatusKind

type StatusKind int32

StatusKind indicates the severity of a status

const (
	// StatusSeverityLow indicates an OK status
	StatusSeverityLow StatusKind = iota
	// StatusSeverityMedium indicates a status which is in transition from OK to BAD or vice versa
	StatusSeverityMedium
	// StatusSeverityHigh indicates a BAD status
	StatusSeverityHigh
)

type StorageMedium

type StorageMedium int32
const (
	// Magnetic spinning disk.
	StorageMedium_STORAGE_MEDIUM_MAGNETIC StorageMedium = 0
	// SSD disk
	StorageMedium_STORAGE_MEDIUM_SSD StorageMedium = 1
	// NVME disk
	StorageMedium_STORAGE_MEDIUM_NVME StorageMedium = 2
)

func (StorageMedium) EnumDescriptor

func (StorageMedium) EnumDescriptor() ([]byte, []int)

func (StorageMedium) String

func (x StorageMedium) String() string

type StoragePool

type StoragePool struct {
	// ID pool ID
	ID int32 `protobuf:"varint,1,opt,name=ID,json=iD" json:"ID,omitempty"`
	// Cos reflects the capabilities of this drive pool
	Cos CosType `protobuf:"varint,2,opt,name=Cos,json=cos,enum=openstorage.api.CosType" json:"Cos,omitempty"`
	// Medium underlying storage type
	Medium StorageMedium `protobuf:"varint,3,opt,name=Medium,json=medium,enum=openstorage.api.StorageMedium" json:"Medium,omitempty"`
	// RaidLevel storage raid level
	RaidLevel string `protobuf:"bytes,4,opt,name=RaidLevel,json=raidLevel" json:"RaidLevel,omitempty"`
	// TotalSize of the pool
	TotalSize uint64 `protobuf:"varint,7,opt,name=TotalSize,json=totalSize" json:"TotalSize,omitempty"`
	// Used size of the pool
	Used uint64 `protobuf:"varint,8,opt,name=Used,json=used" json:"Used,omitempty"`
	// Labels is a list of user defined name-value pairs
	Labels map[string]string `` /* 132-byte string literal not displayed */
}

StoragePool groups different storage devices based on their CosType

func (*StoragePool) Descriptor

func (*StoragePool) Descriptor() ([]byte, []int)

func (*StoragePool) GetCos

func (m *StoragePool) GetCos() CosType

func (*StoragePool) GetID

func (m *StoragePool) GetID() int32

func (*StoragePool) GetLabels

func (m *StoragePool) GetLabels() map[string]string

func (*StoragePool) GetMedium

func (m *StoragePool) GetMedium() StorageMedium

func (*StoragePool) GetRaidLevel

func (m *StoragePool) GetRaidLevel() string

func (*StoragePool) GetTotalSize

func (m *StoragePool) GetTotalSize() uint64

func (*StoragePool) GetUsed

func (m *StoragePool) GetUsed() uint64

func (*StoragePool) ProtoMessage

func (*StoragePool) ProtoMessage()

func (*StoragePool) Reset

func (m *StoragePool) Reset()

func (*StoragePool) String

func (m *StoragePool) String() string

type StorageResource

type StorageResource struct {
	// Id is the LUN identifier.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Path device path for this storage resource.
	Path string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	// Storage medium.
	Medium StorageMedium `protobuf:"varint,3,opt,name=medium,enum=openstorage.api.StorageMedium" json:"medium,omitempty"`
	// True if this device is online.
	Online bool `protobuf:"varint,4,opt,name=online" json:"online,omitempty"`
	// IOPS
	Iops uint64 `protobuf:"varint,5,opt,name=iops" json:"iops,omitempty"`
	// SeqWrite
	SeqWrite float64 `protobuf:"fixed64,6,opt,name=seq_write,json=seqWrite" json:"seq_write,omitempty"`
	// SeqRead
	SeqRead float64 `protobuf:"fixed64,7,opt,name=seq_read,json=seqRead" json:"seq_read,omitempty"`
	// RandRW
	RandRW float64 `protobuf:"fixed64,8,opt,name=randRW" json:"randRW,omitempty"`
	// Total size in bytes.
	Size uint64 `protobuf:"varint,9,opt,name=size" json:"size,omitempty"`
	// Physical Bytes used.
	Used uint64 `protobuf:"varint,10,opt,name=used" json:"used,omitempty"`
	// True if this device is rotational.
	RotationSpeed string `protobuf:"bytes,11,opt,name=rotation_speed,json=rotationSpeed" json:"rotation_speed,omitempty"`
	// Timestamp of last time this device was scanned.
	LastScan *google_protobuf.Timestamp `protobuf:"bytes,12,opt,name=last_scan,json=lastScan" json:"last_scan,omitempty"`
}

StorageResource groups properties of a storage device.

func (*StorageResource) Descriptor

func (*StorageResource) Descriptor() ([]byte, []int)

func (*StorageResource) GetId

func (m *StorageResource) GetId() string

func (*StorageResource) GetIops

func (m *StorageResource) GetIops() uint64

func (*StorageResource) GetLastScan

func (m *StorageResource) GetLastScan() *google_protobuf.Timestamp

func (*StorageResource) GetMedium

func (m *StorageResource) GetMedium() StorageMedium

func (*StorageResource) GetOnline

func (m *StorageResource) GetOnline() bool

func (*StorageResource) GetPath

func (m *StorageResource) GetPath() string

func (*StorageResource) GetRandRW

func (m *StorageResource) GetRandRW() float64

func (*StorageResource) GetRotationSpeed

func (m *StorageResource) GetRotationSpeed() string

func (*StorageResource) GetSeqRead

func (m *StorageResource) GetSeqRead() float64

func (*StorageResource) GetSeqWrite

func (m *StorageResource) GetSeqWrite() float64

func (*StorageResource) GetSize

func (m *StorageResource) GetSize() uint64

func (*StorageResource) GetUsed

func (m *StorageResource) GetUsed() uint64

func (*StorageResource) ProtoMessage

func (*StorageResource) ProtoMessage()

func (*StorageResource) Reset

func (m *StorageResource) Reset()

func (*StorageResource) String

func (m *StorageResource) String() string

type TunnelConfig

type TunnelConfig struct {
	Key      string `json:"key"`
	Cert     string `json:"cert"`
	Endpoint string `json:"tunnel_endpoint"`
}

type Volume

type Volume struct {
	// Self referential volume ID.
	Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	// Source specified seed data for the volume.
	Source *Source `protobuf:"bytes,2,opt,name=source" json:"source,omitempty"`
	// Group volumes in the same group have the same group id.
	Group *Group `protobuf:"bytes,3,opt,name=group" json:"group,omitempty"`
	// Readonly is true if this volume is to be mounted with readonly access.
	Readonly bool `protobuf:"varint,4,opt,name=readonly" json:"readonly,omitempty"`
	// User specified locator
	Locator *VolumeLocator `protobuf:"bytes,5,opt,name=locator" json:"locator,omitempty"`
	// Volume creation time
	Ctime *google_protobuf.Timestamp `protobuf:"bytes,6,opt,name=ctime" json:"ctime,omitempty"`
	// User specified VolumeSpec
	Spec *VolumeSpec `protobuf:"bytes,7,opt,name=spec" json:"spec,omitempty"`
	// Usage is bytes consumed by vtheis volume.
	Usage uint64 `protobuf:"varint,8,opt,name=usage" json:"usage,omitempty"`
	// LastScan is the time when an integrity check was run.
	LastScan *google_protobuf.Timestamp `protobuf:"bytes,9,opt,name=last_scan,json=lastScan" json:"last_scan,omitempty"`
	// Format specifies the filesytem for this volume.
	Format FSType `protobuf:"varint,10,opt,name=format,enum=openstorage.api.FSType" json:"format,omitempty"`
	// Status is the availability status of this volume.
	Status VolumeStatus `protobuf:"varint,11,opt,name=status,enum=openstorage.api.VolumeStatus" json:"status,omitempty"`
	// State is the current runtime state of this volume.
	State VolumeState `protobuf:"varint,12,opt,name=state,enum=openstorage.api.VolumeState" json:"state,omitempty"`
	// AttachedOn is the node instance identifier for clustered systems.
	AttachedOn string `protobuf:"bytes,13,opt,name=attached_on,json=attachedOn" json:"attached_on,omitempty"`
	// AttachedState shows whether the device is attached for internal or external use.
	AttachedState AttachState `` /* 128-byte string literal not displayed */
	// DevicePath is the device exported by block device implementations.
	DevicePath string `protobuf:"bytes,15,opt,name=device_path,json=devicePath" json:"device_path,omitempty"`
	// SecureDevicePath is the device path for an encrypted volume.
	SecureDevicePath string `protobuf:"bytes,16,opt,name=secure_device_path,json=secureDevicePath" json:"secure_device_path,omitempty"`
	// AttachPath is the mounted path in the host namespace.
	AttachPath []string `protobuf:"bytes,17,rep,name=attach_path,json=attachPath" json:"attach_path,omitempty"`
	// AttachInfo is a list of name value mappings that provides attach information.
	AttachInfo map[string]string `` /* 159-byte string literal not displayed */
	// ReplicatSets storage for this volumefor clustered storage arrays.
	ReplicaSets []*ReplicaSet `protobuf:"bytes,19,rep,name=replica_sets,json=replicaSets" json:"replica_sets,omitempty"`
	// RuntimeState is a lst of name value mapping of driver specific runtime
	// information.
	RuntimeState []*RuntimeStateMap `protobuf:"bytes,20,rep,name=runtime_state,json=runtimeState" json:"runtime_state,omitempty"`
	// Error is the Last recorded error.
	Error string `protobuf:"bytes,21,opt,name=error" json:"error,omitempty"`
}

Volume represents an abstract storage volume. Volume represents an abstract storage volume.

func (*Volume) Contains

func (m *Volume) Contains(mid string) bool

Contains returns true if mid is a member of volume's replication set.

func (*Volume) Descriptor

func (*Volume) Descriptor() ([]byte, []int)

func (Volume) DisplayId

func (v Volume) DisplayId() string

func (*Volume) GetAttachInfo

func (m *Volume) GetAttachInfo() map[string]string

func (*Volume) GetAttachPath

func (m *Volume) GetAttachPath() []string

func (*Volume) GetAttachedOn

func (m *Volume) GetAttachedOn() string

func (*Volume) GetAttachedState

func (m *Volume) GetAttachedState() AttachState

func (*Volume) GetCtime

func (m *Volume) GetCtime() *google_protobuf.Timestamp

func (*Volume) GetDevicePath

func (m *Volume) GetDevicePath() string

func (*Volume) GetError

func (m *Volume) GetError() string

func (*Volume) GetFormat

func (m *Volume) GetFormat() FSType

func (*Volume) GetGroup

func (m *Volume) GetGroup() *Group

func (*Volume) GetId

func (m *Volume) GetId() string

func (*Volume) GetLastScan

func (m *Volume) GetLastScan() *google_protobuf.Timestamp

func (*Volume) GetLocator

func (m *Volume) GetLocator() *VolumeLocator

func (*Volume) GetReadonly

func (m *Volume) GetReadonly() bool

func (*Volume) GetReplicaSets

func (m *Volume) GetReplicaSets() []*ReplicaSet

func (*Volume) GetRuntimeState

func (m *Volume) GetRuntimeState() []*RuntimeStateMap

func (*Volume) GetSecureDevicePath

func (m *Volume) GetSecureDevicePath() string

func (*Volume) GetSource

func (m *Volume) GetSource() *Source

func (*Volume) GetSpec

func (m *Volume) GetSpec() *VolumeSpec

func (*Volume) GetState

func (m *Volume) GetState() VolumeState

func (*Volume) GetStatus

func (m *Volume) GetStatus() VolumeStatus

func (*Volume) GetUsage

func (m *Volume) GetUsage() uint64

func (Volume) IsClone

func (v Volume) IsClone() bool

func (Volume) IsSnapshot

func (v Volume) IsSnapshot() bool

func (*Volume) ProtoMessage

func (*Volume) ProtoMessage()

func (*Volume) Reset

func (m *Volume) Reset()

func (*Volume) Scaled

func (v *Volume) Scaled() bool

Scaled returns true if the volume is scaled.

func (*Volume) String

func (m *Volume) String() string

type VolumeActionParam

type VolumeActionParam int32
const (
	VolumeActionParam_VOLUME_ACTION_PARAM_NONE VolumeActionParam = 0
	// Maps to the boolean value false
	VolumeActionParam_VOLUME_ACTION_PARAM_OFF VolumeActionParam = 1
	// Maps to the boolean value true.
	VolumeActionParam_VOLUME_ACTION_PARAM_ON VolumeActionParam = 2
)

func VolumeActionParamSimpleValueOf

func VolumeActionParamSimpleValueOf(s string) (VolumeActionParam, error)

VolumeActionParamSimpleValueOf returns the string format of VolumeAction

func (VolumeActionParam) EnumDescriptor

func (VolumeActionParam) EnumDescriptor() ([]byte, []int)

func (VolumeActionParam) SimpleString

func (x VolumeActionParam) SimpleString() string

SimpleString returns the string format of VolumeAction

func (VolumeActionParam) String

func (x VolumeActionParam) String() string

type VolumeCreateRequest

type VolumeCreateRequest struct {
	// User specified volume name and labels
	Locator *VolumeLocator `protobuf:"bytes,1,opt,name=locator" json:"locator,omitempty"`
	// Source to create volume
	Source *Source `protobuf:"bytes,2,opt,name=source" json:"source,omitempty"`
	// The storage spec for the volume
	Spec *VolumeSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
}

func (*VolumeCreateRequest) Descriptor

func (*VolumeCreateRequest) Descriptor() ([]byte, []int)

func (*VolumeCreateRequest) GetLocator

func (m *VolumeCreateRequest) GetLocator() *VolumeLocator

func (*VolumeCreateRequest) GetSource

func (m *VolumeCreateRequest) GetSource() *Source

func (*VolumeCreateRequest) GetSpec

func (m *VolumeCreateRequest) GetSpec() *VolumeSpec

func (*VolumeCreateRequest) ProtoMessage

func (*VolumeCreateRequest) ProtoMessage()

func (*VolumeCreateRequest) Reset

func (m *VolumeCreateRequest) Reset()

func (*VolumeCreateRequest) String

func (m *VolumeCreateRequest) String() string

type VolumeCreateResponse

type VolumeCreateResponse struct {
	// ID of the newly created volume
	Id             string          `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
	VolumeResponse *VolumeResponse `protobuf:"bytes,2,opt,name=volume_response,json=volumeResponse" json:"volume_response,omitempty"`
}

func (*VolumeCreateResponse) Descriptor

func (*VolumeCreateResponse) Descriptor() ([]byte, []int)

func (*VolumeCreateResponse) GetId

func (m *VolumeCreateResponse) GetId() string

func (*VolumeCreateResponse) GetVolumeResponse

func (m *VolumeCreateResponse) GetVolumeResponse() *VolumeResponse

func (*VolumeCreateResponse) ProtoMessage

func (*VolumeCreateResponse) ProtoMessage()

func (*VolumeCreateResponse) Reset

func (m *VolumeCreateResponse) Reset()

func (*VolumeCreateResponse) String

func (m *VolumeCreateResponse) String() string

type VolumeInfo

type VolumeInfo struct {
	VolumeId string      `protobuf:"bytes,1,opt,name=volume_id,json=volumeId" json:"volume_id,omitempty"`
	Path     string      `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"`
	Storage  *VolumeSpec `protobuf:"bytes,3,opt,name=storage" json:"storage,omitempty"`
}

func (*VolumeInfo) Descriptor

func (*VolumeInfo) Descriptor() ([]byte, []int)

func (*VolumeInfo) GetPath

func (m *VolumeInfo) GetPath() string

func (*VolumeInfo) GetStorage

func (m *VolumeInfo) GetStorage() *VolumeSpec

func (*VolumeInfo) GetVolumeId

func (m *VolumeInfo) GetVolumeId() string

func (*VolumeInfo) ProtoMessage

func (*VolumeInfo) ProtoMessage()

func (*VolumeInfo) Reset

func (m *VolumeInfo) Reset()

func (*VolumeInfo) String

func (m *VolumeInfo) String() string

type VolumeLocator

type VolumeLocator struct {
	// User friendly identifier
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	// A set of name-value pairs that acts as search filters
	VolumeLabels map[string]string `` /* 164-byte string literal not displayed */
}

VolumeLocator is a structure that is attached to a volume and is used to carry opaque metadata.

func (*VolumeLocator) Descriptor

func (*VolumeLocator) Descriptor() ([]byte, []int)

func (*VolumeLocator) GetName

func (m *VolumeLocator) GetName() string

func (*VolumeLocator) GetVolumeLabels

func (m *VolumeLocator) GetVolumeLabels() map[string]string

func (*VolumeLocator) ProtoMessage

func (*VolumeLocator) ProtoMessage()

func (*VolumeLocator) Reset

func (m *VolumeLocator) Reset()

func (*VolumeLocator) String

func (m *VolumeLocator) String() string

type VolumeResponse

type VolumeResponse struct {
	Error string `protobuf:"bytes,1,opt,name=error" json:"error,omitempty"`
}

func (*VolumeResponse) Descriptor

func (*VolumeResponse) Descriptor() ([]byte, []int)

func (*VolumeResponse) GetError

func (m *VolumeResponse) GetError() string

func (*VolumeResponse) ProtoMessage

func (*VolumeResponse) ProtoMessage()

func (*VolumeResponse) Reset

func (m *VolumeResponse) Reset()

func (*VolumeResponse) String

func (m *VolumeResponse) String() string

type VolumeSetRequest

type VolumeSetRequest struct {
	// User specified volume name and labels
	Locator *VolumeLocator `protobuf:"bytes,1,opt,name=locator" json:"locator,omitempty"`
	// The storage spec for the volume
	Spec *VolumeSpec `protobuf:"bytes,2,opt,name=spec" json:"spec,omitempty"`
	// State modification on this volume.
	Action *VolumeStateAction `protobuf:"bytes,3,opt,name=action" json:"action,omitempty"`
	// additional options
	// required for the Set operation.
	Options map[string]string `` /* 134-byte string literal not displayed */
}

func (*VolumeSetRequest) Descriptor

func (*VolumeSetRequest) Descriptor() ([]byte, []int)

func (*VolumeSetRequest) GetAction

func (m *VolumeSetRequest) GetAction() *VolumeStateAction

func (*VolumeSetRequest) GetLocator

func (m *VolumeSetRequest) GetLocator() *VolumeLocator

func (*VolumeSetRequest) GetOptions

func (m *VolumeSetRequest) GetOptions() map[string]string

func (*VolumeSetRequest) GetSpec

func (m *VolumeSetRequest) GetSpec() *VolumeSpec

func (*VolumeSetRequest) ProtoMessage

func (*VolumeSetRequest) ProtoMessage()

func (*VolumeSetRequest) Reset

func (m *VolumeSetRequest) Reset()

func (*VolumeSetRequest) String

func (m *VolumeSetRequest) String() string

type VolumeSetResponse

type VolumeSetResponse struct {
	Volume         *Volume         `protobuf:"bytes,1,opt,name=volume" json:"volume,omitempty"`
	VolumeResponse *VolumeResponse `protobuf:"bytes,2,opt,name=volume_response,json=volumeResponse" json:"volume_response,omitempty"`
}

func (*VolumeSetResponse) Descriptor

func (*VolumeSetResponse) Descriptor() ([]byte, []int)

func (*VolumeSetResponse) GetVolume

func (m *VolumeSetResponse) GetVolume() *Volume

func (*VolumeSetResponse) GetVolumeResponse

func (m *VolumeSetResponse) GetVolumeResponse() *VolumeResponse

func (*VolumeSetResponse) ProtoMessage

func (*VolumeSetResponse) ProtoMessage()

func (*VolumeSetResponse) Reset

func (m *VolumeSetResponse) Reset()

func (*VolumeSetResponse) String

func (m *VolumeSetResponse) String() string

type VolumeSpec

type VolumeSpec struct {
	// Ephemeral storage
	Ephemeral bool `protobuf:"varint,1,opt,name=ephemeral" json:"ephemeral,omitempty"`
	// Size specifies the thin provisioned volume size.
	Size uint64 `protobuf:"varint,2,opt,name=size" json:"size,omitempty"`
	// Format specifies the filesystem for this volume.
	Format FSType `protobuf:"varint,3,opt,name=format,enum=openstorage.api.FSType" json:"format,omitempty"`
	// BlockSize for the filesystem.
	BlockSize int64 `protobuf:"varint,4,opt,name=block_size,json=blockSize" json:"block_size,omitempty"`
	// HaLevel specifies the number of copies of data.
	HaLevel int64 `protobuf:"varint,5,opt,name=ha_level,json=haLevel" json:"ha_level,omitempty"`
	// Cos specifies the relative class of service.
	Cos CosType `protobuf:"varint,6,opt,name=cos,enum=openstorage.api.CosType" json:"cos,omitempty"`
	// IoProfile provides a hint about application using this volume.
	IoProfile IoProfile `protobuf:"varint,7,opt,name=io_profile,json=ioProfile,enum=openstorage.api.IoProfile" json:"io_profile,omitempty"`
	// Dedupe specifies if the volume data is to be de-duplicated.
	Dedupe bool `protobuf:"varint,8,opt,name=dedupe" json:"dedupe,omitempty"`
	// SnapshotInterval in minutes, set to 0 to disable snapshots
	SnapshotInterval uint32 `protobuf:"varint,9,opt,name=snapshot_interval,json=snapshotInterval" json:"snapshot_interval,omitempty"`
	// VolumeLabels configuration labels
	VolumeLabels map[string]string `` /* 165-byte string literal not displayed */
	// Shared is true if this volume can be remotely accessed.
	Shared bool `protobuf:"varint,11,opt,name=shared" json:"shared,omitempty"`
	// ReplicaSet is the desired set of nodes for the volume data.
	ReplicaSet *ReplicaSet `protobuf:"bytes,12,opt,name=replica_set,json=replicaSet" json:"replica_set,omitempty"`
	// Aggregatiokn level Specifies the number of parts the volume can be aggregated from.
	AggregationLevel uint32 `protobuf:"varint,13,opt,name=aggregation_level,json=aggregationLevel" json:"aggregation_level,omitempty"`
	// Encrypted is true if this volume will be cryptographically secured.
	Encrypted bool `protobuf:"varint,14,opt,name=encrypted" json:"encrypted,omitempty"`
	// Passphrase for an encrypted volume
	Passphrase string `protobuf:"bytes,15,opt,name=passphrase" json:"passphrase,omitempty"`
	// SnapshotSchedule a well known string that specifies when snapshots should be taken.
	SnapshotSchedule string `protobuf:"bytes,16,opt,name=snapshot_schedule,json=snapshotSchedule" json:"snapshot_schedule,omitempty"`
	// Scale allows autocreation of volumes.
	Scale uint32 `protobuf:"varint,17,opt,name=scale" json:"scale,omitempty"`
	// Sticky volumes cannot be deleted until the flag is removed.
	Sticky bool `protobuf:"varint,18,opt,name=sticky" json:"sticky,omitempty"`
	// Group identifies a consistency group
	Group *Group `protobuf:"bytes,21,opt,name=group" json:"group,omitempty"`
	// GroupEnforced is true if consistency group creation is enforced.
	GroupEnforced bool `protobuf:"varint,22,opt,name=group_enforced,json=groupEnforced" json:"group_enforced,omitempty"`
	// Compressed is true if this volume is to be compressed.
	Compressed bool `protobuf:"varint,23,opt,name=compressed" json:"compressed,omitempty"`
}

VolumeSpec has the properties needed to create a volume.

func (*VolumeSpec) Copy

func (s *VolumeSpec) Copy() *VolumeSpec

Copy makes a deep copy of VolumeSpec

func (*VolumeSpec) Descriptor

func (*VolumeSpec) Descriptor() ([]byte, []int)

func (*VolumeSpec) GetAggregationLevel

func (m *VolumeSpec) GetAggregationLevel() uint32

func (*VolumeSpec) GetBlockSize

func (m *VolumeSpec) GetBlockSize() int64

func (*VolumeSpec) GetCompressed

func (m *VolumeSpec) GetCompressed() bool

func (*VolumeSpec) GetCos

func (m *VolumeSpec) GetCos() CosType

func (*VolumeSpec) GetDedupe

func (m *VolumeSpec) GetDedupe() bool

func (*VolumeSpec) GetEncrypted

func (m *VolumeSpec) GetEncrypted() bool

func (*VolumeSpec) GetEphemeral

func (m *VolumeSpec) GetEphemeral() bool

func (*VolumeSpec) GetFormat

func (m *VolumeSpec) GetFormat() FSType

func (*VolumeSpec) GetGroup

func (m *VolumeSpec) GetGroup() *Group

func (*VolumeSpec) GetGroupEnforced

func (m *VolumeSpec) GetGroupEnforced() bool

func (*VolumeSpec) GetHaLevel

func (m *VolumeSpec) GetHaLevel() int64

func (*VolumeSpec) GetIoProfile

func (m *VolumeSpec) GetIoProfile() IoProfile

func (*VolumeSpec) GetPassphrase

func (m *VolumeSpec) GetPassphrase() string

func (*VolumeSpec) GetReplicaSet

func (m *VolumeSpec) GetReplicaSet() *ReplicaSet

func (*VolumeSpec) GetScale

func (m *VolumeSpec) GetScale() uint32

func (*VolumeSpec) GetShared

func (m *VolumeSpec) GetShared() bool

func (*VolumeSpec) GetSize

func (m *VolumeSpec) GetSize() uint64

func (*VolumeSpec) GetSnapshotInterval

func (m *VolumeSpec) GetSnapshotInterval() uint32

func (*VolumeSpec) GetSnapshotSchedule

func (m *VolumeSpec) GetSnapshotSchedule() string

func (*VolumeSpec) GetSticky

func (m *VolumeSpec) GetSticky() bool

func (*VolumeSpec) GetVolumeLabels

func (m *VolumeSpec) GetVolumeLabels() map[string]string

func (*VolumeSpec) ProtoMessage

func (*VolumeSpec) ProtoMessage()

func (*VolumeSpec) Reset

func (m *VolumeSpec) Reset()

func (*VolumeSpec) String

func (m *VolumeSpec) String() string

type VolumeState

type VolumeState int32

VolumeState represents the state of a volume.

const (
	VolumeState_VOLUME_STATE_NONE VolumeState = 0
	// Volume is transitioning to new state
	VolumeState_VOLUME_STATE_PENDING VolumeState = 1
	// Volume is ready to be assigned to a container
	VolumeState_VOLUME_STATE_AVAILABLE VolumeState = 2
	// Volume is attached to container
	VolumeState_VOLUME_STATE_ATTACHED VolumeState = 3
	// Volume is detached but associated with a container
	VolumeState_VOLUME_STATE_DETACHED VolumeState = 4
	// Volume detach is in progress
	VolumeState_VOLUME_STATE_DETATCHING VolumeState = 5
	// Volume is in error state
	VolumeState_VOLUME_STATE_ERROR VolumeState = 6
	// Volume is deleted, it will remain in this state
	// while resources are asynchronously reclaimed
	VolumeState_VOLUME_STATE_DELETED VolumeState = 7
	// Volume is trying to be detached
	VolumeState_VOLUME_STATE_TRY_DETACHING VolumeState = 8
	// Volume is undergoing restore
	VolumeState_VOLUME_STATE_RESTORE VolumeState = 9
)

func VolumeStateSimpleValueOf

func VolumeStateSimpleValueOf(s string) (VolumeState, error)

VolumeStateSimpleValueOf returns the string format of VolumeState

func (VolumeState) EnumDescriptor

func (VolumeState) EnumDescriptor() ([]byte, []int)

func (VolumeState) SimpleString

func (x VolumeState) SimpleString() string

SimpleString returns the string format of VolumeState

func (VolumeState) String

func (x VolumeState) String() string

type VolumeStateAction

type VolumeStateAction struct {
	// Attach or Detach volume
	Attach VolumeActionParam `protobuf:"varint,1,opt,name=attach,enum=openstorage.api.VolumeActionParam" json:"attach,omitempty"`
	// Mount or unmount volume
	Mount VolumeActionParam `protobuf:"varint,2,opt,name=mount,enum=openstorage.api.VolumeActionParam" json:"mount,omitempty"`
	// MountPath Path where the device is mounted
	MountPath string `protobuf:"bytes,3,opt,name=mount_path,json=mountPath" json:"mount_path,omitempty"`
	// DevicePath Path returned in attach
	DevicePath string `protobuf:"bytes,4,opt,name=device_path,json=devicePath" json:"device_path,omitempty"`
	// UnmountBeforeDetach is used to check whether unmount should be done before
	// a detach
	UnmountBeforeDetach bool `protobuf:"varint,5,opt,name=unmount_before_detach,json=unmountBeforeDetach" json:"unmount_before_detach,omitempty"`
}

VolumeStateAction specifies desired actions.

func (*VolumeStateAction) Descriptor

func (*VolumeStateAction) Descriptor() ([]byte, []int)

func (*VolumeStateAction) GetAttach

func (m *VolumeStateAction) GetAttach() VolumeActionParam

func (*VolumeStateAction) GetDevicePath

func (m *VolumeStateAction) GetDevicePath() string

func (*VolumeStateAction) GetMount

func (m *VolumeStateAction) GetMount() VolumeActionParam

func (*VolumeStateAction) GetMountPath

func (m *VolumeStateAction) GetMountPath() string

func (*VolumeStateAction) GetUnmountBeforeDetach

func (m *VolumeStateAction) GetUnmountBeforeDetach() bool

func (*VolumeStateAction) ProtoMessage

func (*VolumeStateAction) ProtoMessage()

func (*VolumeStateAction) Reset

func (m *VolumeStateAction) Reset()

func (*VolumeStateAction) String

func (m *VolumeStateAction) String() string

type VolumeStatus

type VolumeStatus int32

VolumeStatus represents a health status for a volume.

const (
	VolumeStatus_VOLUME_STATUS_NONE VolumeStatus = 0
	// Volume is not present
	VolumeStatus_VOLUME_STATUS_NOT_PRESENT VolumeStatus = 1
	// Volume is healthy
	VolumeStatus_VOLUME_STATUS_UP VolumeStatus = 2
	// Volume is in fail mode
	VolumeStatus_VOLUME_STATUS_DOWN VolumeStatus = 3
	// Volume is up but with degraded performance
	// In a RAID group, this may indicate a problem with one or more drives
	VolumeStatus_VOLUME_STATUS_DEGRADED VolumeStatus = 4
)

func VolumeStatusSimpleValueOf

func VolumeStatusSimpleValueOf(s string) (VolumeStatus, error)

VolumeStatusSimpleValueOf returns the string format of VolumeStatus

func (VolumeStatus) EnumDescriptor

func (VolumeStatus) EnumDescriptor() ([]byte, []int)

func (VolumeStatus) SimpleString

func (x VolumeStatus) SimpleString() string

SimpleString returns the string format of VolumeStatus

func (VolumeStatus) String

func (x VolumeStatus) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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