root / src / Ganeti / WConfd / ConfigState.hs @ 833c32b3
History | View | Annotate | Download (1.2 kB)
1 | 9515a7d2 | Petr Pudlak | {-| Pure functions for manipulating the configuration state. |
---|---|---|---|
2 | 9515a7d2 | Petr Pudlak | |
3 | 9515a7d2 | Petr Pudlak | -} |
4 | 9515a7d2 | Petr Pudlak | |
5 | 9515a7d2 | Petr Pudlak | {- |
6 | 9515a7d2 | Petr Pudlak | |
7 | 9515a7d2 | Petr Pudlak | Copyright (C) 2014 Google Inc. |
8 | 9515a7d2 | Petr Pudlak | |
9 | 9515a7d2 | Petr Pudlak | This program is free software; you can redistribute it and/or modify |
10 | 9515a7d2 | Petr Pudlak | it under the terms of the GNU General Public License as published by |
11 | 9515a7d2 | Petr Pudlak | the Free Software Foundation; either version 2 of the License, or |
12 | 9515a7d2 | Petr Pudlak | (at your option) any later version. |
13 | 9515a7d2 | Petr Pudlak | |
14 | 9515a7d2 | Petr Pudlak | This program is distributed in the hope that it will be useful, but |
15 | 9515a7d2 | Petr Pudlak | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | 9515a7d2 | Petr Pudlak | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
17 | 9515a7d2 | Petr Pudlak | General Public License for more details. |
18 | 9515a7d2 | Petr Pudlak | |
19 | 9515a7d2 | Petr Pudlak | You should have received a copy of the GNU General Public License |
20 | 9515a7d2 | Petr Pudlak | along with this program; if not, write to the Free Software |
21 | 9515a7d2 | Petr Pudlak | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
22 | 9515a7d2 | Petr Pudlak | 02110-1301, USA. |
23 | 9515a7d2 | Petr Pudlak | |
24 | 9515a7d2 | Petr Pudlak | -} |
25 | 9515a7d2 | Petr Pudlak | |
26 | 9515a7d2 | Petr Pudlak | module Ganeti.WConfd.ConfigState |
27 | 9515a7d2 | Petr Pudlak | ( ConfigState |
28 | 833c32b3 | Petr Pudlak | , csConfigData |
29 | 9515a7d2 | Petr Pudlak | , mkConfigState |
30 | 9515a7d2 | Petr Pudlak | ) where |
31 | 9515a7d2 | Petr Pudlak | |
32 | 833c32b3 | Petr Pudlak | import Ganeti.Objects |
33 | 833c32b3 | Petr Pudlak | |
34 | 9515a7d2 | Petr Pudlak | -- | In future this data type will include the current configuration |
35 | 9515a7d2 | Petr Pudlak | -- ('ConfigData') and the last 'FStat' of its file. |
36 | 9515a7d2 | Petr Pudlak | data ConfigState = ConfigState |
37 | 833c32b3 | Petr Pudlak | { csConfigData :: ConfigData |
38 | 833c32b3 | Petr Pudlak | } |
39 | 9515a7d2 | Petr Pudlak | |
40 | 9515a7d2 | Petr Pudlak | -- | Creates a new configuration state. |
41 | 9515a7d2 | Petr Pudlak | -- This method will expand as more fields are added to 'ConfigState'. |
42 | 833c32b3 | Petr Pudlak | mkConfigState :: ConfigData -> ConfigState |
43 | 9515a7d2 | Petr Pudlak | mkConfigState = ConfigState |