Bump to 1.14.1
[platform/upstream/augeas.git] / lenses / afs_cellalias.aug
1 (*
2 Module: AFS_cellalias
3   Parses AFS configuration file CellAlias
4
5 Author: Pat Riehecky <riehecky@fnal.gov>
6
7 About: Reference
8     This lens is targeted at the OpenAFS CellAlias file
9
10 About: Lens Usage
11   Sample usage of this lens in augtool
12
13   * Add a CellAlias for fnal.gov/files to fnal-files
14   > set /files/usr/vice/etc/CellAlias/target[99] fnal.gov/files
15   > set /files/usr/vice/etc/CellAlias/target[99]/linkname fnal-files
16
17 About: License
18   This file is licensed under the LGPL v2+, like the rest of Augeas.
19 *)
20
21 module AFS_cellalias =
22     autoload xfm
23
24    (************************************************************************
25     * Group:                 USEFUL PRIMITIVES
26     *************************************************************************)
27
28    (* Group: Comments and empty lines *)
29
30    (* View: eol *)
31    let eol   = Util.eol
32    (* View: comment *)
33    let comment = Util.comment
34    (* View: empty *)
35    let empty = Util.empty
36
37    (* Group: separators *)
38
39    (* View: space
40     * Separation between key and value
41     *)
42    let space = Util.del_ws_spc
43    let target = /[^ \t\n#]+/
44    let linkname = Rx.word
45
46    (************************************************************************
47     * Group: ENTRIES
48     *************************************************************************)
49
50    (* View: entry *)
51    let entry = [ label "target" . store target . space . [ label "linkname" . store linkname . eol ] ]
52
53    (* View: lns *)
54    let lns = (empty | comment | entry)*
55
56    let xfm = transform lns (incl "/usr/vice/etc/CellAlias")
57
58 (* Local Variables: *)
59 (* mode: caml *)
60 (* End: *)