Skip to content

Commit 546f686

Browse files
author
Github action on xapi-project/xen-api
committed
1 parent 3bc4bfc commit 546f686

2 files changed

Lines changed: 60 additions & 6 deletions

File tree

source/includes/task.html.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,25 @@ The Task interface is required if the backend supports long-running tasks.
1717
```
1818
type `id` = `string`
1919
Unique identifier for a task.
20+
### volume_type
21+
```json
22+
"Data"
23+
"CBT_Metadata"
24+
"Data_and_CBT_Metadata"
25+
```
26+
type `volume_type` = `variant { ... }`
27+
28+
#### Constructors
29+
Name | Type | Description
30+
-----------------------|------|-----------------------------------
31+
Data | unit | Normal data volume
32+
CBT_Metadata | unit | CBT Metadata only, data destroyed
33+
Data_and_CBT_Metadata | unit | Both Data and CBT Metadata
2034
### volume
2135
```json
2236
{
37+
"cbt_enabled": true,
38+
"volume_type": "Data",
2339
"keys": { "keys": "keys" },
2440
"uri": [ "uri" ],
2541
"physical_utilisation": 0,
@@ -47,12 +63,16 @@ type `volume` = `struct { ... }`
4763
physical_utilisation | int64 | Amount of space currently used on the backing storage \(in bytes\)
4864
uri | string list | A list of URIs which can be opened and by a datapath plugin for I/O. A URI could reference a local block device, a remote NFS share, iSCSI LUN or RBD volume. In cases where the data may be accessed over several protocols, the list should be sorted into descending order of desirability. Xapi will open the most desirable URI for which it has an available datapath plugin.
4965
keys | (string * string) list | A list of key=value pairs which have been stored in the Volume metadata. These should not be interpreted by the Volume plugin.
66+
volume_type | volume_type option | The content type of this volume
67+
cbt_enabled | bool option | True means that the storage datapath will track changed dirty blocks while writing and will be able to provide CBT Metadata when requested
5068
### async_result_t
5169
```json
5270
"UnitResult"
5371
[
5472
"Volume",
5573
{
74+
"cbt_enabled": true,
75+
"volume_type": "Data",
5676
"keys": { "keys": "keys" },
5777
"uri": [ "uri" ],
5878
"physical_utilisation": 0,

source/includes/volume.html.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,25 @@ type `probe_result` = `struct { ... }`
109109
```
110110
type `probe_results` = `probe_result list`
111111

112+
### volume_type
113+
```json
114+
"Data"
115+
"CBT_Metadata"
116+
"Data_and_CBT_Metadata"
117+
```
118+
type `volume_type` = `variant { ... }`
119+
120+
#### Constructors
121+
Name | Type | Description
122+
-----------------------|------|-----------------------------------
123+
Data | unit | Normal data volume
124+
CBT_Metadata | unit | CBT Metadata only, data destroyed
125+
Data_and_CBT_Metadata | unit | Both Data and CBT Metadata
112126
### volume
113127
```json
114128
{
129+
"cbt_enabled": true,
130+
"volume_type": "Data",
115131
"keys": { "keys": "keys" },
116132
"uri": [ "uri" ],
117133
"physical_utilisation": 0,
@@ -139,10 +155,14 @@ type `volume` = `struct { ... }`
139155
physical_utilisation | int64 | Amount of space currently used on the backing storage \(in bytes\)
140156
uri | string list | A list of URIs which can be opened and by a datapath plugin for I/O. A URI could reference a local block device, a remote NFS share, iSCSI LUN or RBD volume. In cases where the data may be accessed over several protocols, the list should be sorted into descending order of desirability. Xapi will open the most desirable URI for which it has an available datapath plugin.
141157
keys | (string * string) list | A list of key=value pairs which have been stored in the Volume metadata. These should not be interpreted by the Volume plugin.
158+
volume_type | volume_type option | The content type of this volume
159+
cbt_enabled | bool option | True means that the storage datapath will track changed dirty blocks while writing and will be able to provide CBT Metadata when requested
142160
### volumes
143161
```json
144162
[
145163
{
164+
"cbt_enabled": true,
165+
"volume_type": "Data",
146166
"keys": { "keys": "keys" },
147167
"uri": [ "uri" ],
148168
"physical_utilisation": 0,
@@ -929,6 +949,8 @@ if __name__ == "__main__":
929949
```json
930950
[
931951
{
952+
"cbt_enabled": true,
953+
"volume_type": "Data",
932954
"keys": { "field_1": "value_1", "field_2": "value_2" },
933955
"uri": [ "uri_1", "uri_2" ],
934956
"physical_utilisation": 0,
@@ -941,6 +963,8 @@ if __name__ == "__main__":
941963
"key": "key"
942964
},
943965
{
966+
"cbt_enabled": true,
967+
"volume_type": "Data",
944968
"keys": { "field_1": "value_1", "field_2": "value_2" },
945969
"uri": [ "uri_1", "uri_2" ],
946970
"physical_utilisation": 0,
@@ -980,7 +1004,7 @@ class SR_myimplementation(SR_skeleton):
9801004
"""
9811005
[ls sr] returns a list of volumes contained within an attached SR.
9821006
"""
983-
return [{"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}]
1007+
return [{"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}]
9841008
# ...
9851009
```
9861010

@@ -1043,6 +1067,8 @@ if __name__ == "__main__":
10431067
10441068
```json
10451069
{
1070+
"cbt_enabled": true,
1071+
"volume_type": "Data",
10461072
"keys": { "field_1": "value_1", "field_2": "value_2" },
10471073
"uri": [ "uri_1", "uri_2" ],
10481074
"physical_utilisation": 0,
@@ -1084,7 +1110,7 @@ class Volume_myimplementation(Volume_skeleton):
10841110
is always permissable for an implementation to round-up the volume to
10851111
the nearest convenient block size
10861112
"""
1087-
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}
1113+
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}
10881114
# ...
10891115
```
10901116

@@ -1140,6 +1166,8 @@ if __name__ == "__main__":
11401166
11411167
```json
11421168
{
1169+
"cbt_enabled": true,
1170+
"volume_type": "Data",
11431171
"keys": { "field_1": "value_1", "field_2": "value_2" },
11441172
"uri": [ "uri_1", "uri_2" ],
11451173
"physical_utilisation": 0,
@@ -1185,7 +1213,7 @@ class Volume_myimplementation(Volume_skeleton):
11851213
can only be taken on the host that has the VDI active (if any).
11861214
XAPI will take care of redirecting the request to the proper host
11871215
"""
1188-
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}
1216+
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}
11891217
# ...
11901218
```
11911219

@@ -1238,6 +1266,8 @@ if __name__ == "__main__":
12381266
12391267
```json
12401268
{
1269+
"cbt_enabled": true,
1270+
"volume_type": "Data",
12411271
"keys": { "field_1": "value_1", "field_2": "value_2" },
12421272
"uri": [ "uri_1", "uri_2" ],
12431273
"physical_utilisation": 0,
@@ -1278,7 +1308,7 @@ class Volume_myimplementation(Volume_skeleton):
12781308
[volume] in [sr]. Note the name and description are copied but any
12791309
extra metadata associated by [set] is not copied.
12801310
"""
1281-
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}
1311+
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}
12821312
# ...
12831313
```
12841314

@@ -1333,6 +1363,8 @@ if __name__ == "__main__":
13331363
13341364
```json
13351365
{
1366+
"cbt_enabled": true,
1367+
"volume_type": "Data",
13361368
"keys": { "field_1": "value_1", "field_2": "value_2" },
13371369
"uri": [ "uri_1", "uri_2" ],
13381370
"physical_utilisation": 0,
@@ -1379,7 +1411,7 @@ class Volume_myimplementation(Volume_skeleton):
13791411
rejected then the caller will be expected to fall back to performing a
13801412
blockwise copy.
13811413
"""
1382-
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}
1414+
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}
13831415
# ...
13841416
```
13851417

@@ -1925,6 +1957,8 @@ if __name__ == "__main__":
19251957
19261958
```json
19271959
{
1960+
"cbt_enabled": true,
1961+
"volume_type": "Data",
19281962
"keys": { "field_1": "value_1", "field_2": "value_2" },
19291963
"uri": [ "uri_1", "uri_2" ],
19301964
"physical_utilisation": 0,
@@ -1963,7 +1997,7 @@ class Volume_myimplementation(Volume_skeleton):
19631997
"""
19641998
[stat sr volume] returns metadata associated with [volume].
19651999
"""
1966-
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}}
2000+
return {"key": "string", "uuid": None, "name": "string", "description": "string", "read_write": True, "sharable": True, "virtual_size": long(0), "physical_utilisation": long(0), "uri": ["string"], "keys": {"string": "string"}, "volume_type": None, "cbt_enabled": None}
19672001
# ...
19682002
```
19692003

0 commit comments

Comments
 (0)