feat(schema): basic storage settings#1455
feat(schema): basic storage settings#1455joseivanlopez merged 15 commits intoagama-project:masterfrom
Conversation
57e5499 to
ef24d7f
Compare
| "snapshots": true | ||
| } | ||
| }, | ||
| "size": [1024, "5 Gib"], |
There was a problem hiding this comment.
can json have comments? This will really deserve comment what this array size means. Is 1024 minimal size or block lenght? Or something else. Examples should be crystal clear.
There was a problem hiding this comment.
JSON does not allow comments. The schema defines what it means: [min, max].
There was a problem hiding this comment.
@joseivanlopez true, but the schema also allows a {"min": min, "max": max } alternative. In light of @jreidinger 's comment, maybe we should remove the pair alternative, or discourage it.
https://github.com/openSUSE/agama/pull/1455/files#diff-e7dcc0a7344de41b0cc7ca87ba9624848c4160406f9d618a2ae025751f6c7bf7R601-R627
This comment was marked as resolved.
This comment was marked as resolved.
| "filesystem": "xfs", | ||
| "size": { | ||
| "min": "5 GiB", | ||
| "max": "20 GiB" |
There was a problem hiding this comment.
... which is illustrated here
2655680 to
c027e96
Compare
0f23dd2 to
505dfdd
Compare
- Adapt to new agreed format.
b6618b2 to
5246166
Compare
A JSON schema for the storage config is defined by #1455. This PR adds support to the D-Bus API to allow setting a JSON config following that new JSON schema: ~~~ org.opensuse.Agama.Storage1 #SetConfig s #GetConfig s ~~~ ## `#SetConfig` For now, the `#SetConfig` D-Bus method admits 3 different JSON formats for the given JSON config: * Guided config ~~~ { "storage": { "guided": ... } } ~~~ * New storage config ~~~ { "storage": { ... } } ~~~ * Legacy AutoYaST config ~~~ { "legacyAutoyastStorage": [ ... ] } ~~~ The plan is to make `#SetConfig` and `#GetConfig` only to work with a *storage config* or a *legacy AutoYaST config*. The *guided config* is still accepted by `#SetConfig` because the new *storage config* does not offer all the options offered by *guided config* yet. In the future, the *guided config* will be neither accepted nor reported by `#SetConfig` and `#GetConfig` respectively. Nevertheless, a D-Bus method accepting the *guided config* will still be offered as a simplification of the *storage settings* to make easier to work with the use cases supported by the web UI. ## `#GetConfig` Currently, `#GetConfig` reports different config formats depending on how the proposal was calculated: * For the initial proposal: reports the *guided config*. * If `#SetConfig` was called with *guided config*: reports *guided config* (extended with mandatory volumes, etc). * If `#SetConfig` was called with *storage config*: reports exactly the given *storage config*. * If `#SetConfig` was called with *legacy AutoYaST config*: reports exactly the given *legacy AutoYaST config*. * If `Storage1.Proposal#Calculate` was called: reports the *guided config* (extended with mandatory volumes, etc). In the future, `#GetConfig` will only report either the *storage config* or the *legacy AutoYaST config*.
Prepare for releasing Agama 10· * #1263 * #1330 * #1407 * #1408 * #1410 * #1411 * #1412 * #1416 * #1417 * #1419 * #1420 * #1421 * #1422 * #1423 * #1424 * #1425 * #1428 * #1429 * #1430 * #1431 * #1432 * #1433 * #1436 * #1437 * #1438 * #1439 * #1440 * #1441 * #1443 * #1444 * #1445 * #1449 * #1450 * #1451 * #1452 * #1453 * #1454 * #1455 * #1456 * #1457 * #1459 * #1460 * #1462 * #1464 * #1465 * #1466 * #1467 * #1468 * #1469 * #1470 * #1471 * #1472 * #1473 * #1475 * #1476 * #1477 * #1478 * #1479 * #1480 * #1481 * #1482 * #1483 * #1484 * #1485 * #1486 * #1487 * #1488 * #1489 * #1491 * #1492 * #1493 * #1494 * #1496 * #1497 * #1498 * #1499 * #1500 * #1501 * #1502 * #1503 * #1504 * #1505 * #1506 * #1507 * #1508 * #1510 * #1511 * #1512 * #1513 * #1514 * #1515 * #1516 * #1517 * #1518 * #1519 * #1520 * #1522 * #1523 * #1524 * #1525 * #1526 * #1527 * #1528 * #1529 * #1530 * #1531 * #1532 * #1533 * #1534 * #1535 * #1536 * #1537 * #1540 * #1541 * #1543 * #1544 * #1545 * #1546 * #1547 * #1548 * #1549 * #1550 * #1552 * #1553 * #1554 * #1555 * #1556 * #1557 * #1558 * #1559 * #1560 * #1562 * #1563 * #1565 * #1566 * #1567 * #1568 * #1569 * #1570 * #1571 * #1572 * #1573 * #1574 * #1575 * #1576 * #1577 * #1578 * #1579 * #1580 * #1581 * #1583 * #1584 * #1585 * #1586 * #1587 * #1588 * #1589 * #1590 * #1591 * #1592 * #1593 * #1596 * #1597 * #1598 * #1600 * #1602 * #1605 * #1606 * #1607 * #1608 * #1610 * #1611 * #1612 * #1613 * #1614 * #1619 * #1620 * #1621
Extend JSON schema to partially support the new storage config described in this document: https://github.com/openSUSE/agama/blob/master/doc/auto_storage.md.
This PR only extends the schema for the most basic settings (i.e., boot, drives and partitions). Settings for advanced searches, delete devices, creeate RAIDs, etc are not considered yet.
Notes: