]> xenbits.xensource.com Git - libvirt.git/commit
gendispatch: Introduce @sparseflag for our calls
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 12 Apr 2016 13:17:30 +0000 (15:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 18 May 2017 05:42:13 +0000 (07:42 +0200)
commit8f08f28f742ef9d512f6ef5d2cc0da8e6f2f4500
tree096c45ef84f0203db2a99aa03762b17a49d5262c
parent895479647bc185e11a5d92ed644e84a8c49d5f6a
gendispatch: Introduce @sparseflag for our calls

Now, not all APIs are going to support sparse streams. To some it
makes no sense at all, e.g. virDomainOpenConsole() or
virDomainOpenChannel(). To others, we will need a special flag to
indicate that client wants to enable sparse streams. Instead of
having to write RPC dispatchers by hand we can just annotate in
our .x files that a certain flag to certain RPC call enables this
feature. For instance:

     /**
      * @generate: both
      * @readstream: 1
      * @sparseflag: VIR_SPARSE_STREAM
      * @acl: storage_vol:data_read
      */
     REMOTE_PROC_DOMAIN_SOME_API = XXX,

Therefore, whenever client calls virDomainSomeAPI(..,
VIR_SPARSE_STREAM); daemon will mark that down and send stream
skips when possible.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/rpc/gendispatch.pl