Add bw, dns, and uptime checks.
[myops.git] / web / collect / client / DNS / Class.py
1 """
2 $Id: Class.py,v 1.6.2.1 2011/03/16 20:06:39 customdesigned Exp $
3
4  This file is part of the pydns project.
5  Homepage: http://pydns.sourceforge.net
6
7  This code is covered by the standard Python License. See LICENSE for details.
8
9  CLASS values (section 3.2.4)
10 """
11
12
13 IN = 1          # the Internet
14 CS = 2          # the CSNET class (Obsolete - used only for examples in
15                 # some obsolete RFCs)
16 CH = 3          # the CHAOS class. When someone shows me python running on
17                 # a Symbolics Lisp machine, I'll look at implementing this.
18 HS = 4          # Hesiod [Dyer 87]
19
20 # QCLASS values (section 3.2.5)
21
22 ANY = 255       # any class
23
24
25 # Construct reverse mapping dictionary
26
27 _names = dir()
28 classmap = {}
29 for _name in _names:
30     if _name[0] != '_': classmap[eval(_name)] = _name
31
32 def classstr(klass):
33     if classmap.has_key(klass): return classmap[klass]
34     else: return `klass`
35
36 #
37 # $Log: Class.py,v $
38 # Revision 1.6.2.1  2011/03/16 20:06:39  customdesigned
39 # Refer to explicit LICENSE file.
40 #
41 # Revision 1.6  2002/04/23 12:52:19  anthonybaxter
42 # cleanup whitespace.
43 #
44 # Revision 1.5  2002/03/19 12:41:33  anthonybaxter
45 # tabnannied and reindented everything. 4 space indent, no tabs.
46 # yay.
47 #
48 # Revision 1.4  2002/03/19 12:26:13  anthonybaxter
49 # death to leading tabs.
50 #
51 # Revision 1.3  2001/08/09 09:08:55  anthonybaxter
52 # added identifying header to top of each file
53 #
54 # Revision 1.2  2001/07/19 06:57:07  anthony
55 # cvs keywords added
56 #
57 #