def schema(): base = { Required("to"): "docker", Required("image"): Any(docker_image_format, docker("name")), Optional("repeat"): Range(min=1), } return {**deploy.schema(), **base}
def schema(): extra = { Optional("apply-overlay"): bool, Optional("root_partition"): Range(min=0), Optional("sparse"): bool, Optional("reboot"): Any( "hard-reset", "fastboot-reboot", "fastboot-reboot-bootloader", "fastboot-reboot-fastboot", ), } base = { Required("to"): "fastboot", Required("images"): { Required(str, "'images' is empty"): deploy.url(extra) }, Optional("docker"): docker(), Optional("connection"): "lxc", # FIXME: other possible values? } return {**deploy.schema(), **base}
def schema(): base = { Required("method"): Msg("uuu", "'method' should be 'uuu'"), Required("commands"): Any(str, [{ str: str }]), Optional("docker"): docker(), } return {**boot.schema(), **base}
def schema(): base = { Required("method"): Msg("fvp", "'method' should be 'fvp'"), 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"), } return {**boot.schema(), **base}
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("fvp", "'method' should be 'fvp'"), Optional("use_telnet"): bool, Required("console_string"): str, Optional("feedbacks"): [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(), Optional("auto_login"): boot.auto_login(), } return {**boot.schema(), **base}
def schema(): docker_test_shell_base = { Required("docker"): docker(), Optional("downloads-namespace"): str, } return {**base(), **docker_test_shell_base}
def qemu_docker(): return {**docker(), Optional("binary"): str}
def schema(): return {**base(), Required("docker"): docker()}
# (at your option) any later version. # # LAVA is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along # with this program; if not, see <http://www.gnu.org/licenses>. from voluptuous import Optional, Required from lava_common.schemas import deploy from lava_common.schemas import docker postprocess_with_docker = {**docker(), Required("steps"): [str]} def schema(): base = { Required("to"): "downloads", Required("images"): { Required(str, "'images' is empty"): deploy.url() }, Optional("postprocess"): { Required("docker"): postprocess_with_docker }, } return {**deploy.schema(), **base}