Add new RHEL7 logvol objects to master
[pykickstart.git] / pykickstart / handlers / control.py
blob5be0f8fc5e755304c3a7ffe51cebb12bc2017696
2 # Chris Lumens <clumens@redhat.com>
4 # Copyright 2007-2014 Red Hat, Inc.
6 # This copyrighted material is made available to anyone wishing to use, modify,
7 # copy, or redistribute it subject to the terms and conditions of the GNU
8 # General Public License v.2. This program is distributed in the hope that it
9 # will be useful, but WITHOUT ANY WARRANTY expressed or implied, including the
10 # implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11 # See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # this program; if not, write to the Free Software Foundation, Inc., 51
15 # Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Any Red Hat
16 # trademarks that are incorporated in the source code or documentation are not
17 # subject to the GNU General Public License and may only be used or replicated
18 # with the express permission of Red Hat, Inc.
20 __all__ = ["commandMap", "dataMap"]
22 from pykickstart import handlers
24 commandMap = {}
25 dataMap = {}
27 if not commandMap:
28 for (name, obj) in list(handlers.__dict__.items()):
29 if not (name.startswith("fc") or name.startswith("f") or name.startswith("rhel")):
30 continue
32 if not obj.__all__ or not obj.__all__[0].endswith("Handler"):
33 continue
35 # Now we've got a WhateverHandler module in obj. This module should
36 # export one class named WhateverHandler, which we can get at indirectly
37 # through __all__, like so:
38 handler = obj.__dict__[obj.__all__[0]]
39 commandMap[handler.version] = handler.commandMap
40 dataMap[handler.version] = handler.dataMap