4 Commits

Author SHA1 Message Date
Nir Soffer
c086425f8d Fix ovirt-imageioctl without arguments
In the same way we do in ovirt-img - running without arguments is the
same as -h, --help.

Example run:

    $ ./ovirt-imageioctl
    usage: ovirt-imageioctl [-h] {add-ticket,show-ticket,mod-ticket,del-ticket,start-profile,stop-profile} ...

    Control the ovirt-imageio service

    options:
      -h, --help            show this help message and exit

    commands:
      {add-ticket,show-ticket,mod-ticket,del-ticket,start-profile,stop-profile}
        add-ticket          Add a ticket.
        show-ticket         Show a ticket status.
        mod-ticket          Modify a ticket.
        del-ticket          Delete a ticket.
        start-profile       Start server profiling
        stop-profile        Stop server profiling

Reported in:
https://github.com/oVirt/ovirt-imageio/pull/194#issuecomment-1463404284

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2023-03-15 10:55:55 +01:00
Albert Esteve
dd28308e3d reuse: addheader ovirt_imageio/*.py
Add SPDX header to Python files with
'py' extension in the ovirt_imageio
directory.

Signed-off-by: Albert Esteve <aesteve@redhat.com>
2022-10-18 13:04:20 +02:00
Nir Soffer
4f8c632c15 admin: Profiling support
Add {start,stop}_profile() API to the admin Client, and
{start,stop}-profile to the ovirt-imageioctl command. This will be used
to add real upload and download benchmarks with profiling support.

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2022-02-14 17:48:08 +02:00
Nir Soffer
e504bd9f86 admin: Add admin library and command
Add ovirt_imageio.admin python library for controlling the imageio
daemon. The library provides the Client class, supporting adding,
getting or deleting tickets. This library will replace the code in vdsm
for manipulating tickets.

The new ovirt-imageioctl command uses the admin library to manipulate
tickets, providing way to manage tickets manually. This will be useful
to test the Go client.

The library and the command also make it possible to use the
ovirt-imageio service on any host without oVirt installation. One use
case can be a container image, starting a daemon for single image. The
container startup script can install a ticket using the ovirt-imageioctl
command.

Change-Id: I2cc209f4a27d8b4a1021e49c214b7f1f7f229915
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
2021-11-01 00:08:38 +02:00