Fixing pep8 errors

This commit is contained in:
Salvatore Orlando 2011-05-13 12:54:18 +01:00
parent 5626c2fedd
commit ec5b5dd523
5 changed files with 30 additions and 26 deletions

View File

@ -24,6 +24,7 @@ methods that needs to be implemented by a Quantum Plug-in.
from abc import ABCMeta, abstractmethod
class QuantumPluginBase(object):
__metaclass__ = ABCMeta

View File

@ -17,24 +17,27 @@
import json
import routes
from common import wsgi
from webob import Response
from common import wsgi
class NetworkController(wsgi.Controller):
def version(self, request):
return "Quantum version 0.1"
class API(wsgi.Router):
def __init__(self, options):
self.options = options
mapper = routes.Mapper()
network_controller = NetworkController()
mapper.resource("net_controller", "/network", controller=network_controller)
mapper.resource("net_controller", "/network",
controller=network_controller)
mapper.connect("/", controller=network_controller, action="version")
super(API, self).__init__(mapper)
def app_factory(global_conf, **local_conf):
conf = global_conf.copy()
conf.update(local_conf)