Ejemplo n.º 1
0
 def done(self):
     self.set_kickstart()
     self.add_cobbler_system()
     self.add_puppet_file()
     basefunction.set_hosts(self.ip, self.hostname, logger)
     
     re = os.path.exists("/var/log/openstack/nodes/%s.log" %self.hostname)
     if re == False:
         f = open("/var/log/openstack/nodes/%s.log" %self.hostname ,"w")
         f.close()
Ejemplo n.º 2
0
 def done(self ,os_file):
     self.set_result("0")
     
     self.mount_file(os_file)
     self.set_puppet()
     self.set_cobbler_cfg()
     self.set_distro()
     self.set_openstack_repo()
     self.set_kickstart_file()
     
     ip = self.ya['cobber_server']['ip']
     hostname = self.ya['cobber_server']['hostname']
     basefunction.set_hosts(ip, hostname, logger)
     
     cmd = "service xinetd restart;cobbler sync"
     re = basefunction.run_command(cmd, None, logger)
     if re == False:
         logger.error("run cmd %s error "%cmd)
         self.set_result("2")
         sys.exit("-1")
     cmd = "service rabbitmq-server restart"
     basefunction.run_command(cmd, None, logger)
     self.set_result("1")