RootController: Use an index method instead of get

The index method authorizes HEAD request, which are handy for load
balancers.

Change-Id: Iab12c89641ffd725c3fb8a6e097020a696f84a97
This commit is contained in:
Gauvain Pocentek 2016-07-21 12:29:37 +02:00
parent c05efd2f97
commit e43ba189c6
2 changed files with 13 additions and 1 deletions

View File

@ -117,7 +117,7 @@ class RootController(rest.RestController):
v1 = v1_api.V1Controller()
@wsme_pecan.wsexpose([APIVersion])
def get(self):
def index(self):
"""Return the version list
"""

View File

@ -0,0 +1,12 @@
fixtures:
- ConfigFixture
tests:
- name: test if / is publicly available
url: /
status: 200
- name: test if HEAD / is available
url: /
status: 200
method: HEAD