Re: About RO connection
Thanks, I'll check them out. On Mon, Mar 7, 2022 at 7:31 PM Michal Prívozník wrote: > > On 3/2/22 03:28, Xingbo Kan wrote: > > Dear developers and users: > > Is there any standard or convention of which kind of APIs&flags could > > be invoked by RO connection? If there is any, please tell me in > > detail, thanks a lot! > > Your best bet is to look at public API implementation [1] and see if > virCheckReadOnly*() is called. But in general, anything that can't > change state of a domain/network/... is considered okay for RO > connections (e.g. listing domains, getting domain XML without security > info, etc.). For everything else you'll need RW connection. > > Alternatively, you may look at our RPC protocol description [2] and if > the API is described with "domain:read" then it's okay for RO connection. > > 1: https://gitlab.com/libvirt/libvirt/-/blob/master/src/libvirt-domain.c > 2: > https://gitlab.com/libvirt/libvirt/-/blob/master/src/remote/remote_protocol.x#L3918 > > Michal >
Re: About RO connection
On 3/2/22 03:28, Xingbo Kan wrote: > Dear developers and users: > Is there any standard or convention of which kind of APIs&flags could > be invoked by RO connection? If there is any, please tell me in > detail, thanks a lot! Your best bet is to look at public API implementation [1] and see if virCheckReadOnly*() is called. But in general, anything that can't change state of a domain/network/... is considered okay for RO connections (e.g. listing domains, getting domain XML without security info, etc.). For everything else you'll need RW connection. Alternatively, you may look at our RPC protocol description [2] and if the API is described with "domain:read" then it's okay for RO connection. 1: https://gitlab.com/libvirt/libvirt/-/blob/master/src/libvirt-domain.c 2: https://gitlab.com/libvirt/libvirt/-/blob/master/src/remote/remote_protocol.x#L3918 Michal
About RO connection
Dear developers and users: Is there any standard or convention of which kind of APIs&flags could be invoked by RO connection? If there is any, please tell me in detail, thanks a lot! Kind regards, xkan