Lines Matching refs:server_models
37 from autotest_lib.frontend.server import models as server_models unknown
52 server_models.validate(role=role)
62 if (role in server_models.ServerRole.ROLES_REQUIRE_UNIQUE_INSTANCE and
63 server.status == server_models.Server.STATUS.PRIMARY):
64 servers = server_models.Server.objects.filter(
65 roles__role=role, status=server_models.Server.STATUS.PRIMARY)
71 server_models.ServerRole.objects.create(server=server, role=role)
90 server_models.validate(role=role)
95 if server.status == server_models.Server.STATUS.PRIMARY:
112 server.status == server_models.Server.STATUS.PRIMARY):
128 server_models.validate(status=status)
134 status == server_models.Server.STATUS.PRIMARY):
144 role__in=server_models.ServerRole.ROLES_REQUIRE_UNIQUE_INSTANCE)
145 if unique_roles and status == server_models.Server.STATUS.PRIMARY:
147 servers = server_models.Server.objects.filter(
149 status=server_models.Server.STATUS.PRIMARY)
158 if server.status == server_models.Server.STATUS.PRIMARY:
162 enable = status == server_models.Server.STATUS.PRIMARY
195 server_models.validate(hostname=hostname, role=role)
196 server = server_models.Server.objects.create(
197 hostname=hostname, status=server_models.Server.STATUS.PRIMARY,
199 server_models.ServerRole.objects.create(server=server, role=role)
217 server.status == server_models.Server.STATUS.PRIMARY):