bundles: use metastack syntax for metadata.get()
All checks were successful
bundlewrap/pipeline/head This commit looks good

This commit is contained in:
Franzi 2021-02-18 18:12:25 +01:00
parent 4be912ac31
commit b06532241b
Signed by: kunsi
GPG key ID: 12E3D2136B818350
38 changed files with 58 additions and 58 deletions

View file

@ -1,5 +1,5 @@
<%
arc_max_mb = node.metadata.get('zfs', {}).get('module_options', {}).get('zfs_arc_max_mb', 1024)
arc_max_mb = node.metadata.get('zfs/module_options/zfs_arc_max_mb', 1024)
%>\
% if arc_max_mb != 0:
options zfs zfs_arc_max=${arc_max_mb * 1024 * 1024}

View file

@ -30,7 +30,7 @@ files = {
},
'/etc/zfs-snapshot-config.json': {
'content': dumps(
node.metadata.get('zfs', {}).get('snapshots', {}),
node.metadata.get('zfs/snapshots', {}),
cls=MetadataJSONEncoder, # turns sets into sorted lists
indent=4,
sort_keys=True,
@ -72,10 +72,10 @@ svc_systemd = {
},
}
zfs_datasets = node.metadata.get('zfs', {}).get('datasets', {})
zfs_datasets = node.metadata.get('zfs/datasets', {})
zfs_pools = {}
for name, attrs in node.metadata.get('zfs', {}).get('pools', {}).items():
for name, attrs in node.metadata.get('zfs/pools', {}).items():
zfs_pools[name] = attrs
# Not yet supported on debian buster