summaryrefslogtreecommitdiff
path: root/tko/machine_load
blob: b8c0472160ac5ad533b2fd1f5af8534b9d955a15 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/python
import db

db = db.db()

for line in open('machines', 'r').readlines():
    (machine, group) = line.rstrip().split()
    print 'X %s Y %s' % (machine, group)
    set = { 'machine_group' : group }
    where = { 'hostname' : machine }
    db.update('machines', set, where)