def validate_input():
    marathon_version = MarathonConfig.marathon_version()
    if marathon_version == "":
        Utils.exit_with_cmd_error( __file__, "Marathon version not given. Run with show-releases to see what the available versions are.")
    if not marathon_version in list_releases():
        Utils.exit_with_cmd_error( __file__,
                                   "Marathon version ({}) is not supported. Run with show-releases to see what the available versions are.".format(
                                    marathon_version ))
def validate_input():
    chronos_version = ChronosConfig.chronos_version()
    if chronos_version == "":
        Utils.exit_with_cmd_error( __file__, "Chronos version not given. Run with show-releases to see what the available versions are.")
    if not chronos_version in list_releases():
        Utils.exit_with_cmd_error( __file__,
                                   "Chronos version ({}) is not supported. Run with show-releases to see what the available versions are.".format(
                                    chronos_version ))
def validate_input():
    mesos_version = MesosConfig.mesos_version()
    operating_system = MesosConfig.operating_system()
    if mesos_version == "":
        Utils.exit_with_cmd_error( __file__, "Mesos version not given. Run with show-releases to see what the available versions are.")
    if operating_system == "":
        Utils.exit_with_cmd_error( __file__, "Operating system not given. Available values: {}".format( str(MesosConfig.supported_operating_systems()) ))
    if not mesos_version in list_releases():
        Utils.exit_with_cmd_error( __file__,
                                   "Mesos version ({}) is not supported. Run with show-releases to see what the available versions are.".format(
                                    mesos_version ))
    if not operating_system in MesosConfig.supported_operating_systems():
        Utils.exit_with_cmd_error( __file__,
                                   "Operating system ({}) is not supported. Available values: {}".format(
                                    operating_system,
                                    str(MesosConfig.supported_operating_systems()) ))
    if operating_system == "osx" and Utils.platform() != "darwin":
        Utils.exit_with_cmd_error( __file__, "Operating system (osx) is only supported when running this program on OS X." )
def validate_input():
    mesos_build = VagrantConfig.mesos_build()
    marathon_build = VagrantConfig.marathon_build()
    operating_system = VagrantConfig.operating_system()

    if operating_system not in VagrantConfig.supported_operating_systems():
        Utils.exit_with_cmd_error( __file__,
                                   "Operating system ({}) is not supported. Available values: {}".format(
                                    operating_system,
                                    str(VagrantConfig.supported_operating_systems()) ))
    
    if mesos_build == "":
        Utils.exit_with_cmd_error( __file__, "Mesos build version not given. Run mesos-toolbox show-builds to see what the available builds are.")
    if marathon_build == "":
        Utils.exit_with_cmd_error( __file__, "Marathon build version not given. Run marathon-toolbox show-builds to see what the available builds are.")
    mesos_build_name = "{}-{}".format(VagrantConfig.mesos_build(), VagrantConfig.operating_system().replace(":", "-"))
    if mesos_build_name not in Utils.list_builds("{}/mesos".format(VagrantConfig.mesos_packages_dir())):
        Utils.exit_with_cmd_error( __file__, "Mesos build {} does not exist. Please build that version first with mesos-toolbox.".format(mesos_build_name))
    if VagrantConfig.marathon_build() not in Utils.list_builds(VagrantConfig.marathon_packages_dir()):
        Utils.exit_with_cmd_error( __file__, "Marathon build {} does not exist. Please build that version first with mesos-toolbox.".format(VagrantConfig.marathon_build()))