split plc.d/ and db-config.d between myplc and plcapi modules as a first step
[plcapi.git] / db-config.d / 020-boot_states
1 # -*-python-*-
2 # $Id: 012-slice_tags -1   $
3 # $URL: svn+ssh://thierry@svn.planet-lab.org/svn/MyPLC/trunk/db-config.d/012-slice_tags $
4 #################### slice tag types
5 default_boot_states = [
6     'boot',
7     'failboot',
8     'safeboot',
9     'install',
10     'reinstall',
11     'disabled',
12 ]
13 current_boot_states = GetBootStates()
14 for state in default_boot_states:
15     if state not in current_boot_states:
16         AddBootState(state)
17
18 # TODO: Delete old boot states. 
19 if False:# NOTE: Only set to true if all federating peers have the new default boot states above.
20     for state in current_boot_states:
21         if state not in default_boot_states:
22             DeleteBootState(state)
23