func/overlord/cmd_modules/dumpconfig.py | 46 ++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) New commits: commit b53687cb4552123b8ca75a7109eca6654771fd0d Author: Seth Vidal <skvidal@xxxxxxxxxxxxxxxxx> Date: Wed Feb 23 17:04:29 2011 -0500 add dump_config cmd module to dump out the config of the func client diff --git a/func/overlord/cmd_modules/dumpconfig.py b/func/overlord/cmd_modules/dumpconfig.py new file mode 100644 index 0000000..1c50149 --- /dev/null +++ b/func/overlord/cmd_modules/dumpconfig.py @@ -0,0 +1,46 @@ +""" +Dump func-client/overlord config information + +Copyright 2011, Red Hat, Inc +see AUTHORS + +This software may be freely redistributed under the terms of the GNU +general public license. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +""" + + +import optparse +import os + +from func.overlord import base_command +from certmaster import certs + +class DumpConfig(base_command.BaseCommand): + name = "dump_config" + usage = "dump func-client/overlord config" + summary = usage + + def do(self, args): + self.server_spec = self.parentCommand.server_spec + self.getOverlord() + print 'config:' + for l in str(self.overlord_obj.config).split('\n'): + print '\t' + l + print '' + print 'key file: %s' % self.overlord_obj.key + cert = certs.retrieve_cert_from_file(self.overlord_obj.cert) + print 'cert file: %s' % self.overlord_obj.cert + print 'ca file: %s' % self.overlord_obj.ca + print 'cert dn: %s' % cert.get_subject().CN + print 'certificate hash: %s' % cert.subject_name_hash() + print 'timeout: %s' % self.overlord_obj.timeout + print 'forks: %s' % self.overlord_obj.nforks + print 'cmd modules loaded:' + for mn in sorted(self.overlord_obj.methods.keys()): + print '\t' + mn + print 'minion map:' + print self.overlord_obj.minionmap _______________________________________________ Func-list mailing list Func-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/func-list