Logo Search packages:      
Sourcecode: orchestra version File versions  Download package

import-machines.py

import os
fp = open("machines.list")
ip = 200
domain = "local.domain"
for machine in fp.readlines():
    print "DEBUG: Importing [%s]" % machine.split()[0]
    os.system('sudo cobbler system add --name="%s.%s" --mac-address="%s" --ip-address="172.16.16.%i" --dns-name="%s.%s" --hostname="%s.%s" --profile="oneiric-x86_64-juju" --mgmt-classes="orchestra-juju-available" --kopts="console=ttyS0,9600n8 netcfg/dhcp_timeout=120 netcfg/choose_int
rface=eth0" --power-address=%s' % (machine.split()[0], domain, machine.split()[1], ip, machine.split()[0], domain, machine.split()[0], domain, machine.split()[1]))
    ip = ip + 1
fp.close


Generated by  Doxygen 1.6.0   Back to index