From c26c417d7ab324c91161ac64918fe5240a44cc43 Mon Sep 17 00:00:00 2001 From: Evgeniy L Date: Wed, 17 Feb 2016 20:28:38 +0300 Subject: [PATCH] Add three disk test case with ceph --- .../fixtures/three_disks_ceph_example.yaml | 102 ++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml diff --git a/bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml b/bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml new file mode 100644 index 0000000..79aa5c7 --- /dev/null +++ b/bareon_dynamic_allocator/tests/fixtures/three_disks_ceph_example.yaml @@ -0,0 +1,102 @@ +name: Three disks ceph example + +dynamic_schema: + + - id: os + type: vg + contains: + - id: swap + - id: root + + - id: root + type: lv + size: 30 + + - id: swap + type: lv + size: | + yaql=$.ram * 2 + + - id: logs + type: vg + contains: + - id: log + + - id: log + type: lv + min_size: 10 + max_size: 20 + + - id: ceph + type: partitions + + - id: ceph-journal + type: partitions + max_size: 20 + best_with_disks: | + yaql=$.disks.where($.type = "ssd") + + +hw_info: + ram: 20 + disks: + - id: sda + type: hdd + size: 100 + + - id: sdb + type: hdd + size: 100 + + - id: sdc + type: ssd + size: 10 + +expected: + - disk_id: sda + size: 100 + spaces: + - space_id: root + size: 30 + - space_id: swap + size: 40 + - space_id: log + size: 20 + - space_id: ceph + size: 10 + - space_id: ceph-journal + size: 0 + - space_id: unallocated + size: 0 + + - disk_id: sdb + size: 100 + spaces: + - space_id: root + size: 0 + - space_id: swap + size: 0 + - space_id: log + size: 0 + - space_id: ceph + size: 100 + - space_id: ceph-journal + size: 0 + - space_id: unallocated + size: 0 + + - disk_id: sdc + size: 10 + spaces: + - space_id: root + size: 0 + - space_id: swap + size: 0 + - space_id: log + size: 0 + - space_id: ceph + size: 0 + - space_id: ceph-journal + size: 10 + - space_id: unallocated + size: 0