def build_boot_image(node, template, net_template): if node['os'] in [ "centos7.3", "centos7.4", "redhat7.2", "rhvh4.1", "redhat7.5", "centos7.5" ]: return Kickstart.build_boot_image(node, template) if node['os'] in ["esxi6.0", "esxi6.5", "esxi6.7"]: return VMware.build_boot_image(node, template) if node['os'] in ["win2012r2", "win2016"]: return Windows.build_boot_image(node, template, net_template) return 1, "no os is built! for os %s and node {0}".format( node['os'], node['name'])
def build_boot_image(node, template, net_template): """ template is the kickstart, answer, preseed file net_template is the network file for windows and the initrd for ubuntu """ if node['os'] in ["centos7.3", "centos7.4", "redhat7.2", "rhvh4.1", "redhat7.5", "centos7.5"]: return Kickstart.build_boot_image(node, template) if node['os'] in ["esxi6.0", "esxi6.5", "esxi6.7"]: return VMware.build_boot_image(node, template) if node['os'] in ["ubuntu18.04"]: return Ubuntu.build_boot_image(node, template, net_template) if node['os'] in ["win2012r2", "win2016"]: return Windows.build_boot_image(node, template, net_template) return 1, "no os is built! for os %s and node {0}".format(node['os'], node['name'])