コード例 #1
0
    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
コード例 #2
0
 def role_exists(cls, value):
     if value is not None and not exists(tables.Role, value):
         raise ValueError("invalid role_id")
     return value
コード例 #3
0
 def stack_exists(cls, value):
     if value is not None and not exists(tables.Team, value):
         raise ValueError("invalid team_id")
     return value
コード例 #4
0
 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
コード例 #5
0
 def application_exists(cls, value):
     if value is not None and not exists(tables.Application, value):
         raise ValueError("invalid application_id")
     return value