With the current config framework you might, for example, have to specify the exact same destination replica multiple times for many managed datasets. There should be some syntax for avoiding this. e.g. enable setting a default value from a broader context:
{
"DEFAULT#managed-datasets[*].destinations": [
{
"remote-host": "olympus",
"pool": "o-nas",
"dataset": "zam/s-root/data/home/i",
"windows": [
{"max-age": {"weeks": 6}, "period": {"hours": 1}},
{"max-age": {"months": 6}, "period": {"days": 1}},
{"max-age": {"years": 6}, "period": {"weeks": 1}},
{"period": {"months": 1}}
]
}
],
"managed-datasets": [
{
"source": {
"pool": "s-root",
"dataset": "data/home/i",
"windows": [
{"max-age": {"days": 2}, "period": {"minutes": 10}},
{"max-age": {"weeks": 1}, "period": {"hours": 1}}
]
},
"snapshot-period": {"minutes": "10"},
"replication-period": {"hours": "1"},
"prune-period": {"hours": "1"}
},
{
"source": {
"pool": "s-root",
"dataset": "root/default",
"windows": [
{"max-age": {"weeks": 1}, "period": {"hours": 3}}
]
},
"snapshot-period": {"minutes": "10"},
"replication-period": {"hours": "1"},
"prune-period": {"hours": "1"}
}
]
}
{
"DEFINE#dest-default-dataset": "zam",
"DEFINE#dest-default": {
"remote-host": "olympus",
"pool": "o-nas",
"windows": [
{"max-age": {"weeks": 6}, "period": {"hours": 1}},
{"max-age": {"months": 6}, "period": {"days": 1}},
{"max-age": {"years": 6}, "period": {"weeks": 1}},
{"period": {"months": 1}}
]
},
"managed-datasets": [
{
"source": {
"pool": "s-root",
"dataset": "data/home/i",
"windows": [
{"max-age": {"days": 2}, "period": {"minutes": 10}},
{"max-age": {"weeks": 1}, "period": {"hours": 1}}
]
},
"destinations": [
{
"REF": "dest-default",
"dataset": "${dest-default-dataset}/s-root/data/home/i",
}
],
"snapshot-period": {"minutes": "10"},
"replication-period": {"hours": "1"},
"prune-period": {"hours": "1"}
},
{
"source": {
"pool": "s-root",
"dataset": "root/default",
"windows": [
{"max-age": {"weeks": 1}, "period": {"hours": 3}}
]
},
"destinations": [
{
"REF": "dest-default",
"dataset": "${dest-default-dataset}/s-root/root/default",
}
],
"snapshot-period": {"minutes": "10"},
"replication-period": {"hours": "1"},
"prune-period": {"hours": "1"}
}
]
}
Bear in mind that one of the primary objectives of this project is to use as few lines of code as possible. Is this feature worth the extra LOC?