Test Fixtures¶
Pytest fixtures for storage test setup and teardown.
Common¶
sts.fixtures.common_fixtures
¶
Common test fixtures for virtual block devices, system checks, and utilities.
debugfs_module_reader(managed_module)
¶
Yield a Directory for the managed module's debugfs path.
Ensures debugfs is mounted and the module's debugfs directory exists.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | |
ensure_minimum_devices()
¶
Fixture that ensures minimum number of devices without block size filtering.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
238 239 240 241 | |
ensure_minimum_devices_with_same_block_sizes()
¶
Fixture that ensures minimum number of devices with same block sizes.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
232 233 234 235 | |
loop_devices(request)
¶
Create and clean up loop devices for testing.
Parametrize count via @pytest.mark.parametrize('loop_devices', [2], indirect=True)
or with custom size: [{'count': 1, 'size_mb': 4096}]. Defaults to 1 device, 1024 MB.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
prepare_1minutetip_disk()
¶
Wipe /dev/vdb for 1minutetip ci.m1.small.ephemeral and return it as a single-item list.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
ramdisk_loop_devices(request)
¶
Create ramdisk-backed loopback devices via targetcli for fast I/O testing.
Defaults to 1 device, 512 MB. Parametrize with [{'count': 2, 'size_mb': 256}].
Warning
Total device size should not exceed available RAM.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
scsi_debug_devices(request)
¶
Create SCSI debug devices for testing.
Yields count**2 device paths (num_tgts * add_host). Defaults to 1.
Parametrize with @pytest.mark.parametrize('scsi_debug_devices', [2], indirect=True).
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | |
time_controller()
¶
Yield a TimeController with NTP disabled, restored on teardown.
Warning: Requires root privileges. Temporarily changes system time.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
timed_operation()
¶
Provide a context manager that logs the duration of an operation.
Source code in sts_libs/src/sts/fixtures/common_fixtures.py
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 | |
Block Layer¶
Device Mapper¶
sts.fixtures.dm_fixtures
¶
Device Mapper test fixtures.
Fixtures for linear, error, zero, delay, flakey, thin-pool, thin, cache, and VDO dm targets. Each fixture creates a device and handles cleanup automatically.
MountedDmContext
pydantic-model
¶
Bases: StsBaseModel
State for a DM device formatted and mounted for I/O testing.
Show JSON schema:
{
"$defs": {
"BlockdevInfo": {
"description": "Parsed ``blockdev --report`` output.",
"properties": {
"ro": {
"default": false,
"title": "Ro",
"type": "boolean"
},
"ra": {
"default": 0,
"title": "Ra",
"type": "integer"
},
"log-sec": {
"default": 0,
"title": "Log-Sec",
"type": "integer"
},
"phy-sec": {
"default": 0,
"title": "Phy-Sec",
"type": "integer"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
}
},
"title": "BlockdevInfo",
"type": "object"
},
"DmDevice": {
"additionalProperties": false,
"description": "Base class for all Device Mapper devices.\n\nBefore ``create()``, the device is just a target configuration\n(start, size_sectors, args). After ``create()``, it becomes a full\nblock device with dm_name, path, table, and all BlockDevice functionality.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"blockdev_info": {
"anyOf": [
{
"$ref": "#/$defs/BlockdevInfo"
},
{
"type": "null"
}
],
"default": null
},
"lsblk_info": {
"anyOf": [
{
"$ref": "#/$defs/LsblkInfo"
},
{
"type": "null"
}
],
"default": null
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
},
"size_sectors": {
"default": 0,
"title": "Size Sectors",
"type": "integer"
},
"args": {
"default": "",
"title": "Args",
"type": "string"
},
"dm_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Dm Name"
},
"target_type": {
"default": "",
"title": "Target Type",
"type": "string"
},
"table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Table"
},
"is_created": {
"default": false,
"title": "Is Created",
"type": "boolean"
}
},
"title": "DmDevice",
"type": "object"
},
"LsblkInfo": {
"description": "Parsed ``lsblk -JOb`` output.",
"properties": {
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"rm": {
"default": false,
"title": "Rm",
"type": "boolean"
},
"hctl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Hctl"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"pttype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pttype"
},
"wwn": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Wwn"
},
"fstype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fstype"
},
"mountpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mountpoint"
},
"type": {
"default": "disk",
"title": "Type",
"type": "string"
},
"tran": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Tran"
},
"maj:min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maj:Min"
},
"pkname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pkname"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
}
},
"title": "LsblkInfo",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a DM device formatted and mounted for I/O testing.",
"properties": {
"device": {
"$ref": "#/$defs/DmDevice"
},
"mount_point": {
"title": "Mount Point",
"type": "string"
}
},
"required": [
"device",
"mount_point"
],
"title": "MountedDmContext",
"type": "object"
}
Fields:
-
device(DmDevice) -
mount_point(str)
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
44 45 46 47 48 | |
VdoFormattedContext
pydantic-model
¶
Bases: StsBaseModel
State for a device formatted with vdoformat.
Show JSON schema:
{
"$defs": {
"BlockDevice": {
"additionalProperties": false,
"description": "Block device with lsblk/blockdev info, properties, and discovery.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"blockdev_info": {
"anyOf": [
{
"$ref": "#/$defs/BlockdevInfo"
},
{
"type": "null"
}
],
"default": null
},
"lsblk_info": {
"anyOf": [
{
"$ref": "#/$defs/LsblkInfo"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "BlockDevice",
"type": "object"
},
"BlockdevInfo": {
"description": "Parsed ``blockdev --report`` output.",
"properties": {
"ro": {
"default": false,
"title": "Ro",
"type": "boolean"
},
"ra": {
"default": 0,
"title": "Ra",
"type": "integer"
},
"log-sec": {
"default": 0,
"title": "Log-Sec",
"type": "integer"
},
"phy-sec": {
"default": 0,
"title": "Phy-Sec",
"type": "integer"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
}
},
"title": "BlockdevInfo",
"type": "object"
},
"LsblkInfo": {
"description": "Parsed ``lsblk -JOb`` output.",
"properties": {
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"rm": {
"default": false,
"title": "Rm",
"type": "boolean"
},
"hctl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Hctl"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"pttype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pttype"
},
"wwn": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Wwn"
},
"fstype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fstype"
},
"mountpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mountpoint"
},
"type": {
"default": "disk",
"title": "Type",
"type": "string"
},
"tran": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Tran"
},
"maj:min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maj:Min"
},
"pkname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pkname"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
}
},
"title": "LsblkInfo",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a device formatted with vdoformat.",
"properties": {
"device_path": {
"title": "Device Path",
"type": "string"
},
"device": {
"$ref": "#/$defs/BlockDevice"
}
},
"required": [
"device_path",
"device"
],
"title": "VdoFormattedContext",
"type": "object"
}
Fields:
-
device_path(str) -
device(BlockDevice)
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
51 52 53 54 55 | |
cache_dm_device(loop_devices, request)
¶
Create and clean up a dm-cache device from three loop devices (origin, cache, metadata).
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 | |
check_kernel_format_support()
¶
Skip test if the running kernel does not support VDO kernel-side formatting.
Requires kernel >= 6.12.0-241.el10. Uses VersionInfo to parse and compare the kernel version string.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 | |
create_dm_device_from_targets(dm_name, targets)
¶
Create a DM device from multiple targets.
This is a helper function for creating concatenated or multi-target devices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dm_name
|
str
|
Device mapper name |
required |
targets
|
list[DmDevice]
|
List of DmDevice instances (in configuration state) |
required |
Returns:
| Type | Description |
|---|---|
DmDevice | None
|
DmDevice instance or None if creation failed |
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | |
delay_device_positional(loop_devices, request)
¶
Create a delay device using DelayDevice.create_positional().
Like delay_dm_device but uses the positional creation API. Supports 3, 6,
and 9 argument formats based on which keys are parametrized.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | |
delay_dm_device(loop_devices, request)
¶
Create and clean up a delay DM device. Supports 3, 6, and 9 argument formats.
The argument format is selected by which keys are present in parametrize:
- 3-arg (default): delay_ms, offset -- uniform delay for all ops
- 6-arg: read_delay_ms, write_delay_ms -- separate read/write delays
- 9-arg: adds flush_delay_ms for independent flush delay
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
error_dm_device(request)
¶
Create and clean up an error DM device (returns I/O errors, no backing device).
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
flakey_dm_device(loop_devices, request)
¶
Create and clean up a flakey DM device that simulates unreliable storage.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 | |
linear_dm_device(loop_devices, request)
¶
Create and clean up a linear DM device from the first loop device.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | |
mounted_dm_device(request)
¶
Format and mount a DM device, yielding a MountedDmContext.
Parametrize dm_device_fixture (default 'delay_dm_device'),
fs_type (default 'ext4'), and mount_point (default '/mnt/sts-dm-test').
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 | |
thin_dm_device(thin_pool_dm_device, request)
¶
Create and clean up a thin device from the thin_pool_dm_device fixture.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 | |
thin_pool_dm_device(loop_devices, request)
¶
Create and clean up a thin-pool DM device from two loop devices (data + metadata).
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | |
vdo_dm_device(vdo_formatted_device, request)
¶
Create and clean up a VDO DM device on top of a vdoformat-formatted backing device.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 | |
vdo_formatted_device(load_vdo_module, loop_devices, request)
¶
Format the first loop device with vdoformat and return a VdoFormattedContext.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 | |
vdo_kernel_formatted_device(load_vdo_module, loop_devices, request, check_kernel_format_support)
¶
Create a VDO device using kernel-side formatting (no vdoformat).
Requires kernel >= 6.12.0-241.el10 where dm-vdo auto-formats zeroed backing devices. Automatically skips on unsupported kernels.
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 | |
zero_dm_device(request)
¶
Create and clean up a zero DM device (returns zeros on read, no backing device).
Source code in sts_libs/src/sts/fixtures/dm_fixtures.py
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 | |
Device Mapper Persistent Data¶
sts.fixtures.dmpd_fixtures
¶
device-mapper-persistent-data (dmpd) test fixtures.
These fixtures build LVM thin-pool and cache-pool metadata into known states (including deliberately "broken" metadata) for exercising the dmpd tools (thin_dump, thin_check, thin_repair, thin_restore, thin_trim, cache_dump, cache_check, cache_repair, cache_restore).
CachePoolSplitState
pydantic-model
¶
Bases: StsBaseModel
Cache pool state flowing through pool/volume/split/swap chain (internal).
Show JSON schema:
{
"additionalProperties": false,
"description": "Cache pool state flowing through pool/volume/split/swap chain (internal).",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"cache_origin_name": {
"title": "Cache Origin Name",
"type": "string"
},
"cache_pool_name": {
"title": "Cache Pool Name",
"type": "string"
},
"cached_lv_name": {
"default": "",
"title": "Cached Lv Name",
"type": "string"
},
"cache_metadata_dev": {
"default": "",
"title": "Cache Metadata Dev",
"type": "string"
}
},
"required": [
"vg_name",
"cache_origin_name",
"cache_pool_name"
],
"title": "CachePoolSplitState",
"type": "object"
}
Fields:
-
vg_name(str) -
cache_origin_name(str) -
cache_pool_name(str) -
cached_lv_name(str) -
cache_metadata_dev(str)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
94 95 96 97 98 99 100 101 | |
CacheTestContext
pydantic-model
¶
Bases: StsBaseModel
Terminal state for the cache-pool metadata fixture chain (dmpd testing).
Show JSON schema:
{
"additionalProperties": false,
"description": "Terminal state for the cache-pool metadata fixture chain (dmpd testing).",
"properties": {
"cache_metadata_dev": {
"title": "Cache Metadata Dev",
"type": "string"
},
"cache_dump_path": {
"format": "path",
"title": "Cache Dump Path",
"type": "string"
},
"cache_repair_path": {
"format": "path",
"title": "Cache Repair Path",
"type": "string"
}
},
"required": [
"cache_metadata_dev",
"cache_dump_path",
"cache_repair_path"
],
"title": "CacheTestContext",
"type": "object"
}
Fields:
-
cache_metadata_dev(str) -
cache_dump_path(Path) -
cache_repair_path(Path)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
104 105 106 107 108 109 | |
CacheVolumeState
pydantic-model
¶
Bases: StsBaseModel
Cache volume names for cache pool operations (internal chain state).
Show JSON schema:
{
"additionalProperties": false,
"description": "Cache volume names for cache pool operations (internal chain state).",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"cache_meta_name": {
"title": "Cache Meta Name",
"type": "string"
},
"cache_origin_name": {
"title": "Cache Origin Name",
"type": "string"
},
"cache_data_name": {
"title": "Cache Data Name",
"type": "string"
}
},
"required": [
"vg_name",
"cache_meta_name",
"cache_origin_name",
"cache_data_name"
],
"title": "CacheVolumeState",
"type": "object"
}
Fields:
-
vg_name(str) -
cache_meta_name(str) -
cache_origin_name(str) -
cache_data_name(str)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
85 86 87 88 89 90 91 | |
SwapVolumeInfo
pydantic-model
¶
Bases: StsBaseModel
Swap volume state for metadata operations (internal to fixture chain).
Show JSON schema:
{
"$defs": {
"LVReport": {
"description": "Parsed LV data from 'lvs -o lv_all,seg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one logical volume's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').\nAll fields match lvs JSON key names and retain str | None typing,\nexcept for a handful of numeric fields (see below) that are coerced.",
"properties": {
"lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Uuid"
},
"lv_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Name"
},
"lv_full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Name"
},
"lv_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Path"
},
"lv_dm_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Dm Path"
},
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"lv_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Size"
},
"lv_metadata_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Metadata Size"
},
"seg_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Count"
},
"lv_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Layout"
},
"lv_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Role"
},
"lv_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Attr"
},
"lv_active": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active"
},
"lv_active_locally": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Locally"
},
"lv_active_remotely": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Remotely"
},
"lv_active_exclusively": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Exclusively"
},
"lv_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Permissions"
},
"lv_suspended": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Suspended"
},
"lv_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Major"
},
"lv_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Minor"
},
"lv_kernel_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Major"
},
"lv_kernel_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Minor"
},
"lv_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Read Ahead"
},
"lv_kernel_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Read Ahead"
},
"pool_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv"
},
"pool_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv Uuid"
},
"data_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv"
},
"data_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv Uuid"
},
"metadata_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv"
},
"metadata_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv Uuid"
},
"data_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Percent"
},
"metadata_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Percent"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"origin_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Uuid"
},
"origin_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Size"
},
"snap_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Percent"
},
"raid_mismatch_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Mismatch Count"
},
"raid_sync_action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Sync Action"
},
"raid_write_behind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Write Behind"
},
"raid_min_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Min Recovery Rate"
},
"raid_max_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Max Recovery Rate"
},
"cache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Total Blocks"
},
"cache_used_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Used Blocks"
},
"cache_dirty_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dirty Blocks"
},
"cache_read_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Hits"
},
"cache_read_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Misses"
},
"cache_write_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Hits"
},
"cache_write_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Misses"
},
"kernel_cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Settings"
},
"kernel_cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Policy"
},
"vdo_operating_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Operating Mode"
},
"vdo_compression_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression State"
},
"vdo_index_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index State"
},
"vdo_used_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Used Size"
},
"vdo_saving_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Saving Percent"
},
"writecache_block_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Block Size"
},
"writecache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Total Blocks"
},
"writecache_free_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Free Blocks"
},
"writecache_writeback_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Writeback Blocks"
},
"writecache_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Error"
},
"lv_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Policy"
},
"lv_allocation_locked": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Locked"
},
"lv_autoactivation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Autoactivation"
},
"lv_when_full": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv When Full"
},
"lv_skip_activation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Skip Activation"
},
"lv_fixed_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Fixed Minor"
},
"lv_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time"
},
"lv_time_removed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time Removed"
},
"lv_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Host"
},
"lv_health_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Health Status"
},
"lv_check_needed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Check Needed"
},
"lv_merge_failed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merge Failed"
},
"lv_snapshot_invalid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Snapshot Invalid"
},
"lv_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Tags"
},
"lv_profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Profile"
},
"lv_lockargs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Lockargs"
},
"lv_modules": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Modules"
},
"lv_historical": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Historical"
},
"kernel_discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Discards"
},
"copy_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Copy Percent"
},
"sync_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sync Percent"
},
"lv_live_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Live Table"
},
"lv_inactive_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Inactive Table"
},
"lv_device_open": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Device Open"
},
"lv_parent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Parent"
},
"lv_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Ancestors"
},
"lv_full_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Ancestors"
},
"lv_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Descendants"
},
"lv_full_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Descendants"
},
"lv_converting": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Converting"
},
"lv_merging": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merging"
},
"move_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv"
},
"move_pv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv Uuid"
},
"convert_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv"
},
"convert_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv Uuid"
},
"mirror_log": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log"
},
"mirror_log_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log Uuid"
},
"lv_initial_image_sync": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Initial Image Sync"
},
"lv_image_synced": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Image Synced"
},
"raidintegritymode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegritymode"
},
"raidintegrityblocksize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegrityblocksize"
},
"integritymismatches": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integritymismatches"
},
"kernel_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Metadata Format"
},
"segtype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Segtype"
},
"stripes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripes"
},
"data_stripes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Stripes"
},
"stripe_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripe Size"
},
"region_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Region Size"
},
"chunk_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chunk Size"
},
"seg_start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start"
},
"seg_start_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start Pe"
},
"seg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size"
},
"seg_size_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size Pe"
},
"seg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Tags"
},
"seg_pe_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Pe Ranges"
},
"seg_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Le Ranges"
},
"seg_metadata_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Metadata Le Ranges"
},
"devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Devices"
},
"metadata_devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Devices"
},
"seg_monitor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Monitor"
},
"reshape_len": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len"
},
"reshape_len_le": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len Le"
},
"data_copies": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Copies"
},
"data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Offset"
},
"new_data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "New Data Offset"
},
"parity_chunks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parity Chunks"
},
"thin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Count"
},
"discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Discards"
},
"cache_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Metadata Format"
},
"cache_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Mode"
},
"zero": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Zero"
},
"transaction_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Transaction Id"
},
"thin_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Id"
},
"cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Policy"
},
"cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Settings"
},
"integrity_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integrity Settings"
},
"vdo_compression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression"
},
"vdo_deduplication": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Deduplication"
},
"vdo_minimum_io_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Minimum Io Size"
},
"vdo_block_map_cache_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Cache Size"
},
"vdo_block_map_era_length": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Era Length"
},
"vdo_use_sparse_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Sparse Index"
},
"vdo_index_memory_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index Memory Size"
},
"vdo_slab_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Slab Size"
},
"vdo_ack_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Ack Threads"
},
"vdo_bio_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Threads"
},
"vdo_bio_rotation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Rotation"
},
"vdo_cpu_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Cpu Threads"
},
"vdo_hash_zone_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Hash Zone Threads"
},
"vdo_logical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Logical Threads"
},
"vdo_physical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Physical Threads"
},
"vdo_max_discard": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Max Discard"
},
"vdo_header_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Header Size"
},
"vdo_use_metadata_hints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Metadata Hints"
},
"vdo_write_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Write Policy"
}
},
"title": "LVReport",
"type": "object"
},
"LogicalVolume": {
"additionalProperties": false,
"description": "Logical Volume device.\n\nExample:\n ```python\n lv = LogicalVolume(name='lv0', vg='vg0')\n lv.create(size='100M').assert_ok()\n print(lv.report.lv_size)\n ```",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "LogicalVolume",
"type": "object"
}
},
"additionalProperties": false,
"description": "Swap volume state for metadata operations (internal to fixture chain).",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"swap_name": {
"title": "Swap Name",
"type": "string"
},
"swap_lv": {
"$ref": "#/$defs/LogicalVolume"
}
},
"required": [
"vg_name",
"swap_name",
"swap_lv"
],
"title": "SwapVolumeInfo",
"type": "object"
}
Fields:
-
vg_name(str) -
swap_name(str) -
swap_lv(LogicalVolume)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
43 44 45 46 47 48 | |
ThinMetadataContext
pydantic-model
¶
Bases: StsBaseModel
Terminal state for the thin-pool metadata fixture chain (dmpd testing).
By the time tests consume this model through setup_thin_metadata_for_dmpd
or restored_thin_pool, all fields are populated.
Show JSON schema:
{
"additionalProperties": false,
"description": "Terminal state for the thin-pool metadata fixture chain (dmpd testing).\n\nBy the time tests consume this model through ``setup_thin_metadata_for_dmpd``\nor ``restored_thin_pool``, all fields are populated.",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"pool_name": {
"title": "Pool Name",
"type": "string"
},
"swap_name": {
"title": "Swap Name",
"type": "string"
},
"metadata_dev": {
"title": "Metadata Dev",
"type": "string"
},
"metadata_backup_path": {
"format": "path",
"title": "Metadata Backup Path",
"type": "string"
},
"metadata_repair_path": {
"format": "path",
"title": "Metadata Repair Path",
"type": "string"
},
"metadata_working_path": {
"format": "path",
"title": "Metadata Working Path",
"type": "string"
}
},
"required": [
"vg_name",
"pool_name",
"swap_name",
"metadata_dev",
"metadata_backup_path",
"metadata_repair_path",
"metadata_working_path"
],
"title": "ThinMetadataContext",
"type": "object"
}
Fields:
-
vg_name(str) -
pool_name(str) -
swap_name(str) -
metadata_dev(str) -
metadata_backup_path(Path) -
metadata_repair_path(Path) -
metadata_working_path(Path)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 | |
ThinPoolState
pydantic-model
¶
Bases: StsBaseModel
Thin pool state after volume creation and lifecycle (internal chain state).
Show JSON schema:
{
"additionalProperties": false,
"description": "Thin pool state after volume creation and lifecycle (internal chain state).",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"pool_name": {
"title": "Pool Name",
"type": "string"
},
"thin_count": {
"title": "Thin Count",
"type": "integer"
},
"thin_base_name": {
"title": "Thin Base Name",
"type": "string"
}
},
"required": [
"vg_name",
"pool_name",
"thin_count",
"thin_base_name"
],
"title": "ThinPoolState",
"type": "object"
}
Fields:
-
vg_name(str) -
pool_name(str) -
thin_count(int) -
thin_base_name(str)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
51 52 53 54 55 56 57 | |
ThinSwapState
pydantic-model
¶
Bases: StsBaseModel
State after thin metadata swap to swap volume (internal chain state).
Show JSON schema:
{
"additionalProperties": false,
"description": "State after thin metadata swap to swap volume (internal chain state).",
"properties": {
"vg_name": {
"title": "Vg Name",
"type": "string"
},
"pool_name": {
"title": "Pool Name",
"type": "string"
},
"swap_name": {
"title": "Swap Name",
"type": "string"
},
"metadata_dev": {
"title": "Metadata Dev",
"type": "string"
}
},
"required": [
"vg_name",
"pool_name",
"swap_name",
"metadata_dev"
],
"title": "ThinSwapState",
"type": "object"
}
Fields:
-
vg_name(str) -
pool_name(str) -
swap_name(str) -
metadata_dev(str)
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
60 61 62 63 64 65 66 | |
binary_metadata_file()
¶
Yield a pre-allocated 5MB binary file in /var/tmp for DMPD metadata operations.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
126 127 128 129 130 131 132 133 134 135 136 137 138 | |
cache_metadata_backup(cache_metadata_swap)
¶
Dump cache metadata and prepare a repair file for DMPD testing.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 | |
cache_metadata_swap(cache_split, swap_volume)
¶
Swap cache pool metadata into the swap volume via lvconvert.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 | |
cache_pool(cache_volumes)
¶
Merge cache data and metadata volumes into a cache pool via lvconvert.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 | |
cache_split(cache_volume)
¶
Split the cached volume to separate cache pool and origin.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
495 496 497 498 499 500 501 502 503 504 505 506 | |
cache_volume(cache_pool)
¶
Convert origin LV to a cached volume backed by the cache pool.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
cache_volumes(setup_loopdev_vg)
¶
Create cache metadata, origin, and data logical volumes for cache pool testing.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 | |
metadata_backup(metadata_swap)
¶
Dump thin metadata to XML and prepare repair/working binary files.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 | |
metadata_snapshot(thin_volumes_with_lifecycle)
¶
Create a metadata snapshot via suspend/message/resume, then deactivate thin volumes.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 | |
metadata_swap(metadata_snapshot, swap_volume)
¶
Swap thin pool metadata into the swap volume via lvconvert.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 | |
restored_thin_pool(metadata_backup)
¶
Restore thin pool metadata and swap it back so the pool is activatable.
Warning: Use only for tests needing an active pool (e.g. thin_trim). Most DMPD
tests should use setup_thin_metadata_for_dmpd which preserves the intentionally
inconsistent metadata state.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 | |
setup_cache_metadata_for_dmpd(_install_dmpd, cache_metadata_backup)
¶
Provide cache metadata for DMPD cache tool testing.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
569 570 571 572 573 | |
setup_thin_metadata_for_dmpd(_install_dmpd, metadata_backup)
¶
Provide intentionally inconsistent thin-pool metadata for DMPD tool testing.
The metadata swap leaves a transaction_id mismatch so DMPD tools can exercise their detection, analysis, and repair paths.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
397 398 399 400 401 402 403 404 405 | |
swap_volume(setup_loopdev_vg)
¶
Create a 75MB swap logical volume for metadata swapping.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 | |
thin_volumes_with_lifecycle(setup_loopdev_vg)
¶
Create a 3GB thin pool with 10 thin volumes and generate metadata activity.
Each thin volume gets a filesystem created, mounted, written to, unmounted, and deactivated to produce realistic metadata for DMPD testing.
Source code in sts_libs/src/sts/fixtures/dmpd_fixtures.py
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | |
Loop Devices¶
Provided by Common Fixtures — see loop_devices.
Multipath¶
sts.fixtures.multipath_fixtures
¶
Multipath test fixtures for service management and device creation.
MultipathActivePathsContext
pydantic-model
¶
Bases: StsBaseModel
State for get_multipath_active_paths fixture.
Show JSON schema:
{
"$defs": {
"BlockdevInfo": {
"description": "Parsed ``blockdev --report`` output.",
"properties": {
"ro": {
"default": false,
"title": "Ro",
"type": "boolean"
},
"ra": {
"default": 0,
"title": "Ra",
"type": "integer"
},
"log-sec": {
"default": 0,
"title": "Log-Sec",
"type": "integer"
},
"phy-sec": {
"default": 0,
"title": "Phy-Sec",
"type": "integer"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
},
"size": {
"default": 0,
"title": "Size",
"type": "integer"
}
},
"title": "BlockdevInfo",
"type": "object"
},
"DmDevice": {
"additionalProperties": false,
"description": "Base class for all Device Mapper devices.\n\nBefore ``create()``, the device is just a target configuration\n(start, size_sectors, args). After ``create()``, it becomes a full\nblock device with dm_name, path, table, and all BlockDevice functionality.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"blockdev_info": {
"anyOf": [
{
"$ref": "#/$defs/BlockdevInfo"
},
{
"type": "null"
}
],
"default": null
},
"lsblk_info": {
"anyOf": [
{
"$ref": "#/$defs/LsblkInfo"
},
{
"type": "null"
}
],
"default": null
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
},
"size_sectors": {
"default": 0,
"title": "Size Sectors",
"type": "integer"
},
"args": {
"default": "",
"title": "Args",
"type": "string"
},
"dm_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Dm Name"
},
"target_type": {
"default": "",
"title": "Target Type",
"type": "string"
},
"table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Table"
},
"is_created": {
"default": false,
"title": "Is Created",
"type": "boolean"
}
},
"title": "DmDevice",
"type": "object"
},
"LsblkInfo": {
"description": "Parsed ``lsblk -JOb`` output.",
"properties": {
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"rm": {
"default": false,
"title": "Rm",
"type": "boolean"
},
"hctl": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Hctl"
},
"state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "State"
},
"pttype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pttype"
},
"wwn": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Wwn"
},
"fstype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Fstype"
},
"mountpoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mountpoint"
},
"type": {
"default": "disk",
"title": "Type",
"type": "string"
},
"tran": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Tran"
},
"maj:min": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Maj:Min"
},
"pkname": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pkname"
},
"start": {
"default": 0,
"title": "Start",
"type": "integer"
}
},
"title": "LsblkInfo",
"type": "object"
},
"MultipathDevice": {
"additionalProperties": false,
"description": "Multipath device managed by multipathd.\n\nFor creating DM multipath targets directly (without multipathd), see\n`sts.dm.multipath.MultipathTarget`.\n\nThe ``dm`` attribute provides access to a `DmDevice` for low-level\nDM operations (table, size). ``size`` is derived from the DM device.\n\nExample:\n ```python\n device = MultipathDevice().discover() # Uses first available device\n device = MultipathDevice(name='mpatha').discover()\n device.dm.table # Access DM table\n ```",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"minimum": 0,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"blockdev_info": {
"anyOf": [
{
"$ref": "#/$defs/BlockdevInfo"
},
{
"type": "null"
}
],
"default": null
},
"lsblk_info": {
"anyOf": [
{
"$ref": "#/$defs/LsblkInfo"
},
{
"type": "null"
}
],
"default": null
},
"dm_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Dm Name"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"wwid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Wwid"
},
"vendor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vendor"
},
"n_paths": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "N Paths"
},
"size_str": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Size Str"
},
"features": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Features"
},
"hwhandler": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Hwhandler"
},
"failback": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Failback"
},
"dm_st": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Dm St"
},
"path_groups": {
"items": {
"$ref": "#/$defs/PathGroup"
},
"title": "Path Groups",
"type": "array"
},
"dm": {
"anyOf": [
{
"$ref": "#/$defs/DmDevice"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "MultipathDevice",
"type": "object"
},
"PathGroup": {
"description": "A path group within a multipath device's 'path_groups' report.\n\nThe inner `paths` entries keep their raw dict shape (`chk_st`, `dev`,\n`dm_st`, etc.) since the exact keys reported by multipathd vary by version.",
"properties": {
"group": {
"default": 0,
"title": "Group",
"type": "integer"
},
"status": {
"default": "",
"title": "Status",
"type": "string"
},
"paths": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Paths",
"type": "array"
}
},
"title": "PathGroup",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for get_multipath_active_paths fixture.",
"properties": {
"device": {
"$ref": "#/$defs/MultipathDevice"
},
"active_paths": {
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Active Paths",
"type": "array"
}
},
"required": [
"device"
],
"title": "MultipathActivePathsContext",
"type": "object"
}
Fields:
-
device(MultipathDevice) -
active_paths(list[dict[str, Any]])
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
106 107 108 109 110 | |
get_multipath_active_paths()
¶
Yield the first multipath device that has active paths, or skip.
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | |
multipath_device(request, with_target_service)
¶
Create a multipath device via LIO loopback targets with fileio backstore.
Defaults to 4 paths, 100M. Parametrize with [{'num_paths': 2, 'size': '500M'}].
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 | |
with_multipath_disabled()
¶
Fixture to temporarily disable multipath service.
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 | |
with_multipath_enabled()
¶
Fixture to temporarily enable multipath service.
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 | |
with_target_service()
¶
Ensure the target service is running, restoring original state on teardown.
Source code in sts_libs/src/sts/fixtures/multipath_fixtures.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 | |
Logical Volume Management¶
sts.fixtures.lvm_fixtures
¶
LVM test fixtures.
Note
dmpd fixtures live in dmpd_fixtures.py and VDO fixtures in vdo_fixtures.py.
MountedThinAndRegularVolumeContext
pydantic-model
¶
Bases: StsBaseModel
ThinAndRegularVolumeContext plus both volumes formatted and mounted.
Show JSON schema:
{
"$defs": {
"Directory": {
"additionalProperties": false,
"description": "Directory wrapper with optional auto-creation.\n\nAttributes:\n create: If True, create the directory (with parents) on construction.",
"properties": {
"path": {
"format": "path",
"title": "Path",
"type": "string"
},
"create": {
"default": false,
"title": "Create",
"type": "boolean"
},
"mode": {
"default": 493,
"title": "Mode",
"type": "integer"
}
},
"title": "Directory",
"type": "object"
},
"LVReport": {
"description": "Parsed LV data from 'lvs -o lv_all,seg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one logical volume's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').\nAll fields match lvs JSON key names and retain str | None typing,\nexcept for a handful of numeric fields (see below) that are coerced.",
"properties": {
"lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Uuid"
},
"lv_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Name"
},
"lv_full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Name"
},
"lv_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Path"
},
"lv_dm_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Dm Path"
},
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"lv_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Size"
},
"lv_metadata_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Metadata Size"
},
"seg_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Count"
},
"lv_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Layout"
},
"lv_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Role"
},
"lv_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Attr"
},
"lv_active": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active"
},
"lv_active_locally": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Locally"
},
"lv_active_remotely": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Remotely"
},
"lv_active_exclusively": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Exclusively"
},
"lv_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Permissions"
},
"lv_suspended": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Suspended"
},
"lv_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Major"
},
"lv_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Minor"
},
"lv_kernel_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Major"
},
"lv_kernel_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Minor"
},
"lv_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Read Ahead"
},
"lv_kernel_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Read Ahead"
},
"pool_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv"
},
"pool_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv Uuid"
},
"data_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv"
},
"data_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv Uuid"
},
"metadata_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv"
},
"metadata_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv Uuid"
},
"data_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Percent"
},
"metadata_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Percent"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"origin_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Uuid"
},
"origin_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Size"
},
"snap_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Percent"
},
"raid_mismatch_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Mismatch Count"
},
"raid_sync_action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Sync Action"
},
"raid_write_behind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Write Behind"
},
"raid_min_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Min Recovery Rate"
},
"raid_max_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Max Recovery Rate"
},
"cache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Total Blocks"
},
"cache_used_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Used Blocks"
},
"cache_dirty_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dirty Blocks"
},
"cache_read_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Hits"
},
"cache_read_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Misses"
},
"cache_write_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Hits"
},
"cache_write_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Misses"
},
"kernel_cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Settings"
},
"kernel_cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Policy"
},
"vdo_operating_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Operating Mode"
},
"vdo_compression_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression State"
},
"vdo_index_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index State"
},
"vdo_used_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Used Size"
},
"vdo_saving_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Saving Percent"
},
"writecache_block_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Block Size"
},
"writecache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Total Blocks"
},
"writecache_free_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Free Blocks"
},
"writecache_writeback_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Writeback Blocks"
},
"writecache_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Error"
},
"lv_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Policy"
},
"lv_allocation_locked": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Locked"
},
"lv_autoactivation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Autoactivation"
},
"lv_when_full": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv When Full"
},
"lv_skip_activation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Skip Activation"
},
"lv_fixed_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Fixed Minor"
},
"lv_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time"
},
"lv_time_removed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time Removed"
},
"lv_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Host"
},
"lv_health_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Health Status"
},
"lv_check_needed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Check Needed"
},
"lv_merge_failed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merge Failed"
},
"lv_snapshot_invalid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Snapshot Invalid"
},
"lv_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Tags"
},
"lv_profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Profile"
},
"lv_lockargs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Lockargs"
},
"lv_modules": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Modules"
},
"lv_historical": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Historical"
},
"kernel_discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Discards"
},
"copy_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Copy Percent"
},
"sync_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sync Percent"
},
"lv_live_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Live Table"
},
"lv_inactive_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Inactive Table"
},
"lv_device_open": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Device Open"
},
"lv_parent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Parent"
},
"lv_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Ancestors"
},
"lv_full_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Ancestors"
},
"lv_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Descendants"
},
"lv_full_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Descendants"
},
"lv_converting": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Converting"
},
"lv_merging": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merging"
},
"move_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv"
},
"move_pv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv Uuid"
},
"convert_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv"
},
"convert_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv Uuid"
},
"mirror_log": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log"
},
"mirror_log_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log Uuid"
},
"lv_initial_image_sync": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Initial Image Sync"
},
"lv_image_synced": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Image Synced"
},
"raidintegritymode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegritymode"
},
"raidintegrityblocksize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegrityblocksize"
},
"integritymismatches": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integritymismatches"
},
"kernel_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Metadata Format"
},
"segtype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Segtype"
},
"stripes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripes"
},
"data_stripes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Stripes"
},
"stripe_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripe Size"
},
"region_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Region Size"
},
"chunk_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chunk Size"
},
"seg_start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start"
},
"seg_start_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start Pe"
},
"seg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size"
},
"seg_size_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size Pe"
},
"seg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Tags"
},
"seg_pe_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Pe Ranges"
},
"seg_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Le Ranges"
},
"seg_metadata_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Metadata Le Ranges"
},
"devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Devices"
},
"metadata_devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Devices"
},
"seg_monitor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Monitor"
},
"reshape_len": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len"
},
"reshape_len_le": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len Le"
},
"data_copies": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Copies"
},
"data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Offset"
},
"new_data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "New Data Offset"
},
"parity_chunks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parity Chunks"
},
"thin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Count"
},
"discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Discards"
},
"cache_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Metadata Format"
},
"cache_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Mode"
},
"zero": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Zero"
},
"transaction_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Transaction Id"
},
"thin_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Id"
},
"cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Policy"
},
"cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Settings"
},
"integrity_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integrity Settings"
},
"vdo_compression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression"
},
"vdo_deduplication": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Deduplication"
},
"vdo_minimum_io_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Minimum Io Size"
},
"vdo_block_map_cache_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Cache Size"
},
"vdo_block_map_era_length": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Era Length"
},
"vdo_use_sparse_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Sparse Index"
},
"vdo_index_memory_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index Memory Size"
},
"vdo_slab_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Slab Size"
},
"vdo_ack_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Ack Threads"
},
"vdo_bio_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Threads"
},
"vdo_bio_rotation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Rotation"
},
"vdo_cpu_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Cpu Threads"
},
"vdo_hash_zone_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Hash Zone Threads"
},
"vdo_logical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Logical Threads"
},
"vdo_physical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Physical Threads"
},
"vdo_max_discard": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Max Discard"
},
"vdo_header_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Header Size"
},
"vdo_use_metadata_hints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Metadata Hints"
},
"vdo_write_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Write Policy"
}
},
"title": "LVReport",
"type": "object"
},
"LogicalVolume": {
"additionalProperties": false,
"description": "Logical Volume device.\n\nExample:\n ```python\n lv = LogicalVolume(name='lv0', vg='vg0')\n lv.create(size='100M').assert_ok()\n print(lv.report.lv_size)\n ```",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "LogicalVolume",
"type": "object"
},
"ThinAndRegularVolumeContext": {
"additionalProperties": false,
"description": "State for a thin volume and a regular volume created side-by-side (perf comparison).",
"properties": {
"vg": {
"$ref": "#/$defs/VolumeGroup"
},
"pool": {
"$ref": "#/$defs/ThinPool"
},
"thin_device": {
"title": "Thin Device",
"type": "string"
},
"regular_lv": {
"$ref": "#/$defs/LogicalVolume"
},
"regular_device": {
"title": "Regular Device",
"type": "string"
}
},
"required": [
"vg",
"pool",
"thin_device",
"regular_lv",
"regular_device"
],
"title": "ThinAndRegularVolumeContext",
"type": "object"
},
"ThinPool": {
"additionalProperties": false,
"description": "Thin Pool logical volume.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
},
"thin_volumes": {
"items": {
"$ref": "#/$defs/LogicalVolume"
},
"title": "Thin Volumes",
"type": "array"
},
"tdata": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
},
"tmeta": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ThinPool",
"type": "object"
},
"VGReport": {
"description": "Parsed VG data from 'vgs -o vg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one volume group's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').",
"properties": {
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"vg_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Uuid"
},
"vg_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Fmt"
},
"vg_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Attr"
},
"vg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Size"
},
"vg_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free"
},
"vg_extent_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Size"
},
"vg_extent_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Count"
},
"vg_free_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free Count"
},
"pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pv Count"
},
"lv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Count"
},
"snap_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Count"
},
"vg_seqno": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Seqno"
},
"vg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Tags"
},
"vg_mda_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Count"
},
"vg_mda_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Free"
},
"max_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Lv"
},
"max_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Pv"
},
"vg_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Permissions"
},
"vg_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Allocation Policy"
},
"vg_clustered": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Clustered"
},
"vg_exported": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Exported"
},
"vg_partial": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Partial"
},
"vg_missing_pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Missing Pv Count"
}
},
"title": "VGReport",
"type": "object"
},
"VolumeGroup": {
"additionalProperties": false,
"description": "Volume Group device.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"pvs": {
"items": {
"type": "string"
},
"title": "Pvs",
"type": "array"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/VGReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "VolumeGroup",
"type": "object"
}
},
"additionalProperties": false,
"description": "ThinAndRegularVolumeContext plus both volumes formatted and mounted.",
"properties": {
"base": {
"$ref": "#/$defs/ThinAndRegularVolumeContext"
},
"thin_lv_mnt": {
"$ref": "#/$defs/Directory"
},
"regular_lv_mnt": {
"$ref": "#/$defs/Directory"
},
"filesystem": {
"title": "Filesystem",
"type": "string"
}
},
"required": [
"base",
"thin_lv_mnt",
"regular_lv_mnt",
"filesystem"
],
"title": "MountedThinAndRegularVolumeContext",
"type": "object"
}
Fields:
-
base(ThinAndRegularVolumeContext) -
thin_lv_mnt(Directory) -
regular_lv_mnt(Directory) -
filesystem(str)
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
67 68 69 70 71 72 73 | |
TempMountContext
pydantic-model
¶
Bases: StsBaseModel
State for temp_mount_fixture.
Show JSON schema:
{
"$defs": {
"Directory": {
"additionalProperties": false,
"description": "Directory wrapper with optional auto-creation.\n\nAttributes:\n create: If True, create the directory (with parents) on construction.",
"properties": {
"path": {
"format": "path",
"title": "Path",
"type": "string"
},
"create": {
"default": false,
"title": "Create",
"type": "boolean"
},
"mode": {
"default": 493,
"title": "Mode",
"type": "integer"
}
},
"title": "Directory",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for temp_mount_fixture.",
"properties": {
"mount_point": {
"format": "path",
"title": "Mount Point",
"type": "string"
},
"mount_dir": {
"$ref": "#/$defs/Directory"
},
"temp_files": {
"items": {
"format": "path",
"type": "string"
},
"title": "Temp Files",
"type": "array"
}
},
"required": [
"mount_point",
"mount_dir"
],
"title": "TempMountContext",
"type": "object"
}
Fields:
-
mount_point(Path) -
mount_dir(Directory) -
temp_files(list[Path])
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
647 648 649 650 651 652 | |
ThinAndRegularVolumeContext
pydantic-model
¶
Bases: StsBaseModel
State for a thin volume and a regular volume created side-by-side (perf comparison).
Show JSON schema:
{
"$defs": {
"LVReport": {
"description": "Parsed LV data from 'lvs -o lv_all,seg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one logical volume's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').\nAll fields match lvs JSON key names and retain str | None typing,\nexcept for a handful of numeric fields (see below) that are coerced.",
"properties": {
"lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Uuid"
},
"lv_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Name"
},
"lv_full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Name"
},
"lv_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Path"
},
"lv_dm_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Dm Path"
},
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"lv_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Size"
},
"lv_metadata_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Metadata Size"
},
"seg_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Count"
},
"lv_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Layout"
},
"lv_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Role"
},
"lv_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Attr"
},
"lv_active": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active"
},
"lv_active_locally": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Locally"
},
"lv_active_remotely": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Remotely"
},
"lv_active_exclusively": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Exclusively"
},
"lv_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Permissions"
},
"lv_suspended": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Suspended"
},
"lv_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Major"
},
"lv_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Minor"
},
"lv_kernel_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Major"
},
"lv_kernel_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Minor"
},
"lv_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Read Ahead"
},
"lv_kernel_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Read Ahead"
},
"pool_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv"
},
"pool_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv Uuid"
},
"data_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv"
},
"data_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv Uuid"
},
"metadata_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv"
},
"metadata_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv Uuid"
},
"data_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Percent"
},
"metadata_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Percent"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"origin_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Uuid"
},
"origin_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Size"
},
"snap_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Percent"
},
"raid_mismatch_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Mismatch Count"
},
"raid_sync_action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Sync Action"
},
"raid_write_behind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Write Behind"
},
"raid_min_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Min Recovery Rate"
},
"raid_max_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Max Recovery Rate"
},
"cache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Total Blocks"
},
"cache_used_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Used Blocks"
},
"cache_dirty_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dirty Blocks"
},
"cache_read_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Hits"
},
"cache_read_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Misses"
},
"cache_write_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Hits"
},
"cache_write_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Misses"
},
"kernel_cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Settings"
},
"kernel_cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Policy"
},
"vdo_operating_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Operating Mode"
},
"vdo_compression_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression State"
},
"vdo_index_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index State"
},
"vdo_used_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Used Size"
},
"vdo_saving_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Saving Percent"
},
"writecache_block_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Block Size"
},
"writecache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Total Blocks"
},
"writecache_free_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Free Blocks"
},
"writecache_writeback_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Writeback Blocks"
},
"writecache_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Error"
},
"lv_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Policy"
},
"lv_allocation_locked": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Locked"
},
"lv_autoactivation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Autoactivation"
},
"lv_when_full": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv When Full"
},
"lv_skip_activation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Skip Activation"
},
"lv_fixed_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Fixed Minor"
},
"lv_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time"
},
"lv_time_removed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time Removed"
},
"lv_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Host"
},
"lv_health_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Health Status"
},
"lv_check_needed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Check Needed"
},
"lv_merge_failed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merge Failed"
},
"lv_snapshot_invalid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Snapshot Invalid"
},
"lv_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Tags"
},
"lv_profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Profile"
},
"lv_lockargs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Lockargs"
},
"lv_modules": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Modules"
},
"lv_historical": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Historical"
},
"kernel_discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Discards"
},
"copy_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Copy Percent"
},
"sync_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sync Percent"
},
"lv_live_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Live Table"
},
"lv_inactive_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Inactive Table"
},
"lv_device_open": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Device Open"
},
"lv_parent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Parent"
},
"lv_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Ancestors"
},
"lv_full_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Ancestors"
},
"lv_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Descendants"
},
"lv_full_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Descendants"
},
"lv_converting": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Converting"
},
"lv_merging": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merging"
},
"move_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv"
},
"move_pv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv Uuid"
},
"convert_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv"
},
"convert_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv Uuid"
},
"mirror_log": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log"
},
"mirror_log_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log Uuid"
},
"lv_initial_image_sync": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Initial Image Sync"
},
"lv_image_synced": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Image Synced"
},
"raidintegritymode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegritymode"
},
"raidintegrityblocksize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegrityblocksize"
},
"integritymismatches": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integritymismatches"
},
"kernel_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Metadata Format"
},
"segtype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Segtype"
},
"stripes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripes"
},
"data_stripes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Stripes"
},
"stripe_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripe Size"
},
"region_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Region Size"
},
"chunk_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chunk Size"
},
"seg_start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start"
},
"seg_start_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start Pe"
},
"seg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size"
},
"seg_size_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size Pe"
},
"seg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Tags"
},
"seg_pe_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Pe Ranges"
},
"seg_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Le Ranges"
},
"seg_metadata_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Metadata Le Ranges"
},
"devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Devices"
},
"metadata_devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Devices"
},
"seg_monitor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Monitor"
},
"reshape_len": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len"
},
"reshape_len_le": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len Le"
},
"data_copies": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Copies"
},
"data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Offset"
},
"new_data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "New Data Offset"
},
"parity_chunks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parity Chunks"
},
"thin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Count"
},
"discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Discards"
},
"cache_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Metadata Format"
},
"cache_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Mode"
},
"zero": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Zero"
},
"transaction_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Transaction Id"
},
"thin_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Id"
},
"cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Policy"
},
"cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Settings"
},
"integrity_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integrity Settings"
},
"vdo_compression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression"
},
"vdo_deduplication": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Deduplication"
},
"vdo_minimum_io_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Minimum Io Size"
},
"vdo_block_map_cache_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Cache Size"
},
"vdo_block_map_era_length": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Era Length"
},
"vdo_use_sparse_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Sparse Index"
},
"vdo_index_memory_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index Memory Size"
},
"vdo_slab_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Slab Size"
},
"vdo_ack_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Ack Threads"
},
"vdo_bio_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Threads"
},
"vdo_bio_rotation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Rotation"
},
"vdo_cpu_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Cpu Threads"
},
"vdo_hash_zone_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Hash Zone Threads"
},
"vdo_logical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Logical Threads"
},
"vdo_physical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Physical Threads"
},
"vdo_max_discard": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Max Discard"
},
"vdo_header_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Header Size"
},
"vdo_use_metadata_hints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Metadata Hints"
},
"vdo_write_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Write Policy"
}
},
"title": "LVReport",
"type": "object"
},
"LogicalVolume": {
"additionalProperties": false,
"description": "Logical Volume device.\n\nExample:\n ```python\n lv = LogicalVolume(name='lv0', vg='vg0')\n lv.create(size='100M').assert_ok()\n print(lv.report.lv_size)\n ```",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "LogicalVolume",
"type": "object"
},
"ThinPool": {
"additionalProperties": false,
"description": "Thin Pool logical volume.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
},
"thin_volumes": {
"items": {
"$ref": "#/$defs/LogicalVolume"
},
"title": "Thin Volumes",
"type": "array"
},
"tdata": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
},
"tmeta": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ThinPool",
"type": "object"
},
"VGReport": {
"description": "Parsed VG data from 'vgs -o vg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one volume group's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').",
"properties": {
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"vg_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Uuid"
},
"vg_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Fmt"
},
"vg_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Attr"
},
"vg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Size"
},
"vg_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free"
},
"vg_extent_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Size"
},
"vg_extent_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Count"
},
"vg_free_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free Count"
},
"pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pv Count"
},
"lv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Count"
},
"snap_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Count"
},
"vg_seqno": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Seqno"
},
"vg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Tags"
},
"vg_mda_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Count"
},
"vg_mda_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Free"
},
"max_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Lv"
},
"max_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Pv"
},
"vg_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Permissions"
},
"vg_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Allocation Policy"
},
"vg_clustered": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Clustered"
},
"vg_exported": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Exported"
},
"vg_partial": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Partial"
},
"vg_missing_pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Missing Pv Count"
}
},
"title": "VGReport",
"type": "object"
},
"VolumeGroup": {
"additionalProperties": false,
"description": "Volume Group device.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"pvs": {
"items": {
"type": "string"
},
"title": "Pvs",
"type": "array"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/VGReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "VolumeGroup",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a thin volume and a regular volume created side-by-side (perf comparison).",
"properties": {
"vg": {
"$ref": "#/$defs/VolumeGroup"
},
"pool": {
"$ref": "#/$defs/ThinPool"
},
"thin_device": {
"title": "Thin Device",
"type": "string"
},
"regular_lv": {
"$ref": "#/$defs/LogicalVolume"
},
"regular_device": {
"title": "Regular Device",
"type": "string"
}
},
"required": [
"vg",
"pool",
"thin_device",
"regular_lv",
"regular_device"
],
"title": "ThinAndRegularVolumeContext",
"type": "object"
}
Fields:
-
vg(VolumeGroup) -
pool(ThinPool) -
thin_device(str) -
regular_lv(LogicalVolume) -
regular_device(str)
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
57 58 59 60 61 62 63 64 | |
ThinPoolVolumeContext
pydantic-model
¶
Bases: StsBaseModel
State for a thin pool with one thin volume created in it.
Show JSON schema:
{
"$defs": {
"LVReport": {
"description": "Parsed LV data from 'lvs -o lv_all,seg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one logical volume's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').\nAll fields match lvs JSON key names and retain str | None typing,\nexcept for a handful of numeric fields (see below) that are coerced.",
"properties": {
"lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Uuid"
},
"lv_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Name"
},
"lv_full_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Name"
},
"lv_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Path"
},
"lv_dm_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Dm Path"
},
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"lv_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Size"
},
"lv_metadata_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Metadata Size"
},
"seg_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Count"
},
"lv_layout": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Layout"
},
"lv_role": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Role"
},
"lv_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Attr"
},
"lv_active": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active"
},
"lv_active_locally": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Locally"
},
"lv_active_remotely": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Remotely"
},
"lv_active_exclusively": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Active Exclusively"
},
"lv_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Permissions"
},
"lv_suspended": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Suspended"
},
"lv_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Major"
},
"lv_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Minor"
},
"lv_kernel_major": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Major"
},
"lv_kernel_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Minor"
},
"lv_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Read Ahead"
},
"lv_kernel_read_ahead": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Kernel Read Ahead"
},
"pool_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv"
},
"pool_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Lv Uuid"
},
"data_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv"
},
"data_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Lv Uuid"
},
"metadata_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv"
},
"metadata_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Lv Uuid"
},
"data_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Percent"
},
"metadata_percent": {
"anyOf": [
{
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Percent"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"origin_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Uuid"
},
"origin_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin Size"
},
"snap_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Percent"
},
"raid_mismatch_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Mismatch Count"
},
"raid_sync_action": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Sync Action"
},
"raid_write_behind": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Write Behind"
},
"raid_min_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Min Recovery Rate"
},
"raid_max_recovery_rate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raid Max Recovery Rate"
},
"cache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Total Blocks"
},
"cache_used_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Used Blocks"
},
"cache_dirty_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Dirty Blocks"
},
"cache_read_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Hits"
},
"cache_read_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Read Misses"
},
"cache_write_hits": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Hits"
},
"cache_write_misses": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Write Misses"
},
"kernel_cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Settings"
},
"kernel_cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Cache Policy"
},
"vdo_operating_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Operating Mode"
},
"vdo_compression_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression State"
},
"vdo_index_state": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index State"
},
"vdo_used_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Used Size"
},
"vdo_saving_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Saving Percent"
},
"writecache_block_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Block Size"
},
"writecache_total_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Total Blocks"
},
"writecache_free_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Free Blocks"
},
"writecache_writeback_blocks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Writeback Blocks"
},
"writecache_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Writecache Error"
},
"lv_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Policy"
},
"lv_allocation_locked": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Allocation Locked"
},
"lv_autoactivation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Autoactivation"
},
"lv_when_full": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv When Full"
},
"lv_skip_activation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Skip Activation"
},
"lv_fixed_minor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Fixed Minor"
},
"lv_time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time"
},
"lv_time_removed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Time Removed"
},
"lv_host": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Host"
},
"lv_health_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Health Status"
},
"lv_check_needed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Check Needed"
},
"lv_merge_failed": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merge Failed"
},
"lv_snapshot_invalid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Snapshot Invalid"
},
"lv_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Tags"
},
"lv_profile": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Profile"
},
"lv_lockargs": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Lockargs"
},
"lv_modules": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Modules"
},
"lv_historical": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Historical"
},
"kernel_discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Discards"
},
"copy_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Copy Percent"
},
"sync_percent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sync Percent"
},
"lv_live_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Live Table"
},
"lv_inactive_table": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Inactive Table"
},
"lv_device_open": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Device Open"
},
"lv_parent": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Parent"
},
"lv_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Ancestors"
},
"lv_full_ancestors": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Ancestors"
},
"lv_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Descendants"
},
"lv_full_descendants": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Full Descendants"
},
"lv_converting": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Converting"
},
"lv_merging": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Merging"
},
"move_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv"
},
"move_pv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Move Pv Uuid"
},
"convert_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv"
},
"convert_lv_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Convert Lv Uuid"
},
"mirror_log": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log"
},
"mirror_log_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mirror Log Uuid"
},
"lv_initial_image_sync": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Initial Image Sync"
},
"lv_image_synced": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Image Synced"
},
"raidintegritymode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegritymode"
},
"raidintegrityblocksize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Raidintegrityblocksize"
},
"integritymismatches": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integritymismatches"
},
"kernel_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Kernel Metadata Format"
},
"segtype": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Segtype"
},
"stripes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripes"
},
"data_stripes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Stripes"
},
"stripe_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Stripe Size"
},
"region_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Region Size"
},
"chunk_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Chunk Size"
},
"seg_start": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start"
},
"seg_start_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Start Pe"
},
"seg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size"
},
"seg_size_pe": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Size Pe"
},
"seg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Tags"
},
"seg_pe_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Pe Ranges"
},
"seg_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Le Ranges"
},
"seg_metadata_le_ranges": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Metadata Le Ranges"
},
"devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Devices"
},
"metadata_devices": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata Devices"
},
"seg_monitor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Seg Monitor"
},
"reshape_len": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len"
},
"reshape_len_le": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Reshape Len Le"
},
"data_copies": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Copies"
},
"data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Data Offset"
},
"new_data_offset": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "New Data Offset"
},
"parity_chunks": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parity Chunks"
},
"thin_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Count"
},
"discards": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Discards"
},
"cache_metadata_format": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Metadata Format"
},
"cache_mode": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Mode"
},
"zero": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Zero"
},
"transaction_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Transaction Id"
},
"thin_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thin Id"
},
"cache_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Policy"
},
"cache_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Cache Settings"
},
"integrity_settings": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Integrity Settings"
},
"vdo_compression": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Compression"
},
"vdo_deduplication": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Deduplication"
},
"vdo_minimum_io_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Minimum Io Size"
},
"vdo_block_map_cache_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Cache Size"
},
"vdo_block_map_era_length": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Block Map Era Length"
},
"vdo_use_sparse_index": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Sparse Index"
},
"vdo_index_memory_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Index Memory Size"
},
"vdo_slab_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Slab Size"
},
"vdo_ack_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Ack Threads"
},
"vdo_bio_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Threads"
},
"vdo_bio_rotation": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Bio Rotation"
},
"vdo_cpu_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Cpu Threads"
},
"vdo_hash_zone_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Hash Zone Threads"
},
"vdo_logical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Logical Threads"
},
"vdo_physical_threads": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Physical Threads"
},
"vdo_max_discard": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Max Discard"
},
"vdo_header_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Header Size"
},
"vdo_use_metadata_hints": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Use Metadata Hints"
},
"vdo_write_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vdo Write Policy"
}
},
"title": "LVReport",
"type": "object"
},
"LogicalVolume": {
"additionalProperties": false,
"description": "Logical Volume device.\n\nExample:\n ```python\n lv = LogicalVolume(name='lv0', vg='vg0')\n lv.create(size='100M').assert_ok()\n print(lv.report.lv_size)\n ```",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "LogicalVolume",
"type": "object"
},
"ThinPool": {
"additionalProperties": false,
"description": "Thin Pool logical volume.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"vg": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/LVReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
},
"thin_volumes": {
"items": {
"$ref": "#/$defs/LogicalVolume"
},
"title": "Thin Volumes",
"type": "array"
},
"tdata": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
},
"tmeta": {
"anyOf": [
{
"$ref": "#/$defs/LogicalVolume"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "ThinPool",
"type": "object"
},
"VGReport": {
"description": "Parsed VG data from 'vgs -o vg_all --reportformat json'.\n\nFrozen (immutable) snapshot of one volume group's report fields.\nUnknown JSON keys are silently ignored (extra='ignore').",
"properties": {
"vg_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Name"
},
"vg_uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Uuid"
},
"vg_fmt": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Fmt"
},
"vg_attr": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Attr"
},
"vg_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Size"
},
"vg_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free"
},
"vg_extent_size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Size"
},
"vg_extent_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Extent Count"
},
"vg_free_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Free Count"
},
"pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pv Count"
},
"lv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lv Count"
},
"snap_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snap Count"
},
"vg_seqno": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Seqno"
},
"vg_tags": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Tags"
},
"vg_mda_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Count"
},
"vg_mda_free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Mda Free"
},
"max_lv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Lv"
},
"max_pv": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Max Pv"
},
"vg_permissions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Permissions"
},
"vg_allocation_policy": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Allocation Policy"
},
"vg_clustered": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Clustered"
},
"vg_exported": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Exported"
},
"vg_partial": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Partial"
},
"vg_missing_pv_count": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Vg Missing Pv Count"
}
},
"title": "VGReport",
"type": "object"
},
"VolumeGroup": {
"additionalProperties": false,
"description": "Volume Group device.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"format": "path",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"model": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Model"
},
"pvs": {
"items": {
"type": "string"
},
"title": "Pvs",
"type": "array"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/VGReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "VolumeGroup",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a thin pool with one thin volume created in it.",
"properties": {
"vg": {
"$ref": "#/$defs/VolumeGroup"
},
"pool": {
"$ref": "#/$defs/ThinPool"
},
"thin_lv": {
"$ref": "#/$defs/LogicalVolume"
}
},
"required": [
"vg",
"pool",
"thin_lv"
],
"title": "ThinPoolVolumeContext",
"type": "object"
}
Fields:
-
vg(VolumeGroup) -
pool(ThinPool) -
thin_lv(LogicalVolume)
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
49 50 51 52 53 54 | |
lv_fixture(_lvm_test, setup_vg, request)
¶
Create a COW or thin LV with automatic cleanup.
Defaults to COW at 25%vg. Parametrize with {'lv_type': 'thin'} for thin volumes.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 | |
lvm2_version()
¶
Return the installed LVM2 version as VersionInfo (or 0.0.0 if not found).
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 | |
lvm_config()
¶
Return an LvmConfig instance for reading/modifying lvm.conf settings.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
508 509 510 511 | |
lvm_config_restore(lvm_config)
¶
Yield LvmConfig, restoring thin pool configuration values on teardown.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 | |
mount_lv_fixture(_lvm_test, setup_vg, request)
¶
Create an LV, format it, and mount it, with automatic cleanup.
Defaults to COW, xfs. Parametrize lv_type, fs_type, etc. via indirect.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 | |
mount_lv_ramdisk_fixture(_lvm_test, setup_ramdisk_vg, request)
¶
Create a mounted LV on a ramdisk-backed VG for fast I/O testing.
Defaults to thin, xfs, 400M virtualsize. Smaller sizes to conserve memory.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 | |
mounted_thin_and_regular_lvs(thin_and_regular_lvs)
¶
Format and mount both thin and regular LVs with ext4 for I/O comparison.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 | |
multiple_mntpoints_fixture(_lvm_test, setup_vg, request)
¶
Create multiple mounted LVs. Defaults to 6 COW volumes with xfs.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
473 474 475 476 477 478 479 480 481 482 483 | |
multiple_mntpoints_ramdisk_fixture(_lvm_test, setup_ramdisk_vg, request)
¶
Create multiple mounted LVs on a ramdisk-backed VG. Defaults to 2 thin volumes.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | |
multiple_thin_pools(setup_loopdev_vg)
¶
Create 3 thin pools, each with one thin volume, for concurrent testing.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 | |
regular_lv_fixture(setup_loopdev_vg, request)
¶
Create a regular (non-thin) LV (default 50M) with automatic cleanup.
Set skip_cleanup=True when the LV will be converted to a thin pool
and cleanup is handled separately.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 | |
setup_loopdev_vg(_lvm_test, loop_devices)
¶
Create a VG from loop_devices, cleaned up on teardown.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
149 150 151 152 153 154 155 156 157 158 159 | |
setup_ramdisk_vg(_lvm_test, ramdisk_loop_devices)
¶
Create a VG from ramdisk-backed loop devices for fast I/O testing.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
162 163 164 165 166 167 168 169 170 171 | |
setup_vg(_lvm_test, ensure_minimum_devices_with_same_block_sizes)
¶
Create a VG from ensure_minimum_devices_with_same_block_sizes, cleaned up on teardown.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
134 135 136 137 138 139 140 141 142 143 144 145 146 | |
temp_mount_fixture(request)
¶
Create a temporary mount point directory with automatic cleanup.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 | |
thin_and_regular_lvs(setup_loopdev_vg)
¶
Create a thin volume (900M) and a regular LV (900M) side-by-side for comparison.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 | |
thin_pool_with_volume(setup_loopdev_vg)
¶
Create a 100M thin pool with one 50M thin volume.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 | |
thinpool_fixture(setup_loopdev_vg, request)
¶
Create a thin pool (default 500M) with automatic cleanup of all thin volumes.
Source code in sts_libs/src/sts/fixtures/lvm_fixtures.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 | |
Network Storage¶
iSCSI¶
sts.fixtures.iscsi_fixtures
¶
iSCSI test fixtures.
generate_test_iqns(test_name)
¶
Generate (base_iqn, target_iqn, initiator_iqn) from test name.
Source code in sts_libs/src/sts/fixtures/iscsi_fixtures.py
28 29 30 31 32 33 | |
get_test_device()
¶
Return a callable that finds test device paths (multipath first, then SCSI vendor).
Source code in sts_libs/src/sts/fixtures/iscsi_fixtures.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | |
iscsi_localhost_test(request, _iscsi_test)
¶
Set up and tear down a local iSCSI target environment. Yields target IQN.
Source code in sts_libs/src/sts/fixtures/iscsi_fixtures.py
53 54 55 56 57 58 59 60 61 62 63 64 65 66 | |
iscsi_target(request, iscsi_localhost_test)
¶
Create iSCSI target with optional LUNs, log in, yield IscsiNode, log out on exit.
Source code in sts_libs/src/sts/fixtures/iscsi_fixtures.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 | |
NVMe¶
sts.fixtures.nvme_fixtures
¶
NVMe test fixtures.
ensure_nvme_disks()
¶
Install nvme-cli and skip if no NVMe devices are present.
Source code in sts_libs/src/sts/fixtures/nvme_fixtures.py
12 13 14 15 16 17 18 19 20 21 | |
Fibre Channel¶
sts.fixtures.fc_fixtures
¶
FC test fixtures.
get_fc_device()
¶
Return the first online Fibre Channel device, or skip.
Source code in sts_libs/src/sts/fixtures/fc_fixtures.py
22 23 24 25 26 27 28 29 30 | |
get_fc_paths(get_multipath_active_paths)
¶
Return FC devices corresponding to active multipath paths.
Source code in sts_libs/src/sts/fixtures/fc_fixtures.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |
multipath_device_setup(get_multipath_active_paths, get_fc_paths)
¶
Return a verified multipath device with at least MIN_PATHS FC paths.
Source code in sts_libs/src/sts/fixtures/fc_fixtures.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |
SCSI Target¶
sts.fixtures.target_fixtures
¶
Target (targetcli/LIO) test fixtures for backstores, iSCSI targets, ACLs, and loopback devices.
backstore_block_setup(_target_test, request)
¶
Create a block backstore on a loop device. Requires name and size params.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |
backstore_fileio_setup(_target_test, request)
¶
Create a fileio backstore. Requires name and size params.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |
backstore_ramdisk_setup(_target_test, request)
¶
Create a ramdisk backstore. Requires name and size params.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 | |
configure_auth(request)
¶
Create an iSCSI target with CHAP authentication configured via parametrize.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 | |
iscsi_target_setup(_target_test, request)
¶
Create an iSCSI target with optional ACLs and LUNs via parametrize.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
191 192 193 194 195 196 197 198 199 200 201 | |
loopback_devices(request)
¶
Create loopback devices with a given block size.
Reads block_size and device_count from fixture params or test parametrize.
Defaults to 2 devices, 512-byte blocks.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 | |
ramdisk_loopback_devices(_target_test, request)
¶
Create ramdisk-backed loopback devices via targetcli for fast I/O testing.
Defaults to 1 device, 512 MB. Parametrize with [{'count': 2, 'size_mb': 256}].
Warning
Total device size should not exceed available RAM.
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 | |
target_setup(*, t_iqn=None, i_iqn=None, n_luns=0, back_size=None)
¶
Context manager that creates an iSCSI target with optional ACLs and LUNs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t_iqn
|
str | None
|
Target IQN |
None
|
i_iqn
|
str | None
|
Initiator IQN (creates ACL if set) |
None
|
n_luns
|
int
|
Number of LUNs to create |
0
|
back_size
|
int | None
|
Backstore size in bytes (required if n_luns > 0) |
None
|
Source code in sts_libs/src/sts/fixtures/target_fixtures.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |
Filesystem / Pool Managers¶
Stratis¶
sts.fixtures.stratis_fixtures
¶
Stratis test fixtures for pool, filesystem, encryption, and failure testing.
KeyContext
pydantic-model
¶
Bases: StsBaseModel
State for a registered test encryption key.
Show JSON schema:
{
"$defs": {
"Key": {
"additionalProperties": false,
"description": "Stratis encryption key management (kernel keyring).",
"properties": {
"config": {
"$ref": "#/$defs/StratisConfig"
}
},
"title": "Key",
"type": "object"
},
"StratisConfig": {
"additionalProperties": false,
"description": "Stratis configuration controlling global CLI options.",
"properties": {
"unhyphenated_uuids": {
"default": false,
"title": "Unhyphenated Uuids",
"type": "boolean"
}
},
"title": "StratisConfig",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a registered test encryption key.",
"properties": {
"key": {
"$ref": "#/$defs/Key"
},
"key_desc": {
"title": "Key Desc",
"type": "string"
}
},
"required": [
"key",
"key_desc"
],
"title": "KeyContext",
"type": "object"
}
Fields:
-
key(Key) -
key_desc(str)
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
46 47 48 49 50 | |
MountedFsContext
pydantic-model
¶
Bases: StsBaseModel
State for a pool with a filesystem mounted for I/O testing.
Show JSON schema:
{
"$defs": {
"BlockDevInfo": {
"description": "Block device information from stratis report.",
"properties": {
"path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Path"
},
"size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"in_use": {
"default": false,
"title": "In Use",
"type": "boolean"
},
"blksizes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Blksizes"
},
"clevis_config": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Clevis Config"
},
"clevis_pin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Clevis Pin"
},
"key_description": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Key Description"
}
},
"title": "BlockDevInfo",
"type": "object"
},
"BlockDevs": {
"description": "Block devices in a Stratis pool.\n\nPools have two storage tiers: ``datadevs`` for primary data storage and ``cachedevs`` for an\noptional fast cache layer (typically SSDs accelerating HDDs).",
"properties": {
"datadevs": {
"items": {
"$ref": "#/$defs/BlockDevInfo"
},
"title": "Datadevs",
"type": "array"
},
"cachedevs": {
"items": {
"$ref": "#/$defs/BlockDevInfo"
},
"title": "Cachedevs",
"type": "array"
}
},
"title": "BlockDevs",
"type": "object"
},
"EncryptionInfo": {
"additionalProperties": false,
"description": "Encryption metadata for a pool (key descriptions and Clevis bindings).\n\nUses `StsBaseModel` rather than `ReportModel`: `PoolReport` and `StratisPool`\nare mutable and reassign `self.encryption` wholesale (see\n`_parse_pool_interface`), which a frozen `ReportModel` would reject.\n\nv1 pools have at most one binding (singular ``KeyDescription``/``ClevisInfo``\nin the D-Bus interface); v2 pools support multiple (plural\n``KeyDescriptions``/``ClevisInfos``). Both are normalized to the plural\nfield names here \u2014 see `PoolReport._parse_pool_interface`.",
"properties": {
"key_descriptions": {
"default": null,
"title": "Key Descriptions"
},
"clevis_infos": {
"default": null,
"title": "Clevis Infos"
}
},
"title": "EncryptionInfo",
"type": "object"
},
"PoolReport": {
"additionalProperties": false,
"description": "Pool report data.\n\nMutable model that fetches and holds pool metadata from stratisd.\nCall ``refresh()`` after construction to populate from the system.",
"properties": {
"config": {
"$ref": "#/$defs/StratisConfig"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"blockdevs": {
"$ref": "#/$defs/BlockDevs"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"encryption": {
"$ref": "#/$defs/EncryptionInfo"
},
"encrypted": {
"default": false,
"title": "Encrypted",
"type": "boolean"
},
"last_reencrypted_timestamp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Reencrypted Timestamp"
},
"fs_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Fs Limit"
},
"available_actions": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Available Actions"
},
"filesystems": {
"items": {
"type": "string"
},
"title": "Filesystems",
"type": "array"
},
"raw_data": {
"additionalProperties": true,
"title": "Raw Data",
"type": "object"
},
"total_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Total Size"
},
"used_size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Used Size"
},
"object_path": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Object Path"
},
"prevent_update": {
"default": false,
"title": "Prevent Update",
"type": "boolean"
}
},
"title": "PoolReport",
"type": "object"
},
"StratisConfig": {
"additionalProperties": false,
"description": "Stratis configuration controlling global CLI options.",
"properties": {
"unhyphenated_uuids": {
"default": false,
"title": "Unhyphenated Uuids",
"type": "boolean"
}
},
"title": "StratisConfig",
"type": "object"
},
"StratisFilesystem": {
"additionalProperties": false,
"description": "Stratis filesystem representation.\n\nManages filesystems with thin provisioning, snapshots, and size\nmanagement. Call ``update_from_managed_objects()`` after construction\nto populate size/used/limit from stratisd.\n\nExample:\n ```python\n fs = StratisFilesystem(name='fs1', pool_name='pool1')\n fs.create()\n ```",
"properties": {
"config": {
"$ref": "#/$defs/StratisConfig"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"size_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size Limit"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"used": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Used"
}
},
"title": "StratisFilesystem",
"type": "object"
},
"StratisPool": {
"additionalProperties": false,
"description": "Stratis pool representation.\n\nManages Stratis pools including creation, encryption, and cache.\nCall ``refresh_report()`` after construction to populate report data.\n\nExample:\n ```python\n pool = StratisPool(name='pool1', blockdevs=['/dev/sda'])\n pool.create() # create() calls refresh_report() internally\n ```",
"properties": {
"config": {
"$ref": "#/$defs/StratisConfig"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"encryption": {
"$ref": "#/$defs/EncryptionInfo"
},
"blockdevs": {
"items": {
"type": "string"
},
"title": "Blockdevs",
"type": "array"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/PoolReport"
},
{
"type": "null"
}
],
"default": null
},
"prevent_report_updates": {
"default": false,
"title": "Prevent Report Updates",
"type": "boolean"
}
},
"title": "StratisPool",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a pool with a filesystem mounted for I/O testing.",
"properties": {
"pool": {
"$ref": "#/$defs/StratisPool"
},
"filesystem": {
"$ref": "#/$defs/StratisFilesystem"
},
"mount_point": {
"title": "Mount Point",
"type": "string"
}
},
"required": [
"pool",
"filesystem",
"mount_point"
],
"title": "MountedFsContext",
"type": "object"
}
Fields:
-
pool(StratisPool) -
filesystem(StratisFilesystem) -
mount_point(str)
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
38 39 40 41 42 43 | |
SnapshotContext
pydantic-model
¶
Bases: StsBaseModel
State for a filesystem with a snapshot.
Show JSON schema:
{
"$defs": {
"StratisConfig": {
"additionalProperties": false,
"description": "Stratis configuration controlling global CLI options.",
"properties": {
"unhyphenated_uuids": {
"default": false,
"title": "Unhyphenated Uuids",
"type": "boolean"
}
},
"title": "StratisConfig",
"type": "object"
},
"StratisFilesystem": {
"additionalProperties": false,
"description": "Stratis filesystem representation.\n\nManages filesystems with thin provisioning, snapshots, and size\nmanagement. Call ``update_from_managed_objects()`` after construction\nto populate size/used/limit from stratisd.\n\nExample:\n ```python\n fs = StratisFilesystem(name='fs1', pool_name='pool1')\n fs.create()\n ```",
"properties": {
"config": {
"$ref": "#/$defs/StratisConfig"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"pool_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Pool Name"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"size": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"size_limit": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Size Limit"
},
"origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"used": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Used"
}
},
"title": "StratisFilesystem",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a filesystem with a snapshot.",
"properties": {
"filesystem": {
"$ref": "#/$defs/StratisFilesystem"
},
"snapshot": {
"$ref": "#/$defs/StratisFilesystem"
}
},
"required": [
"filesystem",
"snapshot"
],
"title": "SnapshotContext",
"type": "object"
}
Fields:
-
filesystem(StratisFilesystem) -
snapshot(StratisFilesystem)
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
31 32 33 34 35 | |
setup_stratis_key()
¶
Register a Stratis encryption key, yielding its description. Cleaned up on teardown.
Configurable via STRATIS_KEY_DESC, STRATIS_KEY_PATH, and STRATIS_KEY env vars.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
stratis_clevis_test()
¶
Start a Tang server and yield {'thumbprint': ..., 'url': ...} for Clevis encryption.
Installs tang, curl, jose, jq. Stops Tang service on teardown.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
stratis_encrypted_pool(loop_devices, setup_stratis_key)
¶
Create a key-encrypted Stratis pool from loop devices.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 | |
stratis_extend_lvm(_lvm_test, loop_devices)
¶
Create a 70%vg LV on the 3rd and 4th loop devices for stratis extend-data testing.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | |
stratis_failing_pool(scsi_debug_devices)
¶
Create a Stratis pool on an SCSI debug device with failure injection enabled.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | |
stratis_filesystem(stratis_no_enc_pool)
¶
Create a test filesystem on a non-encrypted pool, destroyed on teardown.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
331 332 333 334 335 336 337 | |
stratis_filesystem_with_snapshot(stratis_filesystem)
¶
Create a snapshot of the stratis_filesystem, cleaned up on teardown.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
340 341 342 343 344 345 346 347 348 349 350 | |
stratis_inplace_key_desc_pool(loop_devices, setup_stratis_key)
¶
Create an unencrypted pool, then encrypt it in-place with keyring.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 | |
stratis_key_desc_pool(loop_devices, setup_stratis_key)
¶
Create a pool with keyring encryption.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
199 200 201 202 203 204 205 206 207 208 209 | |
stratis_mounted_fs(stratis_no_enc_pool)
¶
Create a filesystem on the non-encrypted pool and mount it at /mnt/sts-stratis-test-fs.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 | |
stratis_no_enc_pool(loop_devices)
¶
Create a pool without encryption.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
265 266 267 268 269 270 271 272 273 274 | |
stratis_tang_pool(loop_devices, stratis_clevis_test)
¶
Create a pool with Tang encryption.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 | |
stratis_test_key(tmp_path)
¶
Register a test encryption key, unset on teardown.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
376 377 378 379 380 381 382 383 384 385 386 387 | |
stratis_test_pool(loop_devices)
¶
Create a non-encrypted Stratis pool from loop devices.
Source code in sts_libs/src/sts/fixtures/stratis_fixtures.py
166 167 168 169 170 171 172 173 174 175 176 177 178 | |
VDO¶
sts.fixtures.vdo_fixtures
¶
VDO (Virtual Data Optimizer) test fixtures for module loading and lifecycle.
load_vdo_module(_lvm_test)
¶
Install VDO and load the appropriate kernel module (dm-vdo or kvdo).
Returns the module name. Uses dm-vdo for kernel 6.9+, kvdo for older kernels.
Source code in sts_libs/src/sts/fixtures/vdo_fixtures.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | |
Boom¶
sts.fixtures.boom_fixtures
¶
Boom (boom-boot) test fixtures.
default_boom_entry(profile_from_host)
¶
Yield a cloned BoomEntry from the default boot entry, deleted on teardown.
Source code in sts_libs/src/sts/fixtures/boom_fixtures.py
57 58 59 60 61 62 63 64 65 66 67 68 69 | |
default_host_profile(profile_from_host)
¶
Yield a BoomHost created from the profile_from_host fixture, deleted on teardown.
Source code in sts_libs/src/sts/fixtures/boom_fixtures.py
44 45 46 47 48 49 50 51 52 53 54 | |
profile_from_host()
¶
Yield a BoomProfile created from host data, deleted on teardown.
Source code in sts_libs/src/sts/fixtures/boom_fixtures.py
32 33 34 35 36 37 38 39 40 41 | |
Snapm¶
sts.fixtures.snapm_fixtures
¶
Snapm (Snapshot Manager) test fixtures.
SnapsetPairContext
pydantic-model
¶
Bases: StsBaseModel
State for a pair of snapsets created for diff testing.
Show JSON schema:
{
"$defs": {
"Snapset": {
"additionalProperties": false,
"description": "Snapset management.\n\nA Snapset is a collection of snapshots across multiple filesystems.",
"properties": {
"debugopts": {
"anyOf": [
{
"items": {
"type": "string"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Debugopts"
},
"verbose": {
"default": false,
"title": "Verbose",
"type": "boolean"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"uuid": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"report": {
"anyOf": [
{
"$ref": "#/$defs/SnapsetInfo"
},
{
"type": "null"
}
],
"default": null
}
},
"title": "Snapset",
"type": "object"
},
"SnapsetInfo": {
"description": "Snapset information parsed from ``snapm snapset show`` output.",
"properties": {
"SnapsetName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snapsetname"
},
"Sources": {
"items": {
"type": "string"
},
"title": "Sources",
"type": "array"
},
"MountPoints": {
"items": {
"type": "string"
},
"title": "Mountpoints",
"type": "array"
},
"Devices": {
"items": {
"type": "string"
},
"title": "Devices",
"type": "array"
},
"NrSnapshots": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Nrsnapshots"
},
"Timestamp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Timestamp"
},
"Time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Time"
},
"UUID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"Status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"Autoactivate": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Autoactivate"
},
"Bootable": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Bootable"
},
"BootEntries": {
"additionalProperties": {
"type": "string"
},
"title": "Bootentries",
"type": "object"
},
"Snapshots": {
"items": {
"$ref": "#/$defs/SnapshotInfo"
},
"title": "Snapshots",
"type": "array"
}
},
"title": "SnapsetInfo",
"type": "object"
},
"SnapshotInfo": {
"description": "Snapshot information parsed from ``snapm snapshot show`` output.",
"properties": {
"Name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
},
"SnapsetName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Snapsetname"
},
"Origin": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Origin"
},
"Timestamp": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Timestamp"
},
"Time": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Time"
},
"Source": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Source"
},
"MountPoint": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Mountpoint"
},
"Provider": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Provider"
},
"UUID": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Uuid"
},
"Status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Status"
},
"Size": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Size"
},
"Free": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Free"
},
"SizeBytes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Sizebytes"
},
"FreeBytes": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Freebytes"
},
"Autoactivate": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Autoactivate"
},
"DevicePath": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Devicepath"
}
},
"title": "SnapshotInfo",
"type": "object"
}
},
"additionalProperties": false,
"description": "State for a pair of snapsets created for diff testing.",
"properties": {
"snapset1": {
"$ref": "#/$defs/Snapset"
},
"snapset2": {
"$ref": "#/$defs/Snapset"
},
"mount_point": {
"title": "Mount Point",
"type": "string"
}
},
"required": [
"snapset1",
"snapset2",
"mount_point"
],
"title": "SnapsetPairContext",
"type": "object"
}
Fields:
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
34 35 36 37 38 39 | |
mounted_snapset(_snapm_test, mount_lv_fixture, request)
¶
Create a snapset, mount it, and clean up after the test.
Handles version checking, snapset creation, mounting (skips if mount is unsupported), and full cleanup (umount + delete).
The snapset name is derived from the test name so each test gets
a unique snapset. The mount root is at
/run/snapm/mounts/<snapset.name>.
Example
@LVM_THIN_FIXTURE
def test_exec(mounted_snapset):
snapset = mounted_snapset
result = snapset.exec_cmd('cat', '/etc/os-release')
assert result.succeeded
Yields:
| Name | Type | Description |
|---|---|---|
Snapset |
Snapset
|
A mounted snapset instance |
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
mounted_snapset_setup(_snapm_test, request)
¶
Create and mount a snapset, with automatic unmount and cleanup.
Skips if mount is not supported by the snapm version.
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | |
schedule_setup(_snapm_test, request)
¶
Create a snapm schedule with automatic cleanup.
Requires snapm >= 0.5.1. Parametrize sources or sources_fixture,
policy_type, calendarspec, and keep_* options via indirect.
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 | |
snapset_pair(_snapm_test, mount_lv_fixture, request)
¶
Create a pair of snapsets for diff testing with automatic cleanup.
This fixture creates two snapsets from the LVM mount point. Uses the test name to generate unique snapset names.
The mount_point field should be used as start_path in diff commands to limit comparison scope.
Example
@LVM_THIN_FIXTURE
def test_diff(snapset_pair):
ctx = snapset_pair
result = Snapset().diff(ctx.snapset1.name, ctx.snapset2.name, start_path=ctx.mount_point)
# Cleanup is automatic
Yields:
| Name | Type | Description |
|---|---|---|
SnapsetPairContext |
SnapsetPairContext
|
The two snapsets and the mount point path |
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 | |
snapset_pair_setup(_snapm_test, request)
¶
Create two snapsets from the same sources for diff testing.
Optionally writes a file change between creations (create_change=True, the default).
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 | |
snapset_pair_with_change(_snapm_test, mount_lv_fixture, request)
¶
Create a pair of snapsets with a file change between them.
Like snapset_pair, but writes a marker file before the first
snapset and modifies it before the second, guaranteeing that the
Difference Engine has real content changes to report.
Example
@LVM_THIN_FIXTURE
def test_diff_format(snapset_pair_with_change):
ctx = snapset_pair_with_change
result = Snapset().diff(
ctx.snapset1.name,
ctx.snapset2.name,
start_path=ctx.mount_point,
output_format='json',
)
Yields:
| Name | Type | Description |
|---|---|---|
SnapsetPairContext |
SnapsetPairContext
|
The two snapsets and the mount point path |
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
snapset_setup(_snapm_test, request)
¶
Create a snapm snapset with automatic unmount and cleanup on teardown.
Source code in sts_libs/src/sts/fixtures/snapm_fixtures.py
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | |
Hardware & Protocols¶
RDMA¶
sts.fixtures.rdma_fixtures
¶
RDMA test fixtures.
rdma_device()
¶
Return a factory function that creates an RdmaDevice by HCA ID.
Source code in sts_libs/src/sts/fixtures/rdma_fixtures.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
SG3 Utils¶
sts.fixtures.sg3_utils_fixtures
¶
sg3_utils test fixtures for scsi_debug devices and direct I/O management.
ScsiDebugContext
pydantic-model
¶
Bases: StsBaseModel
Container for scsi_debug device paths discovered via sg_map.
Show JSON schema:
{
"additionalProperties": false,
"description": "Container for scsi_debug device paths discovered via sg_map.",
"properties": {
"sg_device": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sg Device"
},
"sd_device": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Sd Device"
}
},
"title": "ScsiDebugContext",
"type": "object"
}
Fields:
-
sg_device(str | None) -
sd_device(str | None)
Source code in sts_libs/src/sts/fixtures/sg3_utils_fixtures.py
31 32 33 34 35 | |
allow_dio()
¶
Enable direct I/O via /proc/scsi/sg/allow_dio, restored on teardown.
Source code in sts_libs/src/sts/fixtures/sg3_utils_fixtures.py
76 77 78 79 80 81 82 83 84 | |
scsi_debug(request)
¶
Load scsi_debug and discover sg/sd device paths via sg_map.
Parametrize with [{'options': 'scsi_level=2'}] for custom module options.
Source code in sts_libs/src/sts/fixtures/sg3_utils_fixtures.py
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | |
scsi_debug_devices(request)
¶
Create multiple scsi_debug devices, settling udev before unload to avoid ModuleInUseError.
Source code in sts_libs/src/sts/fixtures/sg3_utils_fixtures.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 | |
System¶
Service Management¶
sts.fixtures.service_fixtures
¶
Service management fixtures for testing.
managed_service(request)
¶
Fixture that captures and restores service state.
This fixture must be used with indirect parametrization.
Example
@pytest.mark.parametrize('managed_service', ['sshd'], indirect=True)
def test_my_service(managed_service):
# Test code here
pass
Source code in sts_libs/src/sts/fixtures/service_fixtures.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 | |
Kernel Module Management¶
sts.fixtures.module_fixtures
¶
Fixtures related to kernel module management.
managed_module(request)
¶
Load a kernel module before the test and unload it after (if it was not loaded initially).
Parametrize with @pytest.mark.parametrize('managed_module', ['qedi'], indirect=True).
Source code in sts_libs/src/sts/fixtures/module_fixtures.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | |