summaryrefslogtreecommitdiffstats
path: root/tools/hostbasepush.py
diff options
context:
space:
mode:
authorKen Raffenetti <raffenet@mcs.anl.gov>2006-11-14 17:31:52 +0000
committerKen Raffenetti <raffenet@mcs.anl.gov>2006-11-14 17:31:52 +0000
commit5b094157601de9897092f2372f7a15542495136d (patch)
treed91a3f186284f3fb184a461637d92e0fff78d5bf /tools/hostbasepush.py
parent96588b2fa6a602e020403a9452dcb4b56b7d48c5 (diff)
downloadbcfg2-5b094157601de9897092f2372f7a15542495136d.tar.gz
bcfg2-5b094157601de9897092f2372f7a15542495136d.tar.bz2
bcfg2-5b094157601de9897092f2372f7a15542495136d.zip
adding Hostbase push tool
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@2496 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'tools/hostbasepush.py')
-rwxr-xr-xtools/hostbasepush.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/hostbasepush.py b/tools/hostbasepush.py
new file mode 100755
index 000000000..61f2e046b
--- /dev/null
+++ b/tools/hostbasepush.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+
+__revision__ = "$Revision: $"
+
+import Bcfg2.Client.Proxy, os
+
+if not os.getuid() == 0:
+ print 'this command must be run as root'
+ raise SystemExit
+
+proxy = Bcfg2.Client.Proxy.bcfg2()
+print 'building files...'
+proxy.run_method('Hostbase.rebuildState', ())
+print 'running bcfg...'
+os.system('bcfg2 -q -d -v')
+