def instance_group_exists(cls, value, values): if "application_id" not in values: raise ValueError( "unable to validate instance_group without a valid application_id" ) application_id = values["application_id"] if not exists(tables.ApplicationInstanceGroup, name=value, application_id=application_id): raise ValueError("invalid instance_group") return value
def role_exists(cls, value): if value is not None and not exists(tables.Role, value): raise ValueError("invalid role_id") return value
def stack_exists(cls, value): if value is not None and not exists(tables.Team, value): raise ValueError("invalid team_id") return value
def parent_stack_exists(cls, value): if value is not None and not exists(tables.Stack, value): raise ValueError("parent_stack_id is invalid") return value
def application_exists(cls, value): if value is not None and not exists(tables.Application, value): raise ValueError("invalid application_id") return value