mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Improve Pan language support (#3691)
* Add a larger set of sample files for Pan This is a fairly good cross section of Pan based on code from: * https://github.com/quattor/template-library-examples * https://github.com/quattor/template-library-core * Add Pan language grammar
This commit is contained in:
committed by
Paul Chaignon
parent
e9ec699931
commit
8d178bfaed
26
samples/Pan/osd-fetch.pan
Normal file
26
samples/Pan/osd-fetch.pan
Normal file
@@ -0,0 +1,26 @@
|
||||
unique template site/ceph/osdschemas/osd-fetch;
|
||||
|
||||
prefix '/software/components/ceph/clusters/ceph';
|
||||
|
||||
variable FETCHED_OSDS = {
|
||||
t = dict();
|
||||
rep = 2;
|
||||
foreach(idx; host; CEPH_NODES) {
|
||||
prof = replace('.data$', '.os', host);
|
||||
d = value(format('%s:/software/components/ceph/localdaemons/osds', prof));
|
||||
t[shorten_fqdn(host)] = dict(
|
||||
'fqdn', host,
|
||||
'osds', d
|
||||
);
|
||||
|
||||
numosd = length(d);
|
||||
if (numosd > rep){
|
||||
rep = numosd;
|
||||
};
|
||||
};
|
||||
all = dict('osdhosts', t, 'maxosd', rep);
|
||||
};
|
||||
|
||||
'osdhosts' = FETCHED_OSDS['osdhosts'];
|
||||
variable CEPH_OSD_DOWN_REPORTERS ?= FETCHED_OSDS['maxosd'] + 2;
|
||||
variable CEPH_OSD_DOWN_REPORTS ?= CEPH_OSD_DOWN_REPORTERS + CEPH_OSD_DOWN_REPORTERS / 4 + 1;
|
||||
Reference in New Issue
Block a user