summaryrefslogtreecommitdiffstats
path: root/func
diff options
context:
space:
mode:
authorSteve 'Ashcrow' Milner <stevem@gnulinux.net>2008-01-16 10:23:29 -0500
committerSteve 'Ashcrow' Milner <stevem@gnulinux.net>2008-01-16 10:23:29 -0500
commit0556acbe5ed39c36d38b99dd3ae455691964a1e1 (patch)
treeac87a6b65abc2032fdf685811f4c6299f59e7a7e /func
parent1420dbfbb699bbe969228173924bfa92ba7f7ce2 (diff)
downloadthird_party-func-0556acbe5ed39c36d38b99dd3ae455691964a1e1.tar.gz
third_party-func-0556acbe5ed39c36d38b99dd3ae455691964a1e1.tar.xz
third_party-func-0556acbe5ed39c36d38b99dd3ae455691964a1e1.zip
added in the desc/version/api items in the modules.
Diffstat (limited to 'func')
-rw-r--r--func/minion/modules/command.py4
-rw-r--r--func/minion/modules/copyfile.py4
-rw-r--r--func/minion/modules/filetracker.py4
-rw-r--r--func/minion/modules/hardware.py4
-rw-r--r--func/minion/modules/mount.py4
-rw-r--r--func/minion/modules/nagios-check.py4
-rw-r--r--func/minion/modules/networktest.py4
-rw-r--r--func/minion/modules/process.py4
-rw-r--r--func/minion/modules/reboot.py4
-rw-r--r--func/minion/modules/rpms.py4
-rw-r--r--func/minion/modules/service.py4
-rw-r--r--func/minion/modules/smart.py4
-rw-r--r--func/minion/modules/snmp.py4
-rw-r--r--func/minion/modules/virt.py4
-rw-r--r--func/minion/modules/yumcmd.py4
15 files changed, 58 insertions, 2 deletions
diff --git a/func/minion/modules/command.py b/func/minion/modules/command.py
index 9b93de5..cc463cf 100644
--- a/func/minion/modules/command.py
+++ b/func/minion/modules/command.py
@@ -18,6 +18,10 @@ import sub_process
class Command(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Works with shell commands."
+
def run(self, command):
"""
Runs a command, returning the return code, stdout, and stderr as a tuple.
diff --git a/func/minion/modules/copyfile.py b/func/minion/modules/copyfile.py
index 85001f8..a229620 100644
--- a/func/minion/modules/copyfile.py
+++ b/func/minion/modules/copyfile.py
@@ -17,11 +17,11 @@ import shutil
import func_module
-
-
class CopyFile(func_module.FuncModule):
+
version = "0.0.1"
api_version = "0.0.2"
+ description = "Allows for smart copying of a file."
def _checksum_blob(self, blob):
CHUNK=2**16
diff --git a/func/minion/modules/filetracker.py b/func/minion/modules/filetracker.py
index 8deb382..4528ff3 100644
--- a/func/minion/modules/filetracker.py
+++ b/func/minion/modules/filetracker.py
@@ -30,6 +30,10 @@ CONFIG_FILE='/etc/func/modules/filetracker.conf'
class FileTracker(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Maintains a manifest of files to keep track of."
+
def __load(self):
"""
Parse file and return data structure.
diff --git a/func/minion/modules/hardware.py b/func/minion/modules/hardware.py
index 5136228..46b1821 100644
--- a/func/minion/modules/hardware.py
+++ b/func/minion/modules/hardware.py
@@ -26,6 +26,10 @@ import func_module
class HardwareModule(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Hardware profiler."
+
def hal_info(self):
"""
Returns the output of lshal, but split up into seperate devices
diff --git a/func/minion/modules/mount.py b/func/minion/modules/mount.py
index 1b4671d..0db914f 100644
--- a/func/minion/modules/mount.py
+++ b/func/minion/modules/mount.py
@@ -18,6 +18,10 @@ import func_module
class MountModule(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Mounting, unmounting and getting information on mounted filesystems."
+
def list(self):
cmd = sub_process.Popen(["/bin/cat", "/proc/mounts"], executable="/bin/cat", stdout=sub_process.PIPE, shell=False)
data = cmd.communicate()[0]
diff --git a/func/minion/modules/nagios-check.py b/func/minion/modules/nagios-check.py
index 80889ce..f1c0714 100644
--- a/func/minion/modules/nagios-check.py
+++ b/func/minion/modules/nagios-check.py
@@ -18,6 +18,10 @@ import sub_process
class Nagios(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Runs nagios checks."
+
def run(self, check_command):
"""
Runs a nagios check returning the return code, stdout, and stderr as a tuple.
diff --git a/func/minion/modules/networktest.py b/func/minion/modules/networktest.py
index ed2f3ab..5f54c5e 100644
--- a/func/minion/modules/networktest.py
+++ b/func/minion/modules/networktest.py
@@ -16,6 +16,10 @@ import sub_process
class NetworkTest(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Defines various network testing tools."
+
def ping(self, *args):
if '-c' not in args:
raise(FuncException("You must define a count with -c!"))
diff --git a/func/minion/modules/process.py b/func/minion/modules/process.py
index e5b9183..50900b4 100644
--- a/func/minion/modules/process.py
+++ b/func/minion/modules/process.py
@@ -24,6 +24,10 @@ import func_module
class ProcessModule(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Process related reporting and control."
+
def info(self, flags="-auxh"):
"""
Returns a struct of hardware information. By default, this pulls down
diff --git a/func/minion/modules/reboot.py b/func/minion/modules/reboot.py
index 0af78f9..c4fb275 100644
--- a/func/minion/modules/reboot.py
+++ b/func/minion/modules/reboot.py
@@ -13,5 +13,9 @@ import sub_process
class Reboot(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Reboots a machine."
+
def reboot(self, when='now', message=''):
return sub_process.call(["/sbin/shutdown", '-r', when, message])
diff --git a/func/minion/modules/rpms.py b/func/minion/modules/rpms.py
index f73e9db..34c4d50 100644
--- a/func/minion/modules/rpms.py
+++ b/func/minion/modules/rpms.py
@@ -13,6 +13,10 @@ import rpm
class RpmModule(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "RPM related commands."
+
def inventory(self, flatten=True):
"""
Returns information on all installed packages.
diff --git a/func/minion/modules/service.py b/func/minion/modules/service.py
index d1170a8..062aea5 100644
--- a/func/minion/modules/service.py
+++ b/func/minion/modules/service.py
@@ -20,6 +20,10 @@ import os
class Service(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Allows for service control via func."
+
def __command(self, service_name, command):
filename = os.path.join("/etc/rc.d/init.d/",service_name)
diff --git a/func/minion/modules/smart.py b/func/minion/modules/smart.py
index ff7afd9..f410f09 100644
--- a/func/minion/modules/smart.py
+++ b/func/minion/modules/smart.py
@@ -23,6 +23,10 @@ import func_module
class SmartModule(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Grabs status from SMART to see if your hard drives are ok."
+
def info(self,flags="-q onecheck"):
"""
Returns a struct of hardware information. By default, this pulls down
diff --git a/func/minion/modules/snmp.py b/func/minion/modules/snmp.py
index 374821c..c992db1 100644
--- a/func/minion/modules/snmp.py
+++ b/func/minion/modules/snmp.py
@@ -19,6 +19,10 @@ base_snmp_command = '/usr/bin/snmpget -v2c -Ov -OQ'
class Snmp(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "SNMP related calls through func."
+
def get(self, oid, rocommunity, hostname='localhost'):
"""
Runs an snmpget on a specific oid returns the output of the call.
diff --git a/func/minion/modules/virt.py b/func/minion/modules/virt.py
index 3671172..0da9726 100644
--- a/func/minion/modules/virt.py
+++ b/func/minion/modules/virt.py
@@ -38,6 +38,10 @@ VIRT_STATE_NAME_MAP = {
class FuncLibvirtConnection(object):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Virtualization items through func."
+
def __init__(self):
cmd = sub_process.Popen("uname -r", shell=True, stdout=sub_process.PIPE)
diff --git a/func/minion/modules/yumcmd.py b/func/minion/modules/yumcmd.py
index 8bf760c..7677c9a 100644
--- a/func/minion/modules/yumcmd.py
+++ b/func/minion/modules/yumcmd.py
@@ -21,6 +21,10 @@ class DummyCallback(object):
class Yum(func_module.FuncModule):
+ version = "0.0.1"
+ api_version = "0.0.1"
+ description = "Package updates through yum."
+
def update(self):
# XXX support updating specific rpms
ayum = yum.YumBase()