コード例 #1
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.TestRun.objects.all()
     resource_name = 'testruns'
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
コード例 #2
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.ConfigIngredient.objects.all()
     filtering = {
         'name': ALL,
     }
     resource_name = 'ingredients'
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
コード例 #3
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.Release.objects.select_related('build').all()
     resource_name = 'releases'
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
     filtering = {
         'build': ALL_WITH_RELATIONS,
     }
コード例 #4
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.BuildPack.objects.all()
     resource_name = 'buildpacks'
     filtering = {
         'repo_url': ALL,
         'repo_type': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
コード例 #5
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.Squad.objects.all()
     resource_name = 'squads'
     filtering = {
         'hosts': ALL_WITH_RELATIONS,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
     detail_uri_name = 'name'
コード例 #6
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.Host.objects.select_related('squad').all()
     resource_name = 'hosts'
     filtering = {
         'name': ALL,
         'active': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
     detail_uri_name = 'name'
コード例 #7
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.OSStack.objects.all()
     resource_name = 'stacks'
     filtering = {
         'id': ALL,
         'name': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
     detail_uri_name = 'name'
コード例 #8
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = User.objects.all()
     resource_name = 'user'
     excludes = [
         'email', 'password', 'is_active', 'is_staff', 'is_superuser'
     ]
     filtering = {
         'username': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
コード例 #9
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.DeploymentLogEntry.objects.all()
     resource_name = 'logs'
     filtering = {
         'type': ALL,
         'time': ALL,
         'user': ALL_WITH_RELATIONS,
         'message': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
コード例 #10
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.App.objects.select_related('buildpack',
                                                  'stack').all()
     resource_name = 'apps'
     filtering = {
         'id': ALL,
         'name': ALL,
         'buildpack': ALL_WITH_RELATIONS,
         'stack': ALL_WITH_RELATIONS,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()
     detail_uri_name = 'name'
コード例 #11
0
ファイル: resources.py プロジェクト: yougov/vr.server
 class Meta:
     queryset = models.Swarm.objects.select_related(
         'app', 'squad', 'release').prefetch_related(
             'config_ingredients',
             'squad__hosts',
             'release__build',
             'release__build__app',
         ).all()
     resource_name = 'swarms'
     filtering = {
         'ingredients': ALL_WITH_RELATIONS,
         'squad': ALL_WITH_RELATIONS,
         'app': ALL_WITH_RELATIONS,
         'proc_name': ALL,
         'config_name': ALL,
         'pool': ALL,
     }
     authentication = auth.MultiAuthentication(
         auth.BasicAuthentication(),
         auth.SessionAuthentication(),
     )
     authorization = Authorization()