Merged v2's API skeleton
Change-Id: I513a6171fa4c7e314e061531d79c65d655b31731
This commit is contained in:
39
surveil/api/controllers/v2/status/hosts/__init__.py
Normal file
39
surveil/api/controllers/v2/status/hosts/__init__.py
Normal file
@@ -0,0 +1,39 @@
|
||||
# Copyright 2014 - Savoir-Faire Linux inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import pecan
|
||||
from pecan import rest
|
||||
|
||||
|
||||
class HostsController(rest.RestController):
|
||||
|
||||
# curl -X GET http://127.0.0.1:8080/v2/titilambert/myproject/builds/
|
||||
# @wsme_pecan.wsexpose([Host])
|
||||
@pecan.expose()
|
||||
def get_all(self):
|
||||
"""Returns all hosts with filters ???"""
|
||||
pass
|
||||
|
||||
@pecan.expose()
|
||||
def _lookup(self, host_id, *remainder):
|
||||
return HostController(host_id), remainder
|
||||
|
||||
|
||||
class HostController(rest.RestController):
|
||||
# events = EventsController()
|
||||
# config = ConfigController()
|
||||
# services = ServicesController()
|
||||
# metrics = MetricsController()
|
||||
# externalcommands = ExternalCommandsController()
|
||||
pass
|
||||
Reference in New Issue
Block a user