Imported Upstream version 1.7.0
[platform/upstream/augeas.git] / lenses / mongodbserver.aug
1 (*
2 Module: MongoDBServer
3   Parses /etc/mongodb.conf
4
5 Author: Brian Redbeard <redbeard@dead-city.org>
6
7 About: Reference
8    For information on configuration options available to mongod reference one
9    of the following resources:
10     * The Mongo DB Manual - <http://docs.mongodb.org/manual/>
11     * The current options available for your operating system via:
12       > man mongos
13
14 About: License
15    This file is licenced under the LGPL v2+, conforming to the other components
16    of Augeas.
17
18 About: Lens Usage
19   Sample usage of this lens in augtool:
20
21     * Get your current setup
22       > print /files/etc/mongodb.conf
23       ...
24
25     * Change MongoDB port
26       > set /files/etc/mongodb.conf/port 27117
27
28   Saving your file:
29
30       > save
31
32 About: Configuration files
33    This lens applies to /etc/mongodb.conf. See <filter>.
34
35 About: Examples
36    The <Test_MongoDBServer> file contains various examples and tests.
37 *)
38 module MongoDBServer =
39
40 autoload xfm
41
42 (* View: entry *)
43 let entry =
44   Build.key_value_line Rx.word Sep.space_equal (store Rx.space_in)
45
46 (* View: lns *)
47 let lns = (Util.empty | Util.comment | entry)*
48
49
50 (* Variable: filter *)
51 let filter = incl "/etc/mongodb.conf"
52
53 let xfm = transform lns filter