From ec5b5dd523dc8278f8aef725c300684bc827ffb5 Mon Sep 17 00:00:00 2001 From: Salvatore Orlando Date: Fri, 13 May 2011 12:54:18 +0100 Subject: [PATCH] Fixing pep8 errors --- quantum/__init__.py | 2 +- quantum/common/__init__.py | 2 +- quantum/manager.py | 2 +- quantum/quantum_plugin_base.py | 27 ++++++++++++++------------- quantum/service.py | 23 +++++++++++++---------- 5 files changed, 30 insertions(+), 26 deletions(-) diff --git a/quantum/__init__.py b/quantum/__init__.py index df928bbf1ca..7e695ff08d5 100644 --- a/quantum/__init__.py +++ b/quantum/__init__.py @@ -13,4 +13,4 @@ # 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: Somik Behera, Nicira Networks, Inc. \ No newline at end of file +# @author: Somik Behera, Nicira Networks, Inc. diff --git a/quantum/common/__init__.py b/quantum/common/__init__.py index df928bbf1ca..7e695ff08d5 100644 --- a/quantum/common/__init__.py +++ b/quantum/common/__init__.py @@ -13,4 +13,4 @@ # 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: Somik Behera, Nicira Networks, Inc. \ No newline at end of file +# @author: Somik Behera, Nicira Networks, Inc. diff --git a/quantum/manager.py b/quantum/manager.py index b3170233509..fe08addd906 100644 --- a/quantum/manager.py +++ b/quantum/manager.py @@ -18,4 +18,4 @@ """ Manager is responsible for parsing a config file and instantiating the correct set of plugins that concretely implement quantum_plugin_base class -""" \ No newline at end of file +""" diff --git a/quantum/quantum_plugin_base.py b/quantum/quantum_plugin_base.py index 59601e9dd9e..c19febe666a 100644 --- a/quantum/quantum_plugin_base.py +++ b/quantum/quantum_plugin_base.py @@ -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 @@ -33,10 +34,10 @@ class QuantumPluginBase(object): """ Returns a dictionary containing all for - the specified tenant. + the specified tenant. """ pass - + @abstractmethod def create_network(self, tenant_id, net_name): """ @@ -44,7 +45,7 @@ class QuantumPluginBase(object): a symbolic name. """ pass - + @abstractmethod def delete_network(self, tenant_id, net_id): """ @@ -60,7 +61,7 @@ class QuantumPluginBase(object): spec """ pass - + @abstractmethod def rename_network(self, tenant_id, net_id, new_name): """ @@ -68,7 +69,7 @@ class QuantumPluginBase(object): Virtual Network. """ pass - + @abstractmethod def get_all_ports(self, tenant_id, net_id): """ @@ -76,14 +77,14 @@ class QuantumPluginBase(object): specified Virtual Network. """ pass - + @abstractmethod def create_port(self, tenant_id, net_id): """ Creates a port on the specified Virtual Network. """ pass - + @abstractmethod def delete_port(self, tenant_id, net_id, port_id): """ @@ -93,7 +94,7 @@ class QuantumPluginBase(object): is deleted. """ pass - + @abstractmethod def get_port_details(self, tenant_id, net_id, port_id): """ @@ -101,7 +102,7 @@ class QuantumPluginBase(object): that is attached to this particular port. """ pass - + @abstractmethod def plug_interface(self, tenant_id, net_id, port_id, remote_interface_id): """ @@ -109,7 +110,7 @@ class QuantumPluginBase(object): specified Virtual Network. """ pass - + @abstractmethod def unplug_interface(self, tenant_id, net_id, port_id): """ @@ -117,7 +118,7 @@ class QuantumPluginBase(object): specified Virtual Network. """ pass - + @abstractmethod def get_interface_details(self, tenant_id, net_id, port_id): """ @@ -125,11 +126,11 @@ class QuantumPluginBase(object): particular port. """ pass - + @abstractmethod def get_all_attached_interfaces(self, tenant_id, net_id): """ Retrieves all remote interfaces that are attached to a particular Virtual Network. """ - pass \ No newline at end of file + pass diff --git a/quantum/service.py b/quantum/service.py index 6a9353f9d9b..50a8effa3bc 100644 --- a/quantum/service.py +++ b/quantum/service.py @@ -17,25 +17,28 @@ import json import routes +from common import wsgi from webob import Response -from common import wsgi class NetworkController(wsgi.Controller): - - def version(self,request): + + def version(self, request): return "Quantum version 0.1" -class API(wsgi.Router): - def __init__(self, options): + +class API(wsgi.Router): + def __init__(self, options): self.options = options - mapper = routes.Mapper() + 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() + + +def app_factory(global_conf, **local_conf): + conf = global_conf.copy() conf.update(local_conf) return API(conf)