this would have to be generated from the config file with the format:'domain1' => [ { 'libname' => 'foo', 'pathname' => '/path/to/metadata', 'owner' => 'someuser', 'libaclinherit' => 'yes|no', 'dynlock' => 'yes|no', 'options|roptions' => [ { 'datapath' => [ '/data/path01', '/data/path02', '/data/path03', ... ], 'indexpath' => [ '/indx/path1', '/indx/path2', '/indx/path3', ... ], 'workpath' => [ '/work/path1', '/work/path2', '/work/path3', ... ], 'metapath' => [ '/meta/path1', '/meta/path2', '/meta/path3', ... ] } ] } ], 'domain2' => [ { 'libname' => 'bar', 'pathname' => '/path/to/metadata', 'owner' => 'someuser', 'libaclinherit' => 'yes|no', 'dynlock' => 'yes|no' 'options|roptions' => [ { 'datapath' => [ '/data/path01', '/data/path02', '/data/path03', ... ], 'indexpath' => [ '/indx/path1', '/indx/path2', '/indx/path3', ... ], 'workpath' => [ '/work/path1', '/work/path2', '/work/path3', ... ], 'metapath' => [ '/meta/path1', '/meta/path2', '/meta/path3', ... ] } ] } ]
libname=foo pathname=/path/to/metadata/foo owner=someuser libaclinherit=no dynlock=no
roptions="
datapath=('/data/path1'
'/data/path2'
'/data/path3'
...)
indexpath=('/indx/path1'
'/indx/path2'
'/indx/path3'
...)
workpath=('/work/path1'
'/work/path2'
'/work/path3'
...)
metapath=('/meta/path1'
'/meta/path2'
'/meta/path3'
...)";
libname=bar pathname=/path/to/metadata/bar owner=someuser libaclinherit=no dynlock=no
roptions="
datapath=('/data/path1'
'/data/path2'
'/data/path3'
...)
indexpath=('/indx/path1'
'/indx/path2'
'/indx/path3'
...)
workpath=('/work/path1'
'/work/path2'
'/work/path3'
...)
metapath=('/meta/path1'
'/meta/path2'
'/meta/path3'
...)";
This parsing has to be able to handle the fact that everything after 'pathname' is optional. The simplest entry being:
In reply to Parsing a complex config file by solitaryrpr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |