Skip to content

Commit 7daa06e

Browse files
author
Github action on xapi-project/xen-api
committed
1 parent 3dfd664 commit 7daa06e

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

source/includes/datapath.html.md

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -143,30 +143,31 @@ List of blocks for copying.
143143
ranges | int64 * int64 list | List of block ranges, where a range is a \(start,length\) pair, measured in units of \[blocksize\]
144144
### operation
145145
```json
146-
[ "Copy", [ "operation", "operation" ] ]
147-
[ "Mirror", [ "operation", "operation" ] ]
146+
[ "CopyV1", "operation" ]
147+
[ "MirrorV1", "operation" ]
148148
```
149149
type `operation` = `variant { ... }`
150150
The primary key for referring to a long-running operation.
151151
#### Constructors
152-
Name | Type | Description
153-
--------|-----------------|-----------------------------------------------------------------------------------------------------
154-
Copy | string * string | Copy \(src,dst\) represents an on-going copy operation from the \[src\] URI to the \[dst\] URI.
155-
Mirror | string * string | Mirror \(src,dst\) represents an on-going mirror operation from the \[src\] URI to the \[dst\] URI.
152+
Name | Type | Description
153+
----------|--------|-----------------------------------------------------------------------------------
154+
CopyV1 | string | CopyV1 \(key\) represents an on-going copy operation with the unique \[key\].
155+
MirrorV1 | string | MirrorV1 \(key\) represents an on-going mirror operation with the unique \[key\].
156156
### status
157157
```json
158-
{ "progress": 0.0, "failed": true }
158+
{ "progress": 0.0, "complete": true, "failed": true }
159159
```
160160
type `status` = `struct { ... }`
161161
Status information for on-going tasks.
162162
#### Members
163-
Name | Type | Description
164-
----------|--------------|---------------------------------------------------------------------------------
165-
failed | bool | \[failed\] will be set to true if the operation has failed for some reason.
166-
progress | float option | \[progress\] will be returned for a copy operation, and ranges between 0 and 1.
163+
Name | Type | Description
164+
----------|--------------|----------------------------------------------------------------------------------------------------------
165+
failed | bool | \[failed\] will be set to true if the operation has failed for some reason.
166+
complete | bool | \[complete\] will be set true if the operation is complete, whether successfully or not, see \[failed\].
167+
progress | float option | \[progress\] will be returned for a copy operation, and ranges between 0 and 1.
167168
### operations
168169
```json
169-
[ [ "Copy", [ "operations", "operations" ] ] ]
170+
[ [ "CopyV1", "operations" ] ]
170171
[]
171172
```
172173
type `operations` = `operation list`
@@ -896,7 +897,7 @@ if __name__ == "__main__":
896897
> Server
897898
898899
```json
899-
[ "Copy", [ "Copy_1", "Copy_2" ] ]
900+
[ "CopyV1", "CopyV1" ]
900901
```
901902

902903
```ocaml
@@ -976,7 +977,7 @@ if __name__ == "__main__":
976977
> Server
977978
978979
```json
979-
[ "Copy", [ "Copy_1", "Copy_2" ] ]
980+
[ "CopyV1", "CopyV1" ]
980981
```
981982

982983
```ocaml
@@ -1021,9 +1022,7 @@ class Data_myimplementation(Data_skeleton):
10211022
```json
10221023
{
10231024
"method": "Data.stat",
1024-
"params": [
1025-
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
1026-
],
1025+
"params": [ { "operation": [ "CopyV1", "CopyV1" ], "dbg": "dbg" } ],
10271026
"id": 41
10281027
}
10291028
```
@@ -1051,7 +1050,7 @@ if __name__ == "__main__":
10511050
> Server
10521051
10531052
```json
1054-
{ "progress": 0.0, "failed": true }
1053+
{ "progress": 0.0, "complete": true, "failed": true }
10551054
```
10561055

10571056
```ocaml
@@ -1075,7 +1074,7 @@ class Data_myimplementation(Data_skeleton):
10751074
[stat operation] returns the current status of [operation]. For a
10761075
copy operation, this will contain progress information.
10771076
"""
1078-
return {"failed": True, "progress": None}
1077+
return {"failed": True, "complete": True, "progress": None}
10791078
# ...
10801079
```
10811080

@@ -1093,9 +1092,7 @@ class Data_myimplementation(Data_skeleton):
10931092
```json
10941093
{
10951094
"method": "Data.cancel",
1096-
"params": [
1097-
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
1098-
],
1095+
"params": [ { "operation": [ "CopyV1", "CopyV1" ], "dbg": "dbg" } ],
10991096
"id": 42
11001097
}
11011098
```
@@ -1163,9 +1160,7 @@ class Data_myimplementation(Data_skeleton):
11631160
```json
11641161
{
11651162
"method": "Data.destroy",
1166-
"params": [
1167-
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
1168-
],
1163+
"params": [ { "operation": [ "CopyV1", "CopyV1" ], "dbg": "dbg" } ],
11691164
"id": 43
11701165
}
11711166
```
@@ -1258,7 +1253,7 @@ if __name__ == "__main__":
12581253
> Server
12591254
12601255
```json
1261-
[ [ "Copy", [ "Copy_1", "Copy_2" ] ], [ "Copy", [ "Copy_1", "Copy_2" ] ] ]
1256+
[ [ "CopyV1", "CopyV1" ], [ "CopyV1", "CopyV1" ] ]
12621257
```
12631258

12641259
```ocaml

0 commit comments

Comments
 (0)