Beispiel #1
0
 def postNetworkInfo(self):
     #Convert from 08:00:27:bd:08:a1 to 080027BD08A1
     worker_mac = NetUtils.getHwAddress('xenbr0')
     worker_mac = string.upper(worker_mac)
     worker_mac = ''.join(worker_mac.split(':'))
     worker_ip = NetUtils.getIpAddress('xenbr0')
     self.devcloud.execute("echo %s > %s/%s" % (worker_ip, args.out, worker_mac))
Beispiel #2
0
 def __init__(self):
     self.TEST_HOME = '/opt/cloudstack/incubator-cloudstack'
     self.SED_DFLTIP1 = ''.join(['\/', '192.168.56.10', '\/'])
     self.SED_DFLTIP2 = ''.join(['\/', '192.168.56.10', ':'])
     self.SED_XENBR01 = ''.join(['\/', str(NetUtils.getIpAddress('xenbr0')), '\/'])
     self.SED_XENBR02 = ''.join(['\/', str(NetUtils.getIpAddress('xenbr0')), ':'])
     self.MARVIN_CFG = path.join(self.TEST_HOME, 'tools/devcloud/devcloud.cfg')
     self.resultXml = None
Beispiel #3
0
def run(worker, install_marvin):
    worker.cleanUp()
    repo_head = worker.fastForwardRepo()
    if worker.buildCloudStack():
        if install_marvin:
            logging.debug("Installing marvin")
            worker.installMarvin()
    else:
        raise Exception("cloudstack build has failed. exiting")
        
    if worker.startManagement():
        if not worker.configure():
            raise Exception("failed to setup cloudstack zone")
    else:
        raise Exception("mgmt server didn't startup in time")

    #FIXME: override/db.properties should be able to update the host
    bash("mysql -uroot -Dcloud -e\"update configuration set value='%s' where "
         "name='host'\""%NetUtils.getIpAddress('xenbr0'))

    worker.cleanUp()
    if worker.startManagement():
        worker.runTests(repo_head)
    else:
        raise Exception("mgmt server did not startup in time")
    return worker.getResultXml()