{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http", "https" ], "swagger": "2.0", "info": { "description": "OpenStorage is a clustered implementation of the Open Storage specification and relies on the Docker runtime.\nIt allows you to run stateful services in Docker in a multi-host environment.\nIt plugs into Docker volumes to provide storage to a container and plugs into Swarm to operate in a clustered environment.", "title": "OSD API.", "termsOfService": "there are no TOS at this moment, use at your own risk we take no responsibility", "contact": { "name": "Openstorage", "url": "https://github.com/libopenstorage/openstorage", "email": "github@openstorage.org" }, "license": { "name": "APACHE2", "url": "https://opensource.org/licenses/Apache-2.0" }, "version": "1.0.0" }, "host": "localhost", "basePath": "/v1", "paths": { "/cluster/alerts/{resource}": { "get": { "description": "This will return a list of alerts for the requested resource", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "enumerateAlerts", "parameters": [ { "type": "integer", "description": "Resourcetype to get alerts with.\n0: All\n1: Volume\n2: Node\n3: Cluster\n4: Drive\n", "name": "resource", "in": "path", "required": true } ], "responses": { "200": { "description": "Alerts object", "schema": { "$ref": "#/definitions/Alerts" } } } } }, "/cluster/alerts/{resource}/{id}": { "put": { "description": "This will clear alert {id} with resourcetype {resource}", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "clearAlert", "parameters": [ { "type": "integer", "description": "resourcetype to get alerts with.\n0: All\n1: Volume\n2: Node\n3: Cluster\n4: Drive\n", "name": "resource", "in": "path", "required": true }, { "type": "integer", "description": "id to get alerts with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Alerts object", "schema": { "type": "string" } } } }, "delete": { "description": "This delete clear alert {id} with resourcetype {resource}", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "deleteAlert", "parameters": [ { "type": "integer", "description": "resourcetype to get alerts with.\n0: All\n1: Volume\n2: Node\n3: Cluster\n4: Drive\n", "name": "resource", "in": "path", "required": true }, { "type": "integer", "description": "id to get alerts with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Alerts object", "schema": { "type": "string" } } } } }, "/cluster/enumerate": { "get": { "description": "This will return the entire cluster object and it's nodes.", "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "Lists cluster Nodes.", "operationId": "enumerateCluster", "responses": { "200": { "description": "current cluster state", "schema": { "type": "array", "items": { "$ref": "#/definitions/Cluster" } } } } } }, "/cluster/inspect/{id}": { "get": { "description": "This will return the requested node object", "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "Inspect cluster Nodes.", "operationId": "inspectNode", "parameters": [ { "type": "integer", "description": "id to get node with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "a node", "schema": { "$ref": "#/definitions/Node" } } } } }, "/cluster/nodehealth": { "get": { "produces": [ "application/json" ], "tags": [ "node" ], "summary": "This will return node health.", "operationId": "nodeHealth", "responses": { "200": { "description": "node health of responding node.", "schema": { "type": "string" } } } } }, "/cluster/nodestatus": { "get": { "produces": [ "application/json" ], "tags": [ "node" ], "summary": "This will return the node status .", "operationId": "nodeStatus", "responses": { "200": { "description": "node status of responding node.", "schema": { "type": "string" } } } } }, "/cluster/peerstatus": { "get": { "description": "This will return the peer node status", "produces": [ "application/json" ], "tags": [ "node" ], "operationId": "peerStatus", "parameters": [ { "type": "integer", "description": "id of the node we want to check.", "name": "name", "in": "query", "required": true } ], "responses": { "200": { "description": "node status of requested node", "schema": { "type": "string" } } } } }, "/cluster/status": { "get": { "produces": [ "application/json" ], "tags": [ "cluster" ], "summary": "this will return the cluster status.", "operationId": "status", "responses": { "200": { "description": "cluster status", "schema": { "type": "string" } } } } }, "/cluster/versions": { "get": { "description": "Lists API Versions supported by this cluster", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "enumerateVersions", "responses": { "200": { "description": "Supported versions", "schema": { "type": "array", "items": { "type": "string" } } } } } }, "/cluster/{id}": { "put": { "description": "This will shutdown a node (Not Implemented)", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "shutdownNode", "parameters": [ { "type": "integer", "description": "id to get node with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "shutdown success", "schema": { "type": "string" } } } }, "delete": { "description": "This will delete a node from the cluster", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "deleteNode", "parameters": [ { "type": "integer", "description": "id to get node with", "name": "id", "in": "path", "required": true }, { "type": "boolean", "description": "forceRemove node", "name": "forceRemove", "in": "query" } ], "responses": { "200": { "description": "delete node success", "schema": { "type": "string" } } } } }, "/config/cluster": { "get": { "description": "This will return the requested cluster configuration object", "produces": [ "application/json" ], "tags": [ "config" ], "summary": "Get cluster configuration.", "operationId": "getClusterConfig", "responses": { "200": { "description": "a cluster config", "schema": { "$ref": "#/definitions/ClusterConfig" } } } }, "post": { "description": "This will set the requested cluster configuration", "produces": [ "application/json" ], "tags": [ "config" ], "summary": "Set cluster configuration.", "operationId": "setClusterConfig", "parameters": [ { "description": "cluster config json", "name": "config", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ClusterConfig" } } ], "responses": { "200": { "description": "success" } } } }, "/config/node": { "post": { "description": "This will set the requested node configuration", "produces": [ "application/json" ], "tags": [ "config" ], "summary": "Set node configuration.", "operationId": "setNodeConfig", "parameters": [ { "description": "node config json", "name": "config", "in": "body", "required": true, "schema": { "$ref": "#/definitions/NodeConfig" } } ], "responses": { "200": { "description": "success" } } } }, "/config/node/{id}": { "get": { "description": "This will return the requested node configuration object", "produces": [ "application/json" ], "tags": [ "config" ], "summary": "Get node configuration.", "operationId": "getNodeConfig", "parameters": [ { "type": "integer", "description": "id to get node with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "a node", "schema": { "$ref": "#/definitions/NodeConfig" } } } } }, "/loggingurl": { "put": { "description": "Set Logging url", "produces": [ "application/json" ], "tags": [ "cluster" ], "operationId": "setLoggingUrl", "deprecated": true, "parameters": [ { "type": "string", "description": "url to set loggingurl with", "name": "url", "in": "query", "required": true } ], "responses": { "200": { "description": "cluster response", "schema": { "$ref": "#/definitions/ClusterResponse" } } } } }, "/osd-snapshots": { "get": { "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "snapshot" ], "summary": "Enumerate snapshots.", "operationId": "enumerateSnaps", "parameters": [ { "type": "string", "description": "Volume name that maps to this snap", "name": "name", "in": "query" }, { "type": "string", "description": "Comma separated volume labels\nexample: {\"label1\",\"label2\"}\n", "name": "VolumeLabels", "in": "formData" }, { "type": "string", "description": "Comma separated snap labels\nexample: {\"label1\",\"label2\"}\n", "name": "SnapLabels", "in": "formData" }, { "type": "string", "format": "uuid", "description": "Snap UUID", "name": "uuid", "in": "query" } ], "responses": { "200": { "description": "an array of snapshots", "schema": { "type": "array", "items": { "$ref": "#/definitions/Volume" } } } } }, "post": { "description": "Take a snapshot of volume in SnapCreateRequest", "produces": [ "application/json" ], "tags": [ "snapshot" ], "operationId": "createSnap", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "query", "required": true }, { "description": "spec to create snap with", "name": "spec", "in": "body", "required": true, "schema": { "$ref": "#/definitions/SnapCreateRequest" } } ], "responses": { "200": { "description": "an array of volumes", "schema": { "$ref": "#/definitions/SnapCreateResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/SnapCreateResponse" } } } } }, "/osd-snapshots/restore/{id}": { "post": { "produces": [ "application/json" ], "tags": [ "snapshot" ], "summary": "Restore snapshot with specified id.", "operationId": "restoreSnap", "parameters": [ { "type": "integer", "description": "id of snapshot to restore", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "Restored volume", "schema": { "$ref": "#/definitions/VolumeResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeResponse" } } } } }, "/osd-volumes": { "get": { "description": "Enumerate all volumes", "consumes": [ "multipart/form-data" ], "produces": [ "application/json" ], "tags": [ "volume" ], "operationId": "enumerateVolumes", "parameters": [ { "type": "string", "description": "User specified volume name (Case Sensitive)", "name": "Name", "in": "query" }, { "type": "string", "description": "Comma separated name value pairs\nexample: {\"label1\",\"label2\"}\n", "name": "Label", "in": "formData" }, { "type": "string", "description": "Comma separated name value pairs\nexample: {\"label1\",\"label2\"}\n", "name": "ConfigLabel", "in": "formData" }, { "type": "string", "format": "uuid", "description": "Volume UUID", "name": "VolumeID", "in": "query" } ], "responses": { "200": { "description": "an array of volumes", "schema": { "type": "array", "items": { "$ref": "#/definitions/Volume" } } } } }, "post": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Creates a single volume with given spec.", "operationId": "createVolume", "parameters": [ { "description": "spec to create volume with", "name": "spec", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VolumeCreateRequest" } } ], "responses": { "200": { "description": "volume create response", "schema": { "$ref": "#/definitions/VolumeCreateResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeCreateResponse" } } } } }, "/osd-volumes/quiesce/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Quiesce volume with specified id.", "operationId": "quiesceVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/VolumeResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeResponse" } } } } }, "/osd-volumes/requests/{id}": { "post": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Get Requests for volume with specified id.", "operationId": "requestsVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/ActiveRequests" } } } } }, "/osd-volumes/stats/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Get stats for volume with specified id.", "operationId": "statsVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/Stats" } } } } }, "/osd-volumes/unquiesce/{id}": { "post": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Unquiesce volume with specified id.", "operationId": "unquiesceVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/VolumeResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeResponse" } } } } }, "/osd-volumes/usedsize/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Get Used size of volume with specified id.", "operationId": "usedSizeVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response" } } } }, "/osd-volumes/versions": { "get": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Lists API versions supported by this volumeDriver.", "operationId": "listVersions", "responses": { "200": { "description": "Supported versions", "schema": { "type": "array", "items": { "type": "string" } } } } } }, "/osd-volumes/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Inspect volume with specified id.", "operationId": "inspectVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume get response", "schema": { "$ref": "#/definitions/Volume" } } } }, "put": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Updates a single volume with given spec.", "operationId": "setVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true }, { "description": "spec to set volume with", "name": "spec", "in": "body", "required": true, "schema": { "$ref": "#/definitions/VolumeSetRequest" } } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/VolumeSetResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeSetResponse" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "volume" ], "summary": "Delete volume with specified id.", "operationId": "deleteVolume", "parameters": [ { "type": "integer", "description": "id to get volume with", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "volume set response", "schema": { "$ref": "#/definitions/VolumeResponse" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/VolumeResponse" } } } } } }, "definitions": { "AWSConfig": { "description": "AWS configuration parameters struct", "type": "object", "properties": { "aws_access_key_id": { "type": "string", "x-go-name": "AwsAccessKeyId" }, "aws_cmk": { "type": "string", "x-go-name": "AwsCmk" }, "aws_region": { "type": "string", "x-go-name": "AwsRegion" }, "aws_secret_access_key": { "type": "string", "x-go-name": "AwsSecretAccessKey" }, "aws_secret_token_key": { "type": "string", "x-go-name": "AwsSecretTokenKey" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "ActiveRequest": { "type": "object", "properties": { "ReqestKV": {} }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "ActiveRequests": { "type": "object", "properties": { "ActiveRequest": { "type": "array", "items": { "$ref": "#/definitions/ActiveRequest" } }, "RequestCount": { "type": "integer", "format": "int64" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Alert": { "description": "Alert is a structure that represents an alert object", "type": "object", "properties": { "alert_type": { "description": "AlertType user defined alert type", "type": "integer", "format": "int64", "x-go-name": "AlertType" }, "cleared": { "description": "Cleared Flag", "type": "boolean", "x-go-name": "Cleared" }, "id": { "description": "Id for Alert", "type": "integer", "format": "int64", "x-go-name": "Id" }, "message": { "description": "Message describing the Alert", "type": "string", "x-go-name": "Message" }, "resource": { "$ref": "#/definitions/ResourceType" }, "resource_id": { "description": "ResourceId where Alert occured", "type": "string", "x-go-name": "ResourceId" }, "severity": { "$ref": "#/definitions/SeverityType" }, "timestamp": { "$ref": "#/definitions/Timestamp" }, "ttl": { "description": "TTL in seconds for this Alert", "type": "integer", "format": "uint64", "x-go-name": "Ttl" }, "unique_tag": { "description": "UniqueTag helps identify a unique alert for a given resouce", "type": "string", "x-go-name": "UniqueTag" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "AlertActionType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Alerts": { "description": "Alerts is an array of Alert objects", "type": "object", "properties": { "alert": { "type": "array", "items": { "$ref": "#/definitions/Alert" }, "x-go-name": "Alert" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "AttachState": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupCatalogueRequest": { "type": "object", "properties": { "CloudBackupID": { "description": "CloudBackupID is Backup ID in the cloud", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the credential for cloud", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupCatalogueResponse": { "type": "object", "properties": { "CatalogueErr": { "description": "CatalogueErr indicates any error in obtaining cataolgue", "type": "string" }, "Contents": { "description": "Contents is listing of backup contents", "type": "array", "items": { "type": "string" } } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupDeleteRequest": { "type": "object", "properties": { "All": { "description": "All if set to true, backups for all clusters in the cloud are returned", "type": "boolean" }, "ClusterID": { "description": "ClusterID is the optional clusterID to list backups for", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the credential for cloud", "type": "string" }, "SrcVolumeID": { "description": "SrcVolumeID is optional Source VolumeID to list backups for", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupEnumerateRequest": { "type": "object", "properties": { "All": { "description": "All if set to true, backups for all clusters in the cloud are returned", "type": "boolean" }, "ClusterID": { "description": "ClusterID is the optional clusterID to list backups for", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the credential for cloud", "type": "string" }, "SrcVolumeID": { "description": "SrcVolumeID is optional Source VolumeID to list backups for", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupEnumerateResponse": { "type": "object", "properties": { "Backups": { "description": "Backups is list of backups in cloud for given volume/cluster/s", "type": "array", "items": { "$ref": "#/definitions/BackupInfo" } }, "EnumerateErr": { "description": "EnumerateErr indicates any error encountered while enumerating backups", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupGenericRequest": { "type": "object", "properties": { "All": { "description": "All if set to true, backups for all clusters in the cloud are returned", "type": "boolean" }, "ClusterID": { "description": "ClusterID is the optional clusterID to list backups for", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the credential for cloud", "type": "string" }, "SrcVolumeID": { "description": "SrcVolumeID is optional Source VolumeID to list backups for", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupHistoryItem": { "type": "object", "properties": { "SrcVolumeID": { "description": "SrcVolumeID is volume ID which was backedup", "type": "string" }, "Status": { "description": "Status indicates whether backup was completed/failed", "type": "string" }, "Timestamp": { "description": "TimeStamp is the time at which either backup completed/failed", "type": "string", "format": "date-time" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupHistoryRequest": { "type": "object", "properties": { "SrcVolumeID": { "description": "SrcVolumeID is volumeID for which history of backup/restore\nis being requested", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupHistoryResponse": { "type": "object", "properties": { "HistoryErr": { "description": "HistoryErr indicates any error in obtaining history", "type": "string" }, "HistoryList": { "description": "HistoryList is list of past backup/restores in the cluster", "type": "array", "items": { "$ref": "#/definitions/BackupHistoryItem" } } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupInfo": { "type": "object", "properties": { "BackupID": { "description": "BackupID is cloud backup ID for the above source volume", "type": "string" }, "SrcVolumeID": { "description": "SrcVolumeID is Source volumeID of the backup", "type": "string" }, "SrcVolumeName": { "description": "SrcvolumeName is name of the sourceVolume of the backup", "type": "string" }, "Status": { "description": "Status indicates if this backup was successful", "type": "string" }, "Timestamp": { "description": "Timestamp is the timestamp at which the source volume\nwas backed up to cloud", "type": "string", "format": "date-time" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupRequest": { "type": "object", "properties": { "CredentialUUID": { "description": "CredentialUUID is cloud credential to be used for backup", "type": "string" }, "Full": { "description": "Full indicates if full backup is desired eventhough incremental is possible", "type": "boolean" }, "VolumeID": { "description": "VolumeID of the volume for which cloudbackup is requested", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupRestoreRequest": { "type": "object", "properties": { "CloudBackupID": { "description": "CloudBackupID is the backup ID being restored", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the credential to be used for restore operation", "type": "string" }, "NodeID": { "description": "NodeID is the optional NodeID for provisionging restore volume(ResoreVolumeID should not be specified)", "type": "string" }, "RestoreVolumeName": { "description": "RestoreVolumeName is optional volume Name of the new volume to be created\nin the cluster for restoring the cloudbackup", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupRestoreResponse": { "type": "object", "properties": { "RestoreErr": { "description": "RestoreErr indicates the reason for failure of restore operation", "type": "string" }, "RestoreVolumeID": { "description": "RestoreVolumeID is the volumeID to which the backup is being restored", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupSchedDeleteRequest": { "type": "object", "properties": { "SchedUUID": { "description": "SchedUUID is UUID of the schedule to be deleted", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupSchedEnumerateResponse": { "type": "object", "properties": { "BackupSchedules": { "description": "BackupSchedule is map of schedule uuid to scheduleInfo", "type": "object", "additionalProperties": { "$ref": "#/definitions/BackupScheduleInfo" } }, "SchedEnumerateErr": { "description": "SchedEnumerateErr is error encountered while enumerating schedules", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupSchedResponse": { "type": "object", "properties": { "SchedCreateErr": { "description": "SchedCreateErr indicates any error while creating backupschedule", "type": "string" }, "SchedUUID": { "description": "SchedUUID is the UUID of the newly created schedule", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupScheduleInfo": { "type": "object", "properties": { "BackupSchedule": { "description": "BackupSchedule is the frequence of backup", "type": "string" }, "CredentialUUID": { "description": "CredentialUUID is the cloud credential used with this schedule", "type": "string" }, "MaxBackups": { "description": "MaxBackups are the maximum number of backups retained\nin cloud.Older backups are deleted", "type": "integer", "format": "uint64" }, "SrcVolumeID": { "description": "SrcVolumeID is the i schedule's source volume", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupStateChangeRequest": { "type": "object", "properties": { "RequestedState": { "description": "RequestedState is desired state of the op\ncan be pause/resume/stop", "type": "string" }, "SrcVolumeID": { "description": "SrcVolumeID is volume ID on which backup/restore\nstate change is being requested", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupStatus": { "type": "object", "properties": { "BackupID": { "description": "BackupID is the Backup ID for the Op", "type": "string" }, "BytesDone": { "description": "BytesDone indicates total Bytes uploaded/downloaded", "type": "integer", "format": "uint64" }, "CompletedTime": { "description": "CompletedTime indicates Op's completed time", "type": "string", "format": "date-time" }, "NodeID": { "description": "NodeID is the ID of the node where this Op is active", "type": "string" }, "OpType": { "description": "OpType indicates if this is a backup or restore", "type": "string" }, "StartTime": { "description": "StartTime indicates Op's start time", "type": "string", "format": "date-time" }, "Status": { "description": "State indicates if the op is currently active/done/failed", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupStsRequest": { "type": "object", "properties": { "Local": { "description": "Local indicates if only those backups/restores that are\nactive on current node must be returned", "type": "boolean" }, "SrcVolumeID": { "description": "SrcVolumeID optional volumeID to list status of backup/restore", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "BackupStsResponse": { "type": "object", "properties": { "Statuses": { "description": "statuses is list of currently active/failed/done backup/restores", "type": "object", "additionalProperties": { "$ref": "#/definitions/BackupStatus" } }, "StsErr": { "description": "StsErr indicates any error in obtaining the status", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Cluster": { "type": "object", "title": "Cluster represents the state of the cluster.", "required": [ "Id" ], "properties": { "FluentDConfig": { "$ref": "#/definitions/FluentDConfig" }, "Id": { "description": "Id of the cluster.", "type": "string" }, "LoggingURL": { "description": "Logging url for the cluster.", "type": "string" }, "ManagementURL": { "description": "Management url for the cluster", "type": "string" }, "NodeId": { "description": "Id of the node on which this cluster object is initialized", "type": "string" }, "Nodes": { "description": "array of all the nodes in the cluster.", "type": "array", "items": { "$ref": "#/definitions/Node" } }, "Status": { "$ref": "#/definitions/Status" }, "TunnelConfig": { "$ref": "#/definitions/TunnelConfig" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "ClusterConfig": { "type": "object", "properties": { "ClusterId": { "type": "string" }, "DataIface": { "type": "string" }, "DataIp": { "type": "string" }, "DefaultDriver": { "type": "string" }, "FluentDHost": { "type": "string" }, "LoggingURL": { "type": "string" }, "ManagementURL": { "type": "string" }, "MgmtIp": { "type": "string" }, "MgtIface": { "type": "string" }, "NodeId": { "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/config" }, "ClusterNotify": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "ClusterResponse": { "description": "ClusterResponse", "type": "object", "properties": { "error": { "type": "string", "x-go-name": "Error" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Config": { "type": "object", "properties": { "Osd": { "type": "object", "properties": { "ClusterConfig": { "$ref": "#/definitions/ClusterConfig" }, "Drivers": { "description": "map[string]string is volume.VolumeParams equivalent", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } }, "GraphDrivers": { "description": "map[string]string is volume.VolumeParams equivalent", "type": "object", "additionalProperties": { "type": "object", "additionalProperties": { "type": "string" } } } } } }, "x-go-package": "github.com/libopenstorage/openstorage/config" }, "CosType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "CredCreateRequest": { "description": "CredCreateRequest is the input for CredCreate command", "type": "object", "properties": { "InputParams": { "description": "InputParams is map describing cloud provide", "type": "object", "additionalProperties": { "type": "string" } } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "CredCreateResponse": { "description": "CredCreateResponse is returned for CredCreate command", "type": "object", "properties": { "CredErr": { "description": "CredErr indicates reasonfor failed CredCreate", "type": "string" }, "UUID": { "description": "UUID of the credential that was just created", "type": "string" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "DriverType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "FSType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "FluentDConfig": { "description": "DEPRECATED", "type": "object", "title": "FluentDConfig describes ip and port of a fluentdhost.", "properties": { "ip": { "type": "string", "x-go-name": "IP" }, "port": { "type": "string", "x-go-name": "Port" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "GraphDriverChangeType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "GraphDriverChanges": { "description": "GraphDriverChanges represent a list of changes between the filesystem layers\nspecified by the ID and Parent. // Parent may be an empty string, in which\ncase there is no parent.\nWhere the Path is the filesystem path within the layered filesystem", "type": "object", "properties": { "kind": { "$ref": "#/definitions/GraphDriverChangeType" }, "path": { "type": "string", "x-go-name": "Path" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Group": { "description": "Group represents VolumeGroup / namespace\nAll volumes in the same group share this object.", "type": "object", "properties": { "id": { "description": "Id common identifier across volumes that have the same group.", "type": "string", "x-go-name": "Id" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "IoProfile": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "KvdbConfig": { "description": "KvdbConfig stores parameters defining kvdb configuration", "type": "object", "properties": { "acl_token": { "type": "string", "x-go-name": "AclToken" }, "ca_file": { "type": "string", "x-go-name": "CaFile" }, "cert_file": { "type": "string", "x-go-name": "CertFile" }, "client_cert_auth": { "type": "string", "x-go-name": "ClientCertAuth" }, "kvdb_addr": { "type": "array", "items": { "type": "string" }, "x-go-name": "KvdbAddr" }, "password": { "type": "string", "x-go-name": "Password" }, "trusted_ca_file": { "type": "string", "x-go-name": "TrustedCaFile" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "NetworkConfig": { "description": "NetworkConfig is a network configuration parameters struct", "type": "object", "properties": { "data_iface": { "type": "string", "x-go-name": "DataIface" }, "mgt_iface": { "type": "string", "x-go-name": "MgtIface" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "Node": { "description": "It includes the current physical state (CPU, memory, storage, network usage) as\nwell as the containers running on the system.", "type": "object", "title": "Node describes the state of a node.", "properties": { "Avgload": { "description": "Average load (percentage)", "type": "integer", "format": "int64" }, "Cpu": { "description": "Cpu usage of the node.", "type": "number", "format": "double" }, "DataIp": { "description": "Data IP", "type": "string" }, "Disks": { "description": "List of disks on this node.", "type": "object", "additionalProperties": { "$ref": "#/definitions/StorageResource" } }, "GenNumber": { "description": "GenNumber of the node", "type": "integer", "format": "uint64" }, "Hostname": { "description": "Hostname of this node", "type": "string" }, "Id": { "description": "Id of the node.", "type": "string" }, "MemFree": { "description": "Free Memory of the node", "type": "integer", "format": "uint64" }, "MemTotal": { "description": "Total Memory of the node", "type": "integer", "format": "uint64" }, "MemUsed": { "description": "Used Memory of the node", "type": "integer", "format": "uint64" }, "MgmtIp": { "description": "Management IP", "type": "string" }, "NodeData": { "description": "Node data for this node (EX: Public IP, Provider, City..)", "type": "object", "additionalProperties": { "type": "object" } }, "NodeLabels": { "description": "User defined labels for node. Key Value pairs", "type": "object", "additionalProperties": { "type": "string" } }, "Pools": { "description": "List of storage pools this node supports", "type": "array", "items": { "$ref": "#/definitions/StoragePool" } }, "StartTime": { "description": "Start time of this node", "type": "string", "format": "date-time" }, "Status": { "$ref": "#/definitions/Status" }, "Timestamp": { "description": "Timestamp", "type": "string", "format": "date-time" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "NodeConfig": { "description": "NodeConfig is a node level config data", "type": "object", "properties": { "generic": { "type": "object", "x-go-name": "Private" }, "network": { "$ref": "#/definitions/NetworkConfig" }, "node_id": { "type": "string", "x-go-name": "NodeId" }, "storage": { "$ref": "#/definitions/StorageConfig" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "NodesConfig": { "description": "NodesConfig contains all of node level data in the form of a map with node ID's as keys", "type": "object", "properties": { "node_conf": { "type": "object", "additionalProperties": { "$ref": "#/definitions/NodeConfig" }, "x-go-name": "NodeConf" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "OperationFlags": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "ReplicaSet": { "description": "ReplicaSet set of machine IDs (nodes) to which part of this volume is erasure\ncoded - for clustered storage arrays", "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "string" }, "x-go-name": "Nodes" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "ResourceType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "RuntimeStateMap": { "description": "RuntimeStateMap is a list of name value mapping of driver specific runtime\ninformation.", "type": "object", "properties": { "runtime_state": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "RuntimeState" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "SecretsConfig": { "description": "SecretsConfig is a secrets configuration parameters struct", "type": "object", "properties": { "aws": { "$ref": "#/definitions/AWSConfig" }, "cluster_secret_key": { "type": "string", "x-go-name": "ClusterSecretKey" }, "secret_type": { "type": "string", "x-go-name": "SecretType" }, "vault": { "$ref": "#/definitions/VaultConfig" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "SeverityType": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "SnapCreateRequest": { "type": "object", "title": "SnapCreateRequest specifies a request to create a snapshot of given volume.", "properties": { "id": { "description": "volume id", "type": "string", "x-go-name": "Id" }, "locator": { "$ref": "#/definitions/VolumeLocator" }, "readonly": { "type": "boolean", "x-go-name": "Readonly" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "SnapCreateResponse": { "description": "SnapCreateResponse", "type": "object", "properties": { "volume_create_response": { "$ref": "#/definitions/VolumeCreateResponse" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Source": { "description": "Source is a structure that can be given to a volume\nto seed the volume with data.", "type": "object", "properties": { "parent": { "description": "A volume id, if specified will create a clone of the parent.", "type": "string", "x-go-name": "Parent" }, "seed": { "description": "Seed will seed the volume from the specified URI\nAny additional config for the source comes from the labels in the spec", "type": "string", "x-go-name": "Seed" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "StatPoint": { "description": "StatPoint represents the basic structure of a single Stat reported\nTODO: This is the first step to introduce stats in openstorage.\nFollow up task is to introduce an API for logging stats", "type": "object", "properties": { "Fields": { "description": "Fields and values of the stat", "type": "object", "additionalProperties": { "type": "object" } }, "Name": { "description": "Name of the Stat", "type": "string" }, "Tags": { "description": "Tags for the Stat", "type": "object", "additionalProperties": { "type": "string" } }, "Timestamp": { "description": "Timestamp in Unix format", "type": "integer", "format": "int64" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Stats": { "description": "Stats is a structure that represents last collected stats for a volume", "type": "object", "properties": { "bytes_used": { "description": "BytesUsed", "type": "integer", "format": "uint64", "x-go-name": "BytesUsed" }, "interval_ms": { "description": "Interval in ms during which stats were collected", "type": "integer", "format": "uint64", "x-go-name": "IntervalMs" }, "io_ms": { "description": "Time spent doing IOs ms", "type": "integer", "format": "uint64", "x-go-name": "IoMs" }, "io_progress": { "description": "IOs curently in progress", "type": "integer", "format": "uint64", "x-go-name": "IoProgress" }, "read_bytes": { "type": "integer", "format": "uint64", "x-go-name": "ReadBytes" }, "read_ms": { "description": "Time spent in reads in ms", "type": "integer", "format": "uint64", "x-go-name": "ReadMs" }, "reads": { "description": "Reads completed successfully", "type": "integer", "format": "uint64", "x-go-name": "Reads" }, "write_bytes": { "type": "integer", "format": "uint64", "x-go-name": "WriteBytes" }, "write_ms": { "description": "Time spent in writes in ms", "type": "integer", "format": "uint64", "x-go-name": "WriteMs" }, "writes": { "description": "Writes completed successfully", "type": "integer", "format": "uint64", "x-go-name": "Writes" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Status": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "StorageConfig": { "description": "StorageConfig is a storage configuration parameters struct", "type": "object", "properties": { "async_io": { "type": "boolean", "x-go-name": "AsyncIo" }, "devices": { "type": "array", "items": { "type": "string" }, "x-go-name": "Devices" }, "devices_md": { "type": "array", "items": { "type": "string" }, "x-go-name": "DevicesMd" }, "max_count": { "type": "integer", "format": "int32", "x-go-name": "MaxCount" }, "max_drive_set_count": { "type": "integer", "format": "int32", "x-go-name": "MaxDriveSetCount" }, "num_threads": { "type": "integer", "format": "int32", "x-go-name": "NumThreads" }, "raid_level": { "type": "string", "x-go-name": "RaidLevel" }, "raid_level_md": { "type": "string", "x-go-name": "RaidLevelMd" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "StorageMedium": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "StoragePool": { "description": "StoragePool groups different storage devices based on their CosType", "type": "object", "properties": { "Cos": { "$ref": "#/definitions/CosType" }, "ID": { "description": "ID pool ID", "type": "integer", "format": "int32" }, "Medium": { "$ref": "#/definitions/StorageMedium" }, "RaidLevel": { "description": "RaidLevel storage raid level", "type": "string" }, "TotalSize": { "description": "TotalSize of the pool", "type": "integer", "format": "uint64" }, "Used": { "description": "Used size of the pool", "type": "integer", "format": "uint64" }, "labels": { "description": "Labels is a list of user defined name-value pairs", "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Labels" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "StorageResource": { "type": "object", "title": "StorageResource groups properties of a storage device.", "properties": { "id": { "description": "Id is the LUN identifier.", "type": "string", "x-go-name": "Id" }, "iops": { "description": "IOPS", "type": "integer", "format": "uint64", "x-go-name": "Iops" }, "last_scan": { "$ref": "#/definitions/Timestamp" }, "medium": { "$ref": "#/definitions/StorageMedium" }, "online": { "description": "True if this device is online.", "type": "boolean", "x-go-name": "Online" }, "path": { "description": "Path device path for this storage resource.", "type": "string", "x-go-name": "Path" }, "randRW": { "description": "RandRW", "type": "number", "format": "double", "x-go-name": "RandRW" }, "rotation_speed": { "description": "True if this device is rotational.", "type": "string", "x-go-name": "RotationSpeed" }, "seq_read": { "description": "SeqRead", "type": "number", "format": "double", "x-go-name": "SeqRead" }, "seq_write": { "description": "SeqWrite", "type": "number", "format": "double", "x-go-name": "SeqWrite" }, "size": { "description": "Total size in bytes.", "type": "integer", "format": "uint64", "x-go-name": "Size" }, "used": { "description": "Physical Bytes used.", "type": "integer", "format": "uint64", "x-go-name": "Used" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "Timestamp": { "description": "# Examples\n\nExample 1: Compute Timestamp from POSIX `time()`.\n\nTimestamp timestamp;\ntimestamp.set_seconds(time(NULL));\ntimestamp.set_nanos(0);\n\nExample 2: Compute Timestamp from POSIX `gettimeofday()`.\n\nstruct timeval tv;\ngettimeofday(\u0026tv, NULL);\n\nTimestamp timestamp;\ntimestamp.set_seconds(tv.tv_sec);\ntimestamp.set_nanos(tv.tv_usec * 1000);\n\nExample 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.\n\nFILETIME ft;\nGetSystemTimeAsFileTime(\u0026ft);\nUINT64 ticks = (((UINT64)ft.dwHighDateTime) \u003c\u003c 32) | ft.dwLowDateTime;\n\nA Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z\nis 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.\nTimestamp timestamp;\ntimestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));\ntimestamp.set_nanos((INT32) ((ticks % 10000000) * 100));\n\nExample 4: Compute Timestamp from Java `System.currentTimeMillis()`.\n\nlong millis = System.currentTimeMillis();\n\nTimestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)\n.setNanos((int) ((millis % 1000) * 1000000)).build();\n\n\nExample 5: Compute Timestamp from current time in Python.\n\ntimestamp = Timestamp()\ntimestamp.GetCurrentTime()\n\n# JSON Mapping\n\nIn JSON format, the Timestamp type is encoded as a string in the\n[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the\nformat is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\"\nwhere {year} is always expressed using four digits while {month}, {day},\n{hour}, {min}, and {sec} are zero-padded to two digits each. The fractional\nseconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution),\nare optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone\nis required, though only UTC (as indicated by \"Z\") is presently supported.\n\nFor example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past\n01:30 UTC on January 15, 2017.\n\nIn JavaScript, one can convert a Date object to this format using the\nstandard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString]\nmethod. In Python, a standard `datetime.datetime` object can be converted\nto this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime)\nwith the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one\ncan use the Joda Time's [`ISODateTimeFormat.dateTime()`](\nhttp://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime())\nto obtain a formatter capable of generating timestamps in this format.", "type": "object", "title": "A Timestamp represents a point in time independent of any time zone\nor calendar, represented as seconds and fractions of seconds at\nnanosecond resolution in UTC Epoch time. It is encoded using the\nProleptic Gregorian Calendar which extends the Gregorian calendar\nbackwards to year one. It is encoded assuming all minutes are 60\nseconds long, i.e. leap seconds are \"smeared\" so that no leap second\ntable is needed for interpretation. Range is from\n0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.\nBy restricting to that range, we ensure that we can convert to\nand from RFC 3339 date strings.\nSee [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).", "properties": { "nanos": { "description": "Non-negative fractions of a second at nanosecond resolution. Negative\nsecond values with fractions must still have non-negative nanos values\nthat count forward in time. Must be from 0 to 999,999,999\ninclusive.", "type": "integer", "format": "int32", "x-go-name": "Nanos" }, "seconds": { "description": "Represents seconds of UTC time since Unix epoch\n1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to\n9999-12-31T23:59:59Z inclusive.", "type": "integer", "format": "int64", "x-go-name": "Seconds" } }, "x-go-package": "github.com/libopenstorage/openstorage/vendor/github.com/golang/protobuf/ptypes/timestamp" }, "TunnelConfig": { "description": "TunnelConfig describes key, cert and endpoint of a reverse proxy tunnel\nDEPRECATED", "type": "object", "properties": { "cert": { "type": "string", "x-go-name": "Cert" }, "key": { "type": "string", "x-go-name": "Key" }, "tunnel_endpoint": { "type": "string", "x-go-name": "Endpoint" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VaultConfig": { "description": "VaultConfig is a vault configuration parameters struct", "type": "object", "properties": { "vault_addr": { "type": "string", "x-go-name": "VaultAddr" }, "vault_base_path": { "type": "string", "x-go-name": "VaultBasePath" }, "vault_cacert": { "type": "string", "x-go-name": "VaultCacert" }, "vault_capath": { "type": "string", "x-go-name": "VaultCapath" }, "vault_client_cert": { "type": "string", "x-go-name": "VaultClientCert" }, "vault_client_key": { "type": "string", "x-go-name": "VaultClientKey" }, "vault_skip_verify": { "type": "string", "x-go-name": "VaultSkipVerify" }, "vault_tls_server_name": { "type": "string", "x-go-name": "VaultTlsServerName" }, "vault_token": { "type": "string", "x-go-name": "VaultToken" } }, "x-go-package": "github.com/libopenstorage/openstorage/osdconfig" }, "Volume": { "description": "Volume represents an abstract storage volume.", "type": "object", "title": "Volume represents an abstract storage volume.", "properties": { "attach_info": { "description": "AttachInfo is a list of name value mappings that provides attach information.", "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "AttachInfo" }, "attach_path": { "description": "AttachPath is the mounted path in the host namespace.", "type": "array", "items": { "type": "string" }, "x-go-name": "AttachPath" }, "attached_on": { "description": "AttachedOn is the node instance identifier for clustered systems.", "type": "string", "x-go-name": "AttachedOn" }, "attached_state": { "$ref": "#/definitions/AttachState" }, "ctime": { "$ref": "#/definitions/Timestamp" }, "device_path": { "description": "DevicePath is the device exported by block device implementations.", "type": "string", "x-go-name": "DevicePath" }, "error": { "description": "Error is the Last recorded error.", "type": "string", "x-go-name": "Error" }, "format": { "$ref": "#/definitions/FSType" }, "group": { "$ref": "#/definitions/Group" }, "id": { "description": "Self referential volume ID.", "type": "string", "x-go-name": "Id" }, "last_scan": { "$ref": "#/definitions/Timestamp" }, "locator": { "$ref": "#/definitions/VolumeLocator" }, "readonly": { "description": "Readonly is true if this volume is to be mounted with readonly access.", "type": "boolean", "x-go-name": "Readonly" }, "replica_sets": { "description": "ReplicatSets storage for this volumefor clustered storage arrays.", "type": "array", "items": { "$ref": "#/definitions/ReplicaSet" }, "x-go-name": "ReplicaSets" }, "runtime_state": { "description": "RuntimeState is a lst of name value mapping of driver specific runtime\ninformation.", "type": "array", "items": { "$ref": "#/definitions/RuntimeStateMap" }, "x-go-name": "RuntimeState" }, "secure_device_path": { "description": "SecureDevicePath is the device path for an encrypted volume.", "type": "string", "x-go-name": "SecureDevicePath" }, "source": { "$ref": "#/definitions/Source" }, "spec": { "$ref": "#/definitions/VolumeSpec" }, "state": { "$ref": "#/definitions/VolumeState" }, "status": { "$ref": "#/definitions/VolumeStatus" }, "usage": { "description": "Usage is bytes consumed by vtheis volume.", "type": "integer", "format": "uint64", "x-go-name": "Usage" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeActionParam": { "type": "integer", "format": "int32", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeCreateRequest": { "description": "VolumeCreateRequest is a structure that has the locator, source and spec\nto create a volume", "type": "object", "properties": { "locator": { "$ref": "#/definitions/VolumeLocator" }, "source": { "$ref": "#/definitions/Source" }, "spec": { "$ref": "#/definitions/VolumeSpec" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeCreateResponse": { "description": "VolumeCreateResponse", "type": "object", "required": [ "id", "volume_response" ], "properties": { "id": { "description": "ID of the newly created volume\n\nin: body", "type": "string", "x-go-name": "Id" }, "volume_response": { "$ref": "#/definitions/VolumeResponse" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeInfo": { "description": "Volume Info", "type": "object", "properties": { "path": { "type": "string", "x-go-name": "Path" }, "storage": { "$ref": "#/definitions/VolumeSpec" }, "volume_id": { "type": "string", "x-go-name": "VolumeId" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeLocator": { "description": "VolumeLocator is a structure that is attached to a volume\nand is used to carry opaque metadata.", "type": "object", "properties": { "name": { "description": "User friendly identifier", "type": "string", "x-go-name": "Name" }, "volume_labels": { "description": "A set of name-value pairs that acts as search filters", "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "VolumeLabels" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeResponse": { "type": "object", "title": "VolumeResponse is a structure that wraps an error.", "required": [ "error" ], "properties": { "error": { "description": "Error message\n\nin: body", "type": "string", "x-go-name": "Error" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeSetRequest": { "type": "object", "title": "VolumeSet specifies a request to update a volume.", "properties": { "action": { "$ref": "#/definitions/VolumeStateAction" }, "locator": { "$ref": "#/definitions/VolumeLocator" }, "options": { "description": "additional options\nrequired for the Set operation.", "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "spec": { "$ref": "#/definitions/VolumeSpec" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeSetResponse": { "description": "VolumeSetResponse", "type": "object", "required": [ "volume", "volume_response" ], "properties": { "volume": { "$ref": "#/definitions/Volume" }, "volume_response": { "$ref": "#/definitions/VolumeResponse" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeSpec": { "type": "object", "title": "VolumeSpec has the properties needed to create a volume.", "properties": { "aggregation_level": { "description": "Aggregatiokn level Specifies the number of parts the volume can be aggregated from.", "type": "integer", "format": "uint32", "x-go-name": "AggregationLevel" }, "block_size": { "description": "BlockSize for the filesystem.", "type": "integer", "format": "int64", "x-go-name": "BlockSize" }, "cascaded": { "description": "Cascaded is true if this volume can be populated on any node from an external source.", "type": "boolean", "x-go-name": "Cascaded" }, "compressed": { "description": "Compressed is true if this volume is to be compressed.", "type": "boolean", "x-go-name": "Compressed" }, "cos": { "$ref": "#/definitions/CosType" }, "dedupe": { "description": "Dedupe specifies if the volume data is to be de-duplicated.", "type": "boolean", "x-go-name": "Dedupe" }, "encrypted": { "description": "Encrypted is true if this volume will be cryptographically secured.", "type": "boolean", "x-go-name": "Encrypted" }, "ephemeral": { "description": "Ephemeral storage", "type": "boolean", "x-go-name": "Ephemeral" }, "format": { "$ref": "#/definitions/FSType" }, "group": { "$ref": "#/definitions/Group" }, "group_enforced": { "description": "GroupEnforced is true if consistency group creation is enforced.", "type": "boolean", "x-go-name": "GroupEnforced" }, "ha_level": { "description": "HaLevel specifies the number of copies of data.", "type": "integer", "format": "int64", "x-go-name": "HaLevel" }, "io_profile": { "$ref": "#/definitions/IoProfile" }, "journal": { "description": "Journal is true if data for the volume goes into the journal.", "type": "boolean", "x-go-name": "Journal" }, "nfs": { "description": "Nfs is true if this volume can be accessed via nfs.", "type": "boolean", "x-go-name": "Nfs" }, "passphrase": { "description": "Passphrase for an encrypted volume", "type": "string", "x-go-name": "Passphrase" }, "replica_set": { "$ref": "#/definitions/ReplicaSet" }, "scale": { "description": "Scale allows autocreation of volumes.", "type": "integer", "format": "uint32", "x-go-name": "Scale" }, "shared": { "description": "Shared is true if this volume can be remotely accessed.", "type": "boolean", "x-go-name": "Shared" }, "size": { "description": "Size specifies the thin provisioned volume size.", "type": "integer", "format": "uint64", "x-go-name": "Size" }, "snapshot_interval": { "description": "SnapshotInterval in minutes, set to 0 to disable snapshots", "type": "integer", "format": "uint32", "x-go-name": "SnapshotInterval" }, "snapshot_schedule": { "description": "SnapshotSchedule a well known string that specifies when snapshots should be taken.", "type": "string", "x-go-name": "SnapshotSchedule" }, "sticky": { "description": "Sticky volumes cannot be deleted until the flag is removed.", "type": "boolean", "x-go-name": "Sticky" }, "volume_labels": { "description": "VolumeLabels configuration labels", "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "VolumeLabels" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeState": { "type": "integer", "format": "int32", "title": "VolumeState represents the state of a volume.", "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeStateAction": { "type": "object", "title": "VolumeStateAction specifies desired actions.", "properties": { "attach": { "$ref": "#/definitions/VolumeActionParam" }, "device_path": { "description": "DevicePath Path returned in attach", "type": "string", "x-go-name": "DevicePath" }, "mount": { "$ref": "#/definitions/VolumeActionParam" }, "mount_path": { "description": "MountPath Path where the device is mounted", "type": "string", "x-go-name": "MountPath" } }, "x-go-package": "github.com/libopenstorage/openstorage/api" }, "VolumeStatus": { "type": "integer", "format": "int32", "title": "VolumeStatus represents a health status for a volume.", "x-go-package": "github.com/libopenstorage/openstorage/api" } }, "responses": { "clusterResponse": { "description": "ClusterResponse", "headers": { "error": { "type": "string" } } }, "snapCreateResponse": { "description": "SnapCreateResponse", "schema": { "$ref": "#/definitions/VolumeCreateResponse" } }, "volumeCreateResponse": { "description": "VolumeCreateResponse", "schema": { "$ref": "#/definitions/VolumeResponse" } }, "volumeResponse": { "description": "VolumeResponse is a structure that wraps an error." }, "volumeSetResponse": { "description": "VolumeSetResponse", "schema": { "$ref": "#/definitions/VolumeResponse" } } } }