]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Use proper capitalization for OVS table names
authorTerry Wilson <twilson@redhat.com>
Thu, 22 Jan 2015 07:43:09 +0000 (01:43 -0600)
committerTerry Wilson <twilson@redhat.com>
Thu, 22 Jan 2015 15:32:29 +0000 (09:32 -0600)
ovs-vsctl will convert the names for you, but native OVSDB won't.
It's always better to match case correctly when possible.

Partially-implemnts: blueprint vsctl-to-ovsdb
Change-Id: Ic782856446449a0296564cb6a0e6cf20d7ccfa7d

neutron/agent/linux/ovs_lib.py
neutron/plugins/ibm/agent/sdnve_neutron_agent.py
neutron/tests/unit/agent/linux/test_ovs_lib.py

index ac4b17491977e8b8318934ecb4432c7e90b40d40..740a72984474db4a4f0ce9e1719ad4eb67568991 100644 (file)
@@ -155,7 +155,7 @@ class OVSBridge(BaseOVS):
             check_error=True)
 
     def set_protocols(self, protocols):
-        self.set_db_attribute('bridge', self.br_name, 'protocols', protocols,
+        self.set_db_attribute('Bridge', self.br_name, 'protocols', protocols,
                               check_error=True)
 
     def create(self):
index 03be7ccf3f2f6aaa61b97f635819e7097093dbe3..ff417fbddb6c37c1ab29c031fa877c7c77af5637 100644 (file)
@@ -146,7 +146,7 @@ class SdnveNeutronAgent(object):
             if out_of_band:
                 LOG.debug("info_update received. New controller"
                           "is set to be out of band")
-                self.int_br.set_db_attribute("controller",
+                self.int_br.set_db_attribute("Controller",
                                              self.int_bridge_name,
                                              "connection-mode",
                                              "out-of-band")
@@ -175,7 +175,7 @@ class SdnveNeutronAgent(object):
         if controller_ip:
             int_br.set_controller(["tcp:" + controller_ip])
         if out_of_band:
-            int_br.set_db_attribute("controller", bridge_name,
+            int_br.set_db_attribute("Controller", bridge_name,
                                     "connection-mode", "out-of-band")
 
         return int_br
index 6df0c30447676e93e9012b98812500c0e7521722..303d3265a24441a0c811c2265dd5f1690cefd4b6 100644 (file)
@@ -126,7 +126,7 @@ class OVS_Lib_Test(base.BaseTestCase):
     def test_set_protocols(self):
         protocols = 'OpenFlow13'
         self.br.set_protocols(protocols)
-        self._verify_vsctl_mock('set', 'bridge', self.BR_NAME,
+        self._verify_vsctl_mock('set', 'Bridge', self.BR_NAME,
                                 "protocols=%s" % protocols)
 
     def test_create(self):