!115 fix setting kickstart data

From: @kiraskyler 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2023-09-22 08:31:09 +00:00 committed by Gitee
commit 64172782b9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 77 additions and 1 deletions

View File

@ -0,0 +1,69 @@
From 96d44101dd324a0d2822fbebf875fdaa2987766b Mon Sep 17 00:00:00 2001
From: Vojtech Trefny <vtrefny@redhat.com>
Date: Fri, 1 Sep 2023 17:25:44 +0800
Subject: [PATCH] 1
Signed-off-by: Vojtech Trefny <vtrefny@redhat.com>
Conflict:https://github.com/storaged-project/blivet/commit/8a860841489f02be33630e8d48911c5441891f0e
Reference:https://github.com/storaged-project/blivet/commit/8a860841489f02be33630e8d48911c5441891f0e
---
blivet/devices/btrfs.py | 4 ++--
blivet/devices/lvm.py | 2 +-
blivet/devices/partition.py | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/blivet/devices/btrfs.py b/blivet/devices/btrfs.py
index edb8247..5da6538 100644
--- a/blivet/devices/btrfs.py
+++ b/blivet/devices/btrfs.py
@@ -498,8 +498,8 @@ class BTRFSVolumeDevice(BTRFSDevice, ContainerDevice, RaidDevice):
def populate_ksdata(self, data):
super(BTRFSVolumeDevice, self).populate_ksdata(data)
- data.data_level = self.data_level.name if self.data_level else None
- data.metadata_level = self.metadata_level.name if self.metadata_level else None
+ data.dataLevel = self.data_level.name if self.data_level else None
+ data.metaDataLevel = self.metadata_level.name if self.metadata_level else None
data.devices = ["btrfs.%d" % p.id for p in self.parents]
data.preexist = self.exists
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index 97de6ac..54eac75 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -1151,7 +1151,7 @@ class LVMLogicalVolumeBase(DMDevice, RaidDevice):
if self.req_grow:
# base size could be literal or percentage
- data.max_size_mb = self.req_max_size.convert_to(MiB)
+ data.maxSizeMB = self.req_max_size.convert_to(MiB)
elif data.resize:
data.size = self.target_size.convert_to(MiB)
diff --git a/blivet/devices/partition.py b/blivet/devices/partition.py
index c53e707..9e24a3c 100644
--- a/blivet/devices/partition.py
+++ b/blivet/devices/partition.py
@@ -982,14 +982,14 @@ class PartitionDevice(StorageDevice):
data.size = self.req_base_size.round_to_nearest(MiB, rounding=ROUND_DOWN).convert_to(spec=MiB)
data.grow = self.req_grow
if self.req_grow:
- data.max_size_mb = self.req_max_size.convert_to(MiB)
+ data.maxSizeMB = self.req_max_size.convert_to(MiB)
# data.disk = self.disk.name # by-id
if self.req_disks and len(self.req_disks) == 1:
data.disk = self.disk.name
- data.prim_only = self.req_primary
+ data.primOnly = self.req_primary
else:
- data.on_part = self.name # by-id
+ data.onPart = self.name # by-id
if data.resize:
# on s390x in particular, fractional sizes are reported, which
--
2.27.0

View File

@ -3,7 +3,7 @@
Name: python-blivet Name: python-blivet
Version: 3.6.1 Version: 3.6.1
Release: 3 Release: 4
Epoch: 1 Epoch: 1
Summary: A python module for system storage configuration Summary: A python module for system storage configuration
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -19,6 +19,7 @@ BuildRequires: python2-devel python2-setuptools
Patch0: 0001-force-lvm-plugin.patch Patch0: 0001-force-lvm-plugin.patch
Patch1: fix-the-long-hostname.patch Patch1: fix-the-long-hostname.patch
Patch2: backport-fix-setting-kickstart-data.patch
patch6001: backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch patch6001: backport-Add-a-basic-read-only-support-for-UDF-filesystem.patch
%ifarch sw_64 %ifarch sw_64
@ -129,6 +130,12 @@ make PYTHON=%{__python2} DESTDIR=%{buildroot} install
%doc README.md %doc README.md
%changelog %changelog
* Fri Sep 1 2023 Wanli Niu <niuwanli@cysoftware.com.cn> - 1:3.6.1-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix setting kickstart data
* Mon Feb 13 2023 hanhuihui<hanhuihui5@huawei.com> - 1:3.6.1-3 * Mon Feb 13 2023 hanhuihui<hanhuihui5@huawei.com> - 1:3.6.1-3
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA