def create_scripts(dir_name): dir_path = os.path.dirname(os.path.realpath(__file__)) scripts_dir = os.path.join(dir_path, "scripts") for script_file in os.listdir(scripts_dir): script_path = os.path.join(scripts_dir, script_file) data = read_file(script_path) with open(os.path.join(dir_name, script_file), "w+") as fd: fd.write(data)
class VM_AHV_Small_Substrate(Substrate): os_type = "Windows" provider_type = "AHV_VM" provider_spec = read_provider_spec("specs/vdi-spec.yaml") provider_spec.spec["resources"]["guest_customization"]["sysprep"][ "unattend_xml"] = read_file(os.path.join("scripts", "Autounattend.xml")) readiness_probe = { "credential": ref(Windows_Local_Administrator), "connection_type": "POWERSHELL", "connection_port": 5985, "delay_secs": "120", "retries": "20", }