summaryrefslogtreecommitdiffstats
path: root/src/lib/Server
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2004-10-22 03:25:58 +0000
committerNarayan Desai <desai@mcs.anl.gov>2004-10-22 03:25:58 +0000
commit01a1e597b1c39511a950771ef8d5f67e9dc3bc30 (patch)
tree8e2f5c57dcb33851dc30fbcf7d0d1343abafa9b7 /src/lib/Server
parentc1e6ffa8a74b101b7df7fa41fb85ea72c3bbc89f (diff)
downloadbcfg2-01a1e597b1c39511a950771ef8d5f67e9dc3bc30.tar.gz
bcfg2-01a1e597b1c39511a950771ef8d5f67e9dc3bc30.tar.bz2
bcfg2-01a1e597b1c39511a950771ef8d5f67e9dc3bc30.zip
Delete: src/lib/Server/Types.py
}(Logical change 1.109) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@490 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server')
-rw-r--r--src/lib/Server/Types.py59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/lib/Server/Types.py b/src/lib/Server/Types.py
deleted file mode 100644
index 3ec7a0469..000000000
--- a/src/lib/Server/Types.py
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/usr/bin/env python
-
-from binascii import b2a_base64
-from string import join
-
-class ConfigFile(object):
- format="<ConfigFile name='%s' owner='%s' group='%s' perms='%s' encoding='%s'>%s</ConfigFile>"
- def __init__(self,name,owner,group,perms,content,encoding='ascii'):
- self.name=name
- self.owner=owner
- self.group=group
- self.perms=perms
- self.content=content
- self.encoding=encoding
- if encoding == 'base64':
- self.xcontent=b2a_base64(content)
- else:
- self.xcontent=self.content
-
- def toxml(self):
- return self.format%(self.name,self.owner,self.group,self.perms,self.encoding,self.xcontent)
-
-class Service(object):
- format = '''<Service name='%s' type='%s' status='%s' scope='%s'/>'''
-
- def __init__(self,name,stype,status,scope):
- self.name = name
- self.type = stype
- self.status = status
- self.scope = scope
-
- def toxml(self):
- return self.format%(self.name,self.type,self.status,self.scope)
-
-class Package(object):
- format = '''<Package name='%s' type='%s' url='%s'/>'''
-
- def __init__(self, name, t, url):
- self.name = name
- self.type = t
- self.url = url
-
- def toxml(self):
- return self.format%(self.name, self.type, self.url)
-
-class Clause(list):
- format = '''<%s name='%s'>%%s</%s>'''
-
- def __init__(self, t, name, data=None):
- list.__init__(self)
- self.type = t
- self.name = name
- if data:
- self.extend(data)
-
- def toxml(self):
- r = self.format%(self.type,self.name,self.type)
- children = map(lambda x:x.toxml(), self)
- return r%(join(children,''))