Lines Matching refs:server_models
38 from autotest_lib.frontend.server import models as server_models unknown
53 server_models.validate(role=role)
63 if (role in server_models.ServerRole.ROLES_REQUIRE_UNIQUE_INSTANCE and
64 server.status == server_models.Server.STATUS.PRIMARY):
65 servers = server_models.Server.objects.filter(
66 roles__role=role, status=server_models.Server.STATUS.PRIMARY)
72 server_models.ServerRole.objects.create(server=server, role=role)
91 server_models.validate(role=role)
96 if server.status == server_models.Server.STATUS.PRIMARY:
115 server.status == server_models.Server.STATUS.PRIMARY):
118 server.status = server_models.Server.STATUS.BACKUP
134 server_models.validate(status=status)
140 status == server_models.Server.STATUS.PRIMARY):
150 role__in=server_models.ServerRole.ROLES_REQUIRE_UNIQUE_INSTANCE)
151 if unique_roles and status == server_models.Server.STATUS.PRIMARY:
153 servers = server_models.Server.objects.filter(
155 status=server_models.Server.STATUS.PRIMARY)
164 if server.status == server_models.Server.STATUS.PRIMARY:
168 enable = status == server_models.Server.STATUS.PRIMARY
203 server_models.validate(hostname=hostname, role=role)
204 server = server_models.Server.objects.create(
205 hostname=hostname, status=server_models.Server.STATUS.BACKUP,
207 server_models.ServerRole.objects.create(server=server, role=role)
225 server.status == server_models.Server.STATUS.PRIMARY):