def check_job_binary_internal(data, **kwargs): if not (type(data) is str and len(data) > 0): raise e.BadJobBinaryInternalException() if "name" in kwargs: name = kwargs["name"] if not a.validate_name_format(name): raise e.BadJobBinaryInternalException(_("%s is not a valid name") % name)
def check_job_binary_internal(data, **kwargs): if not (type(data) is str and len(data) > 0): raise e.BadJobBinaryInternalException() if "name" in kwargs: name = kwargs["name"] if not a.validate_name_format(name): raise e.BadJobBinaryInternalException("%s is not a valid name" % name)
def check_job_binary_internal(data, **kwargs): if not is_internal_db_enabled(): raise e.BadJobBinaryInternalException( _("Sahara internal db is disabled for storing job binaries.")) if not (isinstance(data, six.binary_type) and len(data) > 0): raise e.BadJobBinaryInternalException() if "name" in kwargs: name = kwargs["name"] if not a.validate_name_format(name): raise e.BadJobBinaryInternalException( _("%s is not a valid name") % name)
def check_job_binary_internal(data, **kwargs): if not is_internal_db_enabled(): raise e.BadJobBinaryInternalException( _("Sahara internal db is disabled for storing job binaries.")) if not (isinstance(data, six.binary_type) and len(data) > 0): raise e.BadJobBinaryInternalException() if "name" in kwargs: name = kwargs["name"] if not a.validate_name_format(name): raise e.BadJobBinaryInternalException(_("%s is not a valid name") % name)