cloudkitty/cloudkitty/cli/api.py
zhangguoqing 3ffa3fabd8 Improve the rpc module
1. Removed the rpc module and replaced it with messaging.
2. Simplified the service part and RPCHook for api.

Change-Id: Ia1c09081db5ae058cd4b39e083cf28a97130c48f
2016-08-24 15:20:13 +00:00

33 lines
923 B
Python

# -*- coding: utf-8 -*-
# Copyright 2014 Objectif Libre
#
# 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.
#
# @author: Stéphane Albert
#
from cloudkitty.api import app
from cloudkitty import service
def main():
service.prepare_service()
server = app.build_server()
try:
server.serve_forever()
except KeyboardInterrupt:
pass
if __name__ == '__main__':
main()