curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02430
[Merge] ~dbungert/curtin:pmem into curtin:master
Dan Bungert has proposed merging ~dbungert/curtin:pmem into curtin:master.
Commit message:
block_meta: fix for pmem kname lookup
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/427507
--
Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:pmem into curtin:master.
diff --git a/curtin/block/__init__.py b/curtin/block/__init__.py
index 49b062f..8510a01 100644
--- a/curtin/block/__init__.py
+++ b/curtin/block/__init__.py
@@ -133,7 +133,7 @@ def partition_kname(disk_kname, partition_number):
partition_number)))
for dev_type in ['bcache', 'nvme', 'mmcblk', 'cciss', 'mpath', 'md',
- 'loop']:
+ 'loop', 'pmem']:
if disk_kname.startswith(dev_type):
partition_number = "p%s" % partition_number
break
diff --git a/tests/unittests/test_block.py b/tests/unittests/test_block.py
index 7a73b69..9dff854 100644
--- a/tests/unittests/test_block.py
+++ b/tests/unittests/test_block.py
@@ -457,7 +457,10 @@ class TestBlockKnames(CiTestCase):
(('cciss!c0d0', 1), 'cciss!c0d0p1'),
(('dm-0', 1), 'dm-1'),
(('md0', 1), 'md0p1'),
- (('mpath1', 2), 'mpath1p2')]
+ (('mpath1', 2), 'mpath1p2'),
+ (('pmem0', 1), 'pmem0p1'),
+ ]
+
for ((disk_kname, part_number), part_kname) in part_knames:
self.assertEqual(part_kname,
block.partition_kname(disk_kname, part_number))
Follow ups