From 8f2ff4d7c902d534d68ff1a16418b7be492033bf Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 7 Feb 2008 13:13:24 -0500 Subject: Carving away at func some more to just get down to cert items, still lots more to do. --- scripts/certmaster-request | 10 ++++++ scripts/func | 14 -------- scripts/func-create-module | 79 ---------------------------------------------- scripts/func-inventory | 8 ----- scripts/funcd | 10 ------ 5 files changed, 10 insertions(+), 111 deletions(-) create mode 100755 scripts/certmaster-request delete mode 100755 scripts/func delete mode 100755 scripts/func-create-module delete mode 100755 scripts/func-inventory delete mode 100755 scripts/funcd (limited to 'scripts') diff --git a/scripts/certmaster-request b/scripts/certmaster-request new file mode 100755 index 0000000..3d807bd --- /dev/null +++ b/scripts/certmaster-request @@ -0,0 +1,10 @@ +#!/usr/bin/python + + +import sys +import distutils.sysconfig + +from func.minion import server + +if __name__ == "__main__": + server.main(sys.argv) diff --git a/scripts/func b/scripts/func deleted file mode 100755 index 925d6ad..0000000 --- a/scripts/func +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/python - -import sys -import distutils.sysconfig - -# sys.path.append("%s/func" % distutils.sysconfig.get_python_lib()) - -import func.overlord.func_command as func_command - -myname, argv = sys.argv[0], sys.argv[1:] -cli = func_command.FuncCommandLine() -cli.parse(argv) - - diff --git a/scripts/func-create-module b/scripts/func-create-module deleted file mode 100755 index f2885e8..0000000 --- a/scripts/func-create-module +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/env python -# -# Copyright 2008, Red Hat, Inc -# Steve 'Ashcrow' Milner -# John Eckersberg -# -# 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. - -TEMPLATE = """\ -# -# Copyright %s -# %s <%s> -# -# 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 func_module - -class %s(func_module.FuncModule): - - # Update these if need be. - version = "0.0.1" - api_version = "0.0.1" - description = "%s" - -%s -""" - -METHOD_TEMPLATE = '''\ - def %s(self): - """ - TODO: Document me ... - """ - pass - -''' - - -def populate_template(author_name, author_email, module_name, desc, methods): - """ - Makes the method strings and populates the template. - """ - from datetime import datetime - - actual_methods = "" - for method in methods: - actual_methods += METHOD_TEMPLATE % method - return TEMPLATE % (datetime.now().strftime("%Y"), author_name, - author_email, module_name, desc, actual_methods[:-2]) - - -if __name__ == '__main__': - module_name = raw_input("Module Name: ").capitalize() - desc = raw_input("Description: ") - author_name = raw_input("Author: ") - author_email = raw_input("Email: ") - methods = [] - print "\nLeave blank to finish." - while True: - method = raw_input("Method: ") - if method == '': - break - methods.append(method) - # Write it out to a file - file_name = "%s.py" % module_name.lower() - file_obj = open(file_name, "w") - file_obj.write(populate_template(author_name, author_email, - module_name, desc, methods)) - file_obj.close() - print "Your module is ready to be hacked on. Wrote out to %s." % file_name diff --git a/scripts/func-inventory b/scripts/func-inventory deleted file mode 100755 index 1a0c36b..0000000 --- a/scripts/func-inventory +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/python - -import sys -import distutils.sysconfig -import func.overlord.inventory as func_inventory - -inventory = func_inventory.FuncInventory() -inventory.run(sys.argv) diff --git a/scripts/funcd b/scripts/funcd deleted file mode 100755 index 3d807bd..0000000 --- a/scripts/funcd +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/python - - -import sys -import distutils.sysconfig - -from func.minion import server - -if __name__ == "__main__": - server.main(sys.argv) -- cgit