]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Addressing comments from Somik
authorSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Tue, 28 Jun 2011 09:29:08 +0000 (10:29 +0100)
committerSalvatore Orlando <salvatore.orlando@eu.citrix.com>
Tue, 28 Jun 2011 09:29:08 +0000 (10:29 +0100)
.pydevproject [deleted file]
.pydevproject.moved [deleted file]
pep8.errors [deleted file]
quantum/api/ports.py
quantum/common/wsgi.py
quantum/plugins/SamplePlugin.py
quantum/plugins/openvswitch/README
tests/functional/test_service.py

diff --git a/.pydevproject b/.pydevproject
deleted file mode 100644 (file)
index 024d051..0000000
+++ /dev/null
@@ -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>
diff --git a/.pydevproject.moved b/.pydevproject.moved
deleted file mode 100644 (file)
index 024d051..0000000
+++ /dev/null
@@ -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>
diff --git a/pep8.errors b/pep8.errors
deleted file mode 100644 (file)
index 5744ad9..0000000
+++ /dev/null
@@ -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)
index 729a7182d0e884d8f104ecb85baeaed3d409e6e6..b92f33e9efbd4d084171517f561fbcef1b3a745a 100644 (file)
@@ -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))
index dc4ee1c8f2cd8f40d7b368da3b7aee6e1c9882b2..6edaf731ec051fb8ac79cd98e0a7018a986f7f65 100644 (file)
@@ -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):
index 5964beffb99d1d81b879494e619449ef672c44ff..1f7c9f8dd48ac346b1d717bcde2f16f3b6e5b1d6 100644 (file)
@@ -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
index ef0660c081e7e880e35c03730e6eef57276308a5..b44a5967242ef1cb7d1c2fd59c524f2fbdb95696 100644 (file)
@@ -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.
 
index 29d23cf3fd7f6b1409187e6efa1d71cabdcd55cf..ba4f61416b14cd85408332184fb0cf31839f2c01 100644 (file)
@@ -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)