Fixing pep8 errors
This commit is contained in:
parent
5626c2fedd
commit
ec5b5dd523
@ -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.
|
||||
# @author: Somik Behera, Nicira Networks, Inc.
|
||||
|
@ -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.
|
||||
# @author: Somik Behera, Nicira Networks, Inc.
|
||||
|
@ -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
|
||||
"""
|
||||
"""
|
||||
|
@ -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
|
||||
<network_uuid, network_name> 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
|
||||
pass
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user