From f6a5166e0d6c12e3c1f27ed3ff0fdab935a14172 Mon Sep 17 00:00:00 2001 From: psafont Date: Mon, 2 Sep 2024 16:27:47 +0000 Subject: [PATCH] deploy: b5b154bcc265d1448755f522a1a5605d7e5a2dad --- includes/datapath.html | 117 +++++++++++++++++++++++++++++++++++--- includes/task.html | 8 +-- index.html | 125 ++++++++++++++++++++++++++++++++++++----- 3 files changed, 224 insertions(+), 26 deletions(-) diff --git a/includes/datapath.html b/includes/datapath.html index c47b4eb..938d8d3 100644 --- a/includes/datapath.html +++ b/includes/datapath.html @@ -328,6 +328,9 @@
  • Method: activate_readonly
  • +
  • + Method: import_activate +
  • Method: deactivate
  • @@ -530,6 +533,10 @@

    Members

    Choice of implementation technologies. +

    sock_path

    "sock_path"
    +
    +

    type sock_path = string +Path to a UNIX domain socket

    uri

    "uri"
     

    type uri = string @@ -989,6 +996,98 @@

    Method: activate_readonlyAn opaque string which represents the Xen domain. +

    Method: import_activate

    +

    [import_activate uri domain] prepares a connection to the storage named by [uri] for use by inbound import mirroring, the [domain] parameter identifies which domain to connect to, most likely 0 or a custom storage domain. The return value is a path to a UNIX domain socket to which an open file descriptor may be passed, by SCM_RIGHTS. This, in turn, will become the server end of a Network Block Device (NBD) connection using, new-fixed protocol. Implementations shall declare the VDI_MIRROR_IN feature for this method to be supported. It is expected that activate will have been previously called so that there is an active datapath.

    + +
    +

    Client

    +
    +
    {
    +  "method": "Datapath.import_activate",
    +  "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    +  "id": 35
    +}
    +
    try
    +    let sock_path = Client.import_activate dbg uri domain in
    +    ...
    +with Exn (Unimplemented str) -> ...
    +
    +
    
    +# 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.Datapath.import_activate({ dbg: "string", uri: "string", domain: "string" })
    +    print(repr(results))
    +
    +
    +

    Server

    +
    +
    "sock_path"
    +
    try
    +    let sock_path = Client.import_activate dbg uri domain in
    +    ...
    +with Exn (Unimplemented str) -> ...
    +
    +
    
    +# import additional libraries if needed
    +
    +class Datapath_myimplementation(Datapath_skeleton):
    +    # by default each method will return a Not_implemented error
    +    # ...
    +
    +    def import_activate(self, dbg, uri, domain):
    +        """
    +        [import_activate uri domain] prepares a connection to the
    +        storage named by [uri] for use by inbound import mirroring,
    +        the [domain] parameter identifies which domain to connect to,
    +        most likely 0 or a custom storage domain. The return value is a
    +        path to a UNIX domain socket to which an open file descriptor
    +        may be passed, by SCM_RIGHTS. This, in turn, will become
    +        the server end of a Network Block Device (NBD) connection
    +        using, new-fixed protocol. Implementations shall declare the
    +        VDI_MIRROR_IN feature for this method to be supported. It is
    +        expected that activate will have been previously called so that
    +        there is an active datapath.
    +        """
    +        return "string"
    +    # ...
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDirectionTypeDescription
    dbginstringDebug context from the caller
    uriinuriA URI which represents how to access the volume disk data.
    domainindomainAn opaque string which represents the Xen domain.
    sock_pathoutsock_pathA path to a UNIX domain socket in the filesystem.

    Method: deactivate

    [deactivate uri domain] is called as soon as a VM has finished reading or writing its disk. This is an opportunity for an implementation which needs to perform an explicit volume handover to do it. This function is called in the migration downtime window so delays here will be noticeable to users and should be minimised. This function is idempotent.

    @@ -998,7 +1097,7 @@

    Method: deactivate

    {
       "method": "Datapath.deactivate",
       "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    -  "id": 35
    +  "id": 36
     }
     
    try
         let () = Client.deactivate dbg uri domain in
    @@ -1077,7 +1176,7 @@ 

    Method: detach

    {
       "method": "Datapath.detach",
       "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    -  "id": 36
    +  "id": 37
     }
     
    try
         let () = Client.detach dbg uri domain in
    @@ -1159,7 +1258,7 @@ 

    Method: close

    {
       "method": "Datapath.close",
       "params": [ { "uri": "uri", "dbg": "dbg" } ],
    -  "id": 37
    +  "id": 38
     }
     
    try
         let () = Client.close dbg uri in
    @@ -1271,7 +1370,7 @@ 

    Method: copy

    "dbg": "dbg" } ], - "id": 38 + "id": 39 }
    try
         let operation = Client.copy dbg uri domain remote blocklist in
    @@ -1373,7 +1472,7 @@ 

    Method: mirror

    "params": [ { "remote": "remote", "domain": "domain", "uri": "uri", "dbg": "dbg" } ], - "id": 39 + "id": 40 }
    try
         let operation = Client.mirror dbg uri domain remote in
    @@ -1465,7 +1564,7 @@ 

    Method: stat

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 40 + "id": 41 }
    try
         let status = Client.stat dbg operation in
    @@ -1544,7 +1643,7 @@ 

    Method: cancel

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 41 + "id": 42 }
    try
         let () = Client.cancel dbg operation in
    @@ -1616,7 +1715,7 @@ 

    Method: destroy

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 42 + "id": 43 }
    try
         let () = Client.destroy dbg operation in
    @@ -1684,7 +1783,7 @@ 

    Method: ls

    Client

    -
    { "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 43 }
    +
    { "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 44 }
     
    try
         let operations = Client.ls dbg in
         ...
    diff --git a/includes/task.html b/includes/task.html
    index faee012..c937753 100644
    --- a/includes/task.html
    +++ b/includes/task.html
    @@ -600,7 +600,7 @@ 

    Method: stat

    {
       "method": "Task.stat",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 44
    +  "id": 45
     }
     
    try
         let result = Client.stat dbg id in
    @@ -681,7 +681,7 @@ 

    Method: cancel

    {
       "method": "Task.cancel",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 45
    +  "id": 46
     }
     
    try
         let () = Client.cancel dbg id in
    @@ -754,7 +754,7 @@ 

    Method: destroy

    {
       "method": "Task.destroy",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 46
    +  "id": 47
     }
     
    try
         let () = Client.destroy dbg id in
    @@ -821,7 +821,7 @@ 

    Method: ls

    Client

    -
    { "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 47 }
    +
    { "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 48 }
     
    try
         let task_list = Client.ls dbg in
         ...
    diff --git a/index.html b/index.html
    index f35f733..05184bc 100644
    --- a/index.html
    +++ b/index.html
    @@ -389,6 +389,9 @@
                       
  • Method: activate_readonly
  • +
  • + Method: import_activate +
  • Method: deactivate
  • @@ -1294,6 +1297,10 @@

    Members

    Choice of implementation technologies. +

    sock_path

    "sock_path"
    +
    +

    type sock_path = string +Path to a UNIX domain socket

    uri

    "uri"
     

    type uri = string @@ -1753,6 +1760,98 @@

    Method: activate_readonlyAn opaque string which represents the Xen domain. +

    Method: import_activate

    +

    [import_activate uri domain] prepares a connection to the storage named by [uri] for use by inbound import mirroring, the [domain] parameter identifies which domain to connect to, most likely 0 or a custom storage domain. The return value is a path to a UNIX domain socket to which an open file descriptor may be passed, by SCM_RIGHTS. This, in turn, will become the server end of a Network Block Device (NBD) connection using, new-fixed protocol. Implementations shall declare the VDI_MIRROR_IN feature for this method to be supported. It is expected that activate will have been previously called so that there is an active datapath.

    + +
    +

    Client

    +
    +
    {
    +  "method": "Datapath.import_activate",
    +  "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    +  "id": 35
    +}
    +
    try
    +    let sock_path = Client.import_activate dbg uri domain in
    +    ...
    +with Exn (Unimplemented str) -> ...
    +
    +
    
    +# 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.Datapath.import_activate({ dbg: "string", uri: "string", domain: "string" })
    +    print(repr(results))
    +
    +
    +

    Server

    +
    +
    "sock_path"
    +
    try
    +    let sock_path = Client.import_activate dbg uri domain in
    +    ...
    +with Exn (Unimplemented str) -> ...
    +
    +
    
    +# import additional libraries if needed
    +
    +class Datapath_myimplementation(Datapath_skeleton):
    +    # by default each method will return a Not_implemented error
    +    # ...
    +
    +    def import_activate(self, dbg, uri, domain):
    +        """
    +        [import_activate uri domain] prepares a connection to the
    +        storage named by [uri] for use by inbound import mirroring,
    +        the [domain] parameter identifies which domain to connect to,
    +        most likely 0 or a custom storage domain. The return value is a
    +        path to a UNIX domain socket to which an open file descriptor
    +        may be passed, by SCM_RIGHTS. This, in turn, will become
    +        the server end of a Network Block Device (NBD) connection
    +        using, new-fixed protocol. Implementations shall declare the
    +        VDI_MIRROR_IN feature for this method to be supported. It is
    +        expected that activate will have been previously called so that
    +        there is an active datapath.
    +        """
    +        return "string"
    +    # ...
    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameDirectionTypeDescription
    dbginstringDebug context from the caller
    uriinuriA URI which represents how to access the volume disk data.
    domainindomainAn opaque string which represents the Xen domain.
    sock_pathoutsock_pathA path to a UNIX domain socket in the filesystem.

    Method: deactivate

    [deactivate uri domain] is called as soon as a VM has finished reading or writing its disk. This is an opportunity for an implementation which needs to perform an explicit volume handover to do it. This function is called in the migration downtime window so delays here will be noticeable to users and should be minimised. This function is idempotent.

    @@ -1762,7 +1861,7 @@

    Method: deactivate

    {
       "method": "Datapath.deactivate",
       "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    -  "id": 35
    +  "id": 36
     }
     
    try
         let () = Client.deactivate dbg uri domain in
    @@ -1841,7 +1940,7 @@ 

    Method: detach

    {
       "method": "Datapath.detach",
       "params": [ { "domain": "domain", "uri": "uri", "dbg": "dbg" } ],
    -  "id": 36
    +  "id": 37
     }
     
    try
         let () = Client.detach dbg uri domain in
    @@ -1923,7 +2022,7 @@ 

    Method: close

    {
       "method": "Datapath.close",
       "params": [ { "uri": "uri", "dbg": "dbg" } ],
    -  "id": 37
    +  "id": 38
     }
     
    try
         let () = Client.close dbg uri in
    @@ -2035,7 +2134,7 @@ 

    Method: copy

    "dbg": "dbg" } ], - "id": 38 + "id": 39 }
    try
         let operation = Client.copy dbg uri domain remote blocklist in
    @@ -2137,7 +2236,7 @@ 

    Method: mirror

    "params": [ { "remote": "remote", "domain": "domain", "uri": "uri", "dbg": "dbg" } ], - "id": 39 + "id": 40 }
    try
         let operation = Client.mirror dbg uri domain remote in
    @@ -2229,7 +2328,7 @@ 

    Method: stat

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 40 + "id": 41 }
    try
         let status = Client.stat dbg operation in
    @@ -2308,7 +2407,7 @@ 

    Method: cancel

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 41 + "id": 42 }
    try
         let () = Client.cancel dbg operation in
    @@ -2380,7 +2479,7 @@ 

    Method: destroy

    "params": [ { "operation": [ "Copy", [ "Copy_1", "Copy_2" ] ], "dbg": "dbg" } ], - "id": 42 + "id": 43 }
    try
         let () = Client.destroy dbg operation in
    @@ -2448,7 +2547,7 @@ 

    Method: ls

    Client

    -
    { "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 43 }
    +
    { "method": "Data.ls", "params": [ { "dbg": "dbg" } ], "id": 44 }
     
    try
         let operations = Client.ls dbg in
         ...
    @@ -5945,7 +6044,7 @@ 

    Method: stat

    {
       "method": "Task.stat",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 44
    +  "id": 45
     }
     
    try
         let result = Client.stat dbg id in
    @@ -6026,7 +6125,7 @@ 

    Method: cancel

    {
       "method": "Task.cancel",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 45
    +  "id": 46
     }
     
    try
         let () = Client.cancel dbg id in
    @@ -6099,7 +6198,7 @@ 

    Method: destroy

    {
       "method": "Task.destroy",
       "params": [ { "id": "id", "dbg": "dbg" } ],
    -  "id": 46
    +  "id": 47
     }
     
    try
         let () = Client.destroy dbg id in
    @@ -6166,7 +6265,7 @@ 

    Method: ls

    Client

    -
    { "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 47 }
    +
    { "method": "Task.ls", "params": [ { "dbg": "dbg" } ], "id": 48 }
     
    try
         let task_list = Client.ls dbg in
         ...