Initiale Version

This commit is contained in:
2013-01-10 23:35:09 +00:00
commit 9685491307
3 changed files with 112 additions and 0 deletions

49
checks.py Normal file
View File

@@ -0,0 +1,49 @@
#!/usr/bin/env python
# encoding: utf-8
"""
checks.py
Created by Marcus Stoegbauer on 2013-01-10.
Copyright (c) 2013 __MyCompanyName__. All rights reserved.
"""
import sys
import os
import platform
class checks(object):
def __init__(self):
pass
# def __init__
def __classesForHost__(self):
"""docstring for __classesForHost"""
classes = []
for c in dir(self):
if c.startswith("__"):
continue
# if __
ret = getattr(self, c)()
classes.append(ret)
# for c
return map(lambda k: (k[1],k[2]), sorted(classes, key=lambda k: k[0]))
# def __classesForHost__
def all(self):
"""docstring for all"""
return (999, "", "all")
# def all
def arch(self):
"""docstring for arch"""
return(800, "ARCH", platform.system())
# def arch
def hostname(self):
"""docstring for hostname"""
hostname = platform.node()
if hostname.count("."):
hostname = hostname.split(".")[0]
return(10, "Host", hostname)
# def hostname
# def checks