feat: add support for the Pan DSL (#479)

This commit is contained in:
Andy Georges 2020-03-26 19:39:45 +01:00 committed by GitHub
parent 4716517d48
commit 1425c670a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 26 additions and 0 deletions

View file

@ -715,6 +715,11 @@
"multi_line_comments": [["/*", "*/"]],
"extensions": ["oz"]
},
"Pan": {
"line_comment": ["#"],
"quotes": [["\\\"", "\\\""], ["'", "'"]],
"extensions": ["pan", "tpl"]
},
"Pascal": {
"nested": true,
"line_comment": ["//"],

21
tests/data/pan.pan Normal file
View file

@ -0,0 +1,21 @@
# 21 lines 11 code 4 comments 6 blanks
# Pan example code, see https://quattor-pan.readthedocs.io/en/stable/pan-book/index.html
prefix "/system/aii/osinstall/ks";
"clearpart" = append("vdb");
"ignoredisk" = list(); # no disks to ignore
prefix "/system/blockdevices";
"physical_devs/vdb/label" = "msdos";
"partitions/vdb1" = dict(
"holding_dev", "vdb",
);
"files/{/srv/elasticsearch}" = dict('size', 0);
# To facilitate adding other partitions at a later stage, a
# logical volume will be created
"volume_groups/vg1/device_list" = append("partitions/vdb1");
"logical_volumes" = lvs_add('vg1', dict("elasticsearch", -1));