|
Vojtech Trefny |
eabe00 |
From 1af0d3c37a93e431790e641a329a7f34dabf291a Mon Sep 17 00:00:00 2001
|
|
Vojtech Trefny |
eabe00 |
From: Vojtech Trefny <vtrefny@redhat.com>
|
|
Vojtech Trefny |
eabe00 |
Date: Thu, 2 Mar 2023 12:34:42 +0100
|
|
Vojtech Trefny |
eabe00 |
Subject: [PATCH] Fix setting kickstart data
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
When changing our code to PEP8 compliant we also changed some
|
|
Vojtech Trefny |
eabe00 |
pykickstart properties like onPart by accident. This PR fixes this.
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
Resolves: rhbz#2174296
|
|
Vojtech Trefny |
eabe00 |
---
|
|
Vojtech Trefny |
eabe00 |
blivet/devices/btrfs.py | 4 ++--
|
|
Vojtech Trefny |
eabe00 |
blivet/devices/lvm.py | 2 +-
|
|
Vojtech Trefny |
eabe00 |
blivet/devices/partition.py | 6 +++---
|
|
Vojtech Trefny |
eabe00 |
3 files changed, 6 insertions(+), 6 deletions(-)
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
|
|
Vojtech Trefny |
eabe00 |
index 1ae6a04d..3f56624e 100644
|
|
Vojtech Trefny |
eabe00 |
--- a/blivet/devices/btrfs.py
|
|
Vojtech Trefny |
eabe00 |
+++ b/blivet/devices/btrfs.py
|
|
Vojtech Trefny |
eabe00 |
@@ -498,8 +498,8 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice):
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
def populate_ksdata(self, data):
|
|
Vojtech Trefny |
eabe00 |
super(BTRFSVolumeDevice, self).populate_ksdata(data)
|
|
Vojtech Trefny |
eabe00 |
- data.data_level = self.data_level.name if self.data_level else None
|
|
Vojtech Trefny |
eabe00 |
- data.metadata_level = self.metadata_level.name if self.metadata_level else None
|
|
Vojtech Trefny |
eabe00 |
+ data.dataLevel = self.data_level.name if self.data_level else None
|
|
Vojtech Trefny |
eabe00 |
+ data.metaDataLevel = self.metadata_level.name if self.metadata_level else None
|
|
Vojtech Trefny |
eabe00 |
data.devices = ["btrfs.%d" % p.id for p in self.parents]
|
|
Vojtech Trefny |
eabe00 |
data.preexist = self.exists
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
|
|
Vojtech Trefny |
eabe00 |
index 41358e9b..c3132457 100644
|
|
Vojtech Trefny |
eabe00 |
--- a/blivet/devices/lvm.py
|
|
Vojtech Trefny |
eabe00 |
+++ b/blivet/devices/lvm.py
|
|
Vojtech Trefny |
eabe00 |
@@ -1161,7 +1161,7 @@ class LVMLogicalVolumeBase(DMDevice, RaidDevice):
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
if self.req_grow:
|
|
Vojtech Trefny |
eabe00 |
# base size could be literal or percentage
|
|
Vojtech Trefny |
eabe00 |
- data.max_size_mb = self.req_max_size.convert_to(MiB)
|
|
Vojtech Trefny |
eabe00 |
+ data.maxSizeMB = self.req_max_size.convert_to(MiB)
|
|
Vojtech Trefny |
eabe00 |
elif data.resize:
|
|
Vojtech Trefny |
eabe00 |
data.size = self.target_size.convert_to(MiB)
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
|
|
Vojtech Trefny |
eabe00 |
index 89d907c2..0e9250ce 100644
|
|
Vojtech Trefny |
eabe00 |
--- a/blivet/devices/partition.py
|
|
Vojtech Trefny |
eabe00 |
+++ b/blivet/devices/partition.py
|
|
Vojtech Trefny |
eabe00 |
@@ -982,14 +982,14 @@ class PartitionDevice(StorageDevice):
|
|
Vojtech Trefny |
eabe00 |
data.size = self.req_base_size.round_to_nearest(MiB, rounding=ROUND_DOWN).convert_to(spec=MiB)
|
|
Vojtech Trefny |
eabe00 |
data.grow = self.req_grow
|
|
Vojtech Trefny |
eabe00 |
if self.req_grow:
|
|
Vojtech Trefny |
eabe00 |
- data.max_size_mb = self.req_max_size.convert_to(MiB)
|
|
Vojtech Trefny |
eabe00 |
+ data.maxSizeMB = self.req_max_size.convert_to(MiB)
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
# data.disk = self.disk.name # by-id
|
|
Vojtech Trefny |
eabe00 |
if self.req_disks and len(self.req_disks) == 1:
|
|
Vojtech Trefny |
eabe00 |
data.disk = self.disk.name
|
|
Vojtech Trefny |
eabe00 |
- data.prim_only = self.req_primary
|
|
Vojtech Trefny |
eabe00 |
+ data.primOnly = self.req_primary
|
|
Vojtech Trefny |
eabe00 |
else:
|
|
Vojtech Trefny |
eabe00 |
- data.on_part = self.name # by-id
|
|
Vojtech Trefny |
eabe00 |
+ data.onPart = self.name # by-id
|
|
Vojtech Trefny |
eabe00 |
|
|
Vojtech Trefny |
eabe00 |
if data.resize:
|
|
Vojtech Trefny |
eabe00 |
# on s390x in particular, fractional sizes are reported, which
|
|
Vojtech Trefny |
eabe00 |
--
|
|
Vojtech Trefny |
eabe00 |
2.40.1
|
|
Vojtech Trefny |
eabe00 |
|