summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Client.py
diff options
context:
space:
mode:
authorRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 19:53:25 +0000
committerRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 19:53:25 +0000
commit06eeffe8e6344ac62b74cae38d2733b4b64900f1 (patch)
tree1ecdb4839a089176ffe84864945b9d925da6fd98 /src/lib/Server/Admin/Client.py
parentd57ec8b80f66b1618e0a1b51885a29036effa6e9 (diff)
downloadbcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.tar.gz
bcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.tar.bz2
bcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.zip
bcfg2-admin: use Bcfg2.Settings
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4133 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin/Client.py')
-rw-r--r--src/lib/Server/Admin/Client.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/Server/Admin/Client.py b/src/lib/Server/Admin/Client.py
index 677e38c2c..d08ff1283 100644
--- a/src/lib/Server/Admin/Client.py
+++ b/src/lib/Server/Admin/Client.py
@@ -5,15 +5,14 @@ import Bcfg2.Server.Admin
class Client(Bcfg2.Server.Admin.Mode):
__shorthelp__ = 'bcfg2-admin client add <client> attr1=val1 attr2=val2\nbcfg2-admin client del <client>'
__longhelp__ = __shorthelp__ + '\n\tCreate or delete client entries'
- def __init__(self, configfile):
- Bcfg2.Server.Admin.Mode.__init__(self, configfile)
- self.tree = lxml.etree.parse(self.get_repo_path() + \
+ def __init__(self):
+ Bcfg2.Server.Admin.Mode.__init__(self)
+ self.tree = lxml.etree.parse(self.repo_path + \
'/Metadata/clients.xml')
self.root = self.tree.getroot()
def __call__(self, args):
Bcfg2.Server.Admin.Mode.__call__(self, args)
- repopath = self.get_repo_path()
if args[0] == 'add':
attr_d = {}
for i in args[1:]:
@@ -29,7 +28,7 @@ class Client(Bcfg2.Server.Admin.Mode):
else:
print "No command specified"
raise SystemExit(1)
- self.tree.write(repopath + '/Metadata/clients.xml')
+ self.tree.write(self.repopath + '/Metadata/clients.xml')
def AddClient(self, client, attrs):
'''add a new client'''