Merged v2's API skeleton

Change-Id: I513a6171fa4c7e314e061531d79c65d655b31731
This commit is contained in:
aviau
2015-03-20 14:24:11 -04:00
parent 29592863cc
commit 6e63b9827f
20 changed files with 654 additions and 0 deletions

View 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