Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Github action on xapi-project/xen-api committed Sep 6, 2023
1 parent 3458f23 commit 6edafd8
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 17 deletions.
26 changes: 13 additions & 13 deletions source/includes/datapath.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Volumes must be attached via the following sequence of calls:
{
"method": "Datapath.open",
"params": [ { "persistent": true, "uri": "uri", "dbg": "dbg" } ],
"id": 30
"id": 31
}
```

Expand Down Expand Up @@ -275,7 +275,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.attach",
"params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
"id": 31
"id": 32
}
```

Expand Down Expand Up @@ -370,7 +370,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.activate",
"params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
"id": 32
"id": 33
}
```

Expand Down Expand Up @@ -442,7 +442,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.activate_readonly",
"params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
"id": 33
"id": 34
}
```

Expand Down Expand Up @@ -519,7 +519,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.deactivate",
"params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
"id": 34
"id": 35
}
```

Expand Down Expand Up @@ -591,7 +591,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.detach",
"params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
"id": 35
"id": 36
}
```

Expand Down Expand Up @@ -666,7 +666,7 @@ class Datapath_myimplementation(Datapath_skeleton):
{
"method": "Datapath.close",
"params": [ { "uri": "uri", "dbg": "dbg" } ],
"id": 36
"id": 37
}
```

Expand Down Expand Up @@ -783,7 +783,7 @@ To mirror a VDI a sequence of these API calls is required:
"dbg": "dbg"
}
],
"id": 37
"id": 38
}
```

Expand Down Expand Up @@ -863,7 +863,7 @@ class Data_myimplementation(Data_skeleton):
"params": [
{ "remote": "remote", "domain": "domain", "uri": "uri", "dbg": "dbg" }
],
"id": 38
"id": 39
}
```

Expand Down Expand Up @@ -938,7 +938,7 @@ class Data_myimplementation(Data_skeleton):
"params": [
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
],
"id": 39
"id": 40
}
```

Expand Down Expand Up @@ -1010,7 +1010,7 @@ class Data_myimplementation(Data_skeleton):
"params": [
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
],
"id": 40
"id": 41
}
```

Expand Down Expand Up @@ -1080,7 +1080,7 @@ class Data_myimplementation(Data_skeleton):
"params": [
{ "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" }
],
"id": 41
"id": 42
}
```

Expand Down Expand Up @@ -1146,7 +1146,7 @@ class Data_myimplementation(Data_skeleton):
> Client
```json
{ "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 42 }
{ "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 43 }
```

```ocaml
Expand Down
8 changes: 4 additions & 4 deletions source/includes/task.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ The task interface is for querying the status of asynchronous tasks. All long-r
{
"method": "Task.stat",
"params": [ { "id": "id", "dbg": "dbg" } ],
"id": 43
"id": 44
}
```

Expand Down Expand Up @@ -208,7 +208,7 @@ class Task_myimplementation(Task_skeleton):
{
"method": "Task.cancel",
"params": [ { "id": "id", "dbg": "dbg" } ],
"id": 44
"id": 45
}
```

Expand Down Expand Up @@ -279,7 +279,7 @@ class Task_myimplementation(Task_skeleton):
{
"method": "Task.destroy",
"params": [ { "id": "id", "dbg": "dbg" } ],
"id": 45
"id": 46
}
```

Expand Down Expand Up @@ -344,7 +344,7 @@ class Task_myimplementation(Task_skeleton):
> Client
```json
{ "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 46 }
{ "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 47 }
```

```ocaml
Expand Down
81 changes: 81 additions & 0 deletions source/includes/volume.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -2474,6 +2474,87 @@ class Volume_myimplementation(Volume_skeleton):
offset | in | int64 | The offset of the extent for which changed blocks should be computed
length | in | int | The length of the extent for which changed blocks should be computed
changed_blocks | out | changed_blocks | The changed blocks between two volumes in the specified extent
## Method: `compose`
\[compose sr volume1 volume2\] layers the updates from \[volume2\] onto \[volume1\], modifying \[volume2\]. Implementations shall declare the VDI\_COMPOSE feature for this method to be supported.

> Client
```json
{
"method": "Volume.compose",
"params": [ { "key2": "key2", "key": "key", "sr": "sr", "dbg": "dbg" } ],
"id": 30
}
```

```ocaml
try
let () = Client.compose dbg sr key key2 in
...
with Exn (Sr_not_attached str) -> ...
| Exn (SR_does_not_exist str) -> ...
| Exn (Volume_does_not_exist str) -> ...
| Exn (Unimplemented str) -> ...
| Exn (Cancelled str) -> ...
| Exn (Activated_on_another_host str) -> ...
```

```python

# import necessary libraries if needed
# we assume that your library providing the client is called myclient and it provides a connect method
import myclient

if __name__ == "__main__":
c = myclient.connect()
results = c.Volume.compose({ dbg: "string", sr: "string", key: "string", key2: "string" })
print(repr(results))
```

> Server
```json
null
```

```ocaml
try
let () = Client.compose dbg sr key key2 in
...
with Exn (Sr_not_attached str) -> ...
| Exn (SR_does_not_exist str) -> ...
| Exn (Volume_does_not_exist str) -> ...
| Exn (Unimplemented str) -> ...
| Exn (Cancelled str) -> ...
| Exn (Activated_on_another_host str) -> ...
```

```python

# import additional libraries if needed

class Volume_myimplementation(Volume_skeleton):
# by default each method will return a Not_implemented error
# ...

def compose(self, dbg, sr, key, key2):
"""
[compose sr volume1 volume2] layers the updates from [volume2] onto
[volume1], modifying [volume2]. Implementations shall declare the
VDI_COMPOSE feature for this method to be supported.
"""
# ...
```


Name | Direction | Type | Description
------|-----------|--------|-------------------------------
dbg | in | string | Debug context from the caller
sr | in | string | The Storage Repository
key | in | key | The volume key
key2 | in | key | The volume key
## Errors
### exns
```json
Expand Down

0 comments on commit 6edafd8

Please sign in to comment.