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
1diff --git a/curtin/block/schemas.py b/curtin/block/schemas.py
2index f754ccc..3594a40 100644
3--- a/curtin/block/schemas.py
4+++ b/curtin/block/schemas.py
5@@ -14,7 +14,7 @@ definitions = {
6 'devices': {'type': 'array', 'items': {'$ref': '#/definitions/ref_id'}},
7 'name': {'type': 'string'},
8 'preserve': {'type': 'boolean'},
9- 'ptable': {'type': 'string', 'enum': ['dos', 'gpt', 'msdos']},
10+ 'ptable': {'type': 'string', 'enum': ['dos', 'gpt', 'mac', 'msdos']},
11 'size': {'type': ['string', 'number'],
12 'minimum': 1,
13 'pattern': r'^([1-9]\d*(.\d+)?|\d+.\d+)(K|M|G|T)?B?'},
14diff --git a/tests/unittests/test_storage_config.py b/tests/unittests/test_storage_config.py
15index fa8a4af..0ae5107 100644
16--- a/tests/unittests/test_storage_config.py
17+++ b/tests/unittests/test_storage_config.py
18@@ -42,6 +42,17 @@ class TestStorageConfigSchema(CiTestCase):
19 config = {'config': [disk], 'version': 1}
20 storage_config.validate_config(config)
21
22+ @skipUnlessJsonSchema()
23+ def test_disk_schema_accepts_mac_partition_table(self):
24+ disk = {
25+ "id": "disk-vdc",
26+ "path": "/dev/vdc",
27+ "type": "disk",
28+ "ptable": "mac",
29+ }
30+ config = {'config': [disk], 'version': 1}
31+ storage_config.validate_config(config)
32+
33
34 class TestProbertParser(CiTestCase):
35

Subscribers

People subscribed via source and target branches