예제 #1
0
파일: baseclass.py 프로젝트: coscl/OADT
 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()
예제 #2
0
파일: baseclass.py 프로젝트: coscl/OADT
 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")