def schema(): base = { Required("method"): Msg("minimal", "'method' should be 'minimal'"), Optional("prompts"): boot.prompts(), Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}
def schema(live=False): base = { Required("method"): Msg("depthcharge", "'method' should be 'depthcharge'"), Required("commands"): Any(str, [str]), Optional("use_bootscript"): bool, Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(live), **base}
def schema(live=False): base = { Required("method"): Msg("fastboot", "'method' should be 'fastboot'"), Optional("commands"): [str], Optional("use_bootscript"): bool, Optional("prompts"): boot.prompts(), Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(live), **base}
def schema(): base = { Required("method"): Msg("minimal", "'method' should be 'minimal'"), Optional("prompts"): boot.prompts(), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("reset"): bool, Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg("barebox", "'method' should be 'barebox'"), Required("commands"): Any(str, [str]), Optional("prompts"): boot.prompts(), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg("qemu-nfs", "'method' should be 'qemu-nfs'"), Optional("connection"): "serial", # FIXME: is this needed or required? Optional("prompts"): boot.prompts(), Optional("transfer_overlay"): boot.transfer_overlay(), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required } return {**boot.schema(), **base}
def schema(live=False): base = { Required("method"): Msg("u-boot", "'method' should be 'u-boot'"), Required("commands"): Any(str, [str]), Optional("prompts"): boot.prompts(), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("use_bootscript"): bool, Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(live), **base}
def base_schema(): return { Required("commands"): Any(str, [str]), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("boot_finished"): Any(str, [str]), Optional("expect_shell"): bool, Optional("prompts"): boot.prompts(), Optional("use_bootscript"): bool, Optional("transfer_overlay"): boot.transfer_overlay(), }
def schema(): base = { Required("method"): Msg("fastboot", "'method' should be 'fastboot'"), Optional("commands"): [str], Optional("use_bootscript"): bool, Optional("prompts"): boot.prompts(), Optional("auto_login"): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("transfer_overlay"): boot.transfer_overlay(), Optional("docker"): docker(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg( "new_connection", "'method' should be 'new_connection'" ), Required("connection"): str, Optional("prompts"): boot.prompts(), Optional( "auto_login" ): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg("fvp", "'method' should be 'fvp'"), Optional("use_telnet"): bool, Required("console_string"): str, Required("image"): str, Optional("license_variable"): str, Optional("version_string"): str, Required("arguments"): [str], Required("prompts"): boot.prompts(), Required("docker"): docker("name"), Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg("kexec", "'method' should be 'kexec'"), Required("boot_message"): str, Optional("prompts"): boot.prompts(), Optional( "auto_login" ): boot.auto_login(), # TODO: if auto_login => prompt is required Optional("command"): str, Optional("kernel"): str, Optional("dtb"): str, Optional("initrd"): str, Optional("options"): [str], Optional("kernel-config"): str, Optional("transfer_overlay"): boot.transfer_overlay(), } return {**boot.schema(), **base}