Addressing comments from Somik
This commit is contained in:
parent
1cb59504db
commit
81f9170ad5
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/quantum-api</path>
|
||||
</pydev_pathproperty>
|
||||
</pydev_project>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?eclipse-pydev version="1.0"?>
|
||||
|
||||
<pydev_project>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">python</pydev_property>
|
||||
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
|
||||
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
|
||||
<path>/quantum-api</path>
|
||||
</pydev_pathproperty>
|
||||
</pydev_project>
|
49
pep8.errors
49
pep8.errors
@ -1,49 +0,0 @@
|
||||
quantum/cli.py:39:43: W291 trailing whitespace
|
||||
quantum/cli.py:92:68: W291 trailing whitespace
|
||||
quantum/cli.py:95:62: W291 trailing whitespace
|
||||
quantum/cli.py:98:53: W291 trailing whitespace
|
||||
quantum/cli.py:110:1: W391 blank line at end of file
|
||||
quantum/manager.py:21:80: E501 line too long (94 characters)
|
||||
quantum/manager.py:37:22: E231 missing whitespace after ','
|
||||
quantum/service.py:91:39: E251 no spaces around keyword / parameter equals
|
||||
quantum/service.py:102:1: W293 blank line contains whitespace
|
||||
quantum/api/__init__.py:54:41: W291 trailing whitespace
|
||||
quantum/api/__init__.py:57:60: E251 no spaces around keyword / parameter equals
|
||||
quantum/api/faults.py:55:57: W291 trailing whitespace
|
||||
quantum/api/networks.py:81:48: E231 missing whitespace after ','
|
||||
quantum/common/exceptions.py:98:1: E302 expected 2 blank lines, found 1
|
||||
quantum/common/exceptions.py:103:1: E302 expected 2 blank lines, found 1
|
||||
quantum/plugins/SamplePlugin.py:137:30: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:139:47: E203 whitespace before ','
|
||||
quantum/plugins/SamplePlugin.py:184:1: W293 blank line contains whitespace
|
||||
quantum/plugins/SamplePlugin.py:255:38: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:258:38: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:255:21: E203 whitespace before ':'
|
||||
quantum/plugins/SamplePlugin.py:259:37: E231 missing whitespace after ':'
|
||||
quantum/plugins/SamplePlugin.py:263:38: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:266:38: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:269:21: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:263:21: E203 whitespace before ':'
|
||||
quantum/plugins/SamplePlugin.py:267:37: E231 missing whitespace after ':'
|
||||
quantum/plugins/SamplePlugin.py:280:46: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:272:29: E231 missing whitespace after ':'
|
||||
quantum/plugins/SamplePlugin.py:270:14: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:284:32: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:300:43: E231 missing whitespace after ','
|
||||
quantum/plugins/SamplePlugin.py:309:49: E251 no spaces around keyword / parameter equals
|
||||
quantum/plugins/SamplePlugin.py:318:30: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:338:19: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:341:31: E231 missing whitespace after ':'
|
||||
quantum/plugins/SamplePlugin.py:341:21: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:344:41: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:373:33: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:373:24: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:401:63: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:404:40: E225 missing whitespace around operator
|
||||
quantum/plugins/SamplePlugin.py:405:35: E231 missing whitespace after ':'
|
||||
quantum/plugins/SamplePlugin.py:409:29: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:419:20: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:432:46: E231 missing whitespace after ','
|
||||
quantum/plugins/SamplePlugin.py:436:25: W291 trailing whitespace
|
||||
quantum/plugins/SamplePlugin.py:459:46: E231 missing whitespace after ','
|
||||
quantum/plugins/SamplePlugin.py:482:80: E501 line too long (99 characters)
|
@ -133,8 +133,8 @@ class Controller(common.QuantumController):
|
||||
|
||||
def get_resource(self, request, tenant_id, network_id, id):
|
||||
try:
|
||||
result = self.network_manager.get_interface_details(
|
||||
tenant_id, network_id, id)
|
||||
result = self.network_manager.get_port_details(
|
||||
tenant_id, network_id, id).get('attachment', None)
|
||||
return dict(attachment=result)
|
||||
except exception.NetworkNotFound as e:
|
||||
return faults.Fault(faults.NetworkNotFound(e))
|
||||
|
@ -294,7 +294,6 @@ class Router(object):
|
||||
Route the incoming request to a controller based on self.map.
|
||||
If no match, return a 404.
|
||||
"""
|
||||
LOG.debug("HERE - wsgi.Router.__call__")
|
||||
return self._router
|
||||
|
||||
@staticmethod
|
||||
@ -328,7 +327,6 @@ class Controller(object):
|
||||
"""
|
||||
Call the method specified in req.environ by RoutesMiddleware.
|
||||
"""
|
||||
LOG.debug("HERE - wsgi.Controller.__call__")
|
||||
arg_dict = req.environ['wsgiorg.routing_args'][1]
|
||||
action = arg_dict['action']
|
||||
method = getattr(self, action)
|
||||
@ -419,7 +417,6 @@ class Serializer(object):
|
||||
The string must be in the format of a supported MIME type.
|
||||
|
||||
"""
|
||||
LOG.debug("Deserialize invoked:%s", datastring)
|
||||
return self.get_deserialize_handler(content_type)(datastring)
|
||||
|
||||
def get_deserialize_handler(self, content_type):
|
||||
|
@ -113,20 +113,6 @@ class QuantumEchoPlugin(object):
|
||||
"""
|
||||
print("unplug_interface() called\n")
|
||||
|
||||
def get_interface_details(self, tenant_id, net_id, port_id):
|
||||
"""
|
||||
Retrieves the remote interface that is attached at this
|
||||
particular port.
|
||||
"""
|
||||
print("get_interface_details() called\n")
|
||||
|
||||
def get_all_attached_interfaces(self, tenant_id, net_id):
|
||||
"""
|
||||
Retrieves all remote interfaces that are attached to
|
||||
a particular Virtual Network.
|
||||
"""
|
||||
print("get_all_attached_interfaces() called\n")
|
||||
|
||||
|
||||
class DummyDataPlugin(object):
|
||||
|
||||
@ -240,11 +226,11 @@ class FakePlugin(object):
|
||||
'port-state': 'DOWN',
|
||||
'attachment': None},
|
||||
2: {'port-id': 2,
|
||||
'port-state': 'UP',
|
||||
'port-state': 'ACTIVE',
|
||||
'attachment': None}}
|
||||
_port_dict_2 = {
|
||||
1: {'port-id': 1,
|
||||
'port-state': 'UP',
|
||||
'port-state': 'ACTIVE',
|
||||
'attachment': 'SomeFormOfVIFID'},
|
||||
2: {'port-id': 2,
|
||||
'port-state': 'DOWN',
|
||||
@ -418,15 +404,6 @@ class FakePlugin(object):
|
||||
except KeyError:
|
||||
raise exc.PortNotFound(net_id=net_id, port_id=port_id)
|
||||
|
||||
def get_interface_details(self, tenant_id, net_id, port_id):
|
||||
"""
|
||||
Retrieves the remote interface that is attached at this
|
||||
particular port.
|
||||
"""
|
||||
print("get_interface_details() called\n")
|
||||
port = self._get_port(tenant_id, net_id, port_id)
|
||||
return port['attachment']
|
||||
|
||||
def plug_interface(self, tenant_id, net_id, port_id, remote_interface_id):
|
||||
"""
|
||||
Attaches a remote interface to the specified port on the
|
||||
@ -452,14 +429,3 @@ class FakePlugin(object):
|
||||
# TODO(salvatore-orlando):
|
||||
# Should unplug on port without attachment raise an Error?
|
||||
port['attachment'] = None
|
||||
|
||||
def get_all_attached_interfaces(self, tenant_id, net_id):
|
||||
"""
|
||||
Retrieves all remote interfaces that are attached to
|
||||
a particular Virtual Network.
|
||||
"""
|
||||
print("get_all_attached_interfaces() called\n")
|
||||
# returns a list of all attached remote interfaces
|
||||
vifs_on_net = ["/tenant1/networks/net_id/portid/vif2.0",
|
||||
"/tenant1/networks/10/121/vif1.1"]
|
||||
return vifs_on_net
|
||||
|
@ -79,10 +79,10 @@ $ /etc/xapi.d/plugins/ovs_quantum_agent.py /etc/xapi.d/plugins/ovs_quantum_plugi
|
||||
# -- Getting quantum up and running
|
||||
|
||||
- Start quantum [on the quantum service host]:
|
||||
~/src/quantum- $ PYTHONPATH=.:$PYTHONPATH python bin/quantum etc/quantum.conf
|
||||
~/src/quantum $ PYTHONPATH=.:$PYTHONPATH python bin/quantum etc/quantum.conf
|
||||
- Run ovs_quantum_plugin.py via the quantum plugin framework cli [on the
|
||||
quantum service host]
|
||||
~/src/quantum-framework$ PYTHONPATH=.:$PYTHONPATH python quantum/cli.py
|
||||
~/src/quantum$ PYTHONPATH=.:$PYTHONPATH python quantum/cli.py
|
||||
|
||||
This will show help all of the available commands.
|
||||
|
||||
|
@ -49,8 +49,7 @@ def print_response(res):
|
||||
class QuantumTest(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.client = MiniClient(HOST, PORT, USE_SSL)
|
||||
|
||||
|
||||
|
||||
def create_network(self, data):
|
||||
content_type = "application/" + FORMAT
|
||||
body = Serializer().serialize(data, content_type)
|
||||
|
Loading…
Reference in New Issue
Block a user