Merge ~raharper/curtin:fix/ppc64-mac-partition into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Dan Watkins
Approved revision: ce54496580b8765ceeae1846a86b0a7db0068673
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/curtin:fix/ppc64-mac-partition
Merge into: curtin:master
Diff against target: 34 lines (+12/-1)
2 files modified
curtin/block/schemas.py (+1/-1)
tests/unittests/test_storage_config.py (+11/-0)
Reviewer Review Type Date Requested Status
Server Team CI bot continuous-integration Approve
Dan Watkins (community) Approve
Review via email: mp+373324@code.launchpad.net

Commit message

block-schema: allow 'mac' as partition table type

On PPC64, the partition table on the live iso is 'mac'.
Add this value to the partition type schema.

LP: #1845611

To post a comment you must log in.
Revision history for this message
Dan Watkins (oddbloke) :
review: Approve
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/curtin/block/schemas.py b/curtin/block/schemas.py
index f754ccc..3594a40 100644
--- a/curtin/block/schemas.py
+++ b/curtin/block/schemas.py
@@ -14,7 +14,7 @@ definitions = {
14 'devices': {'type': 'array', 'items': {'$ref': '#/definitions/ref_id'}},14 'devices': {'type': 'array', 'items': {'$ref': '#/definitions/ref_id'}},
15 'name': {'type': 'string'},15 'name': {'type': 'string'},
16 'preserve': {'type': 'boolean'},16 'preserve': {'type': 'boolean'},
17 'ptable': {'type': 'string', 'enum': ['dos', 'gpt', 'msdos']},17 'ptable': {'type': 'string', 'enum': ['dos', 'gpt', 'mac', 'msdos']},
18 'size': {'type': ['string', 'number'],18 'size': {'type': ['string', 'number'],
19 'minimum': 1,19 'minimum': 1,
20 'pattern': r'^([1-9]\d*(.\d+)?|\d+.\d+)(K|M|G|T)?B?'},20 'pattern': r'^([1-9]\d*(.\d+)?|\d+.\d+)(K|M|G|T)?B?'},
diff --git a/tests/unittests/test_storage_config.py b/tests/unittests/test_storage_config.py
index fa8a4af..0ae5107 100644
--- a/tests/unittests/test_storage_config.py
+++ b/tests/unittests/test_storage_config.py
@@ -42,6 +42,17 @@ class TestStorageConfigSchema(CiTestCase):
42 config = {'config': [disk], 'version': 1}42 config = {'config': [disk], 'version': 1}
43 storage_config.validate_config(config)43 storage_config.validate_config(config)
4444
45 @skipUnlessJsonSchema()
46 def test_disk_schema_accepts_mac_partition_table(self):
47 disk = {
48 "id": "disk-vdc",
49 "path": "/dev/vdc",
50 "type": "disk",
51 "ptable": "mac",
52 }
53 config = {'config': [disk], 'version': 1}
54 storage_config.validate_config(config)
55
4556
46class TestProbertParser(CiTestCase):57class TestProbertParser(CiTestCase):
4758

Subscribers

People subscribed via source and target branches