qcow2_format.py: add field-formatting class
commit860543f055654017cdb5b25ed06c2bc91b72af70
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Sat, 6 Jun 2020 08:18:02 +0000 (6 11:18 +0300)
committerEric Blake <eblake@redhat.com>
Tue, 9 Jun 2020 20:47:09 +0000 (9 15:47 -0500)
tree4ed118467878b53ff8f78259799ab429df861194
parent0903e3b3714df385931e4ff844e4aff713aa2411
qcow2_format.py: add field-formatting class

Allow formatter class in structure definition instead of hacking with
'mask'. This will simplify further introduction of new formatters.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Message-Id: <20200606081806.23897-10-vsementsov@virtuozzo.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
tests/qemu-iotests/qcow2_format.py