Merge "Fix URL used in NCS mechanism driver sync_full() operation"

This commit is contained in:
Jenkins 2013-09-21 17:24:31 +00:00 committed by Gerrit Code Review
commit 08a3386a6b
2 changed files with 7 additions and 1 deletions

View File

@ -116,7 +116,7 @@ class NCSMechanismDriver(api.MechanismDriver):
json = {'openstack': {'network': networks, json = {'openstack': {'network': networks,
'subnet': subnets, 'subnet': subnets,
'port': ports}} 'port': ports}}
self.sendjson('put', self.url, json) self.sendjson('put', '', json)
self.out_of_sync = False self.out_of_sync = False
def sync_object(self, operation, object_type, context): def sync_object(self, operation, object_type, context):

View File

@ -14,6 +14,7 @@
# under the License. # under the License.
from neutron.plugins.ml2 import config as config from neutron.plugins.ml2 import config as config
from neutron.plugins.ml2.drivers import mechanism_ncs
from neutron.tests.unit import test_db_plugin as test_plugin from neutron.tests.unit import test_db_plugin as test_plugin
PLUGIN_NAME = 'neutron.plugins.ml2.plugin.Ml2Plugin' PLUGIN_NAME = 'neutron.plugins.ml2.plugin.Ml2Plugin'
@ -31,6 +32,11 @@ class NCSTestCase(test_plugin.NeutronDbPluginV2TestCase):
self.addCleanup(config.cfg.CONF.reset) self.addCleanup(config.cfg.CONF.reset)
super(NCSTestCase, self).setUp(PLUGIN_NAME) super(NCSTestCase, self).setUp(PLUGIN_NAME)
self.port_create_status = 'DOWN' self.port_create_status = 'DOWN'
mechanism_ncs.NCSMechanismDriver.sendjson = self.check_sendjson
def check_sendjson(self, method, urlpath, obj):
# Confirm fix for bug #1224981
self.assertFalse(urlpath.startswith("http://"))
class NCSMechanismTestBasicGet(test_plugin.TestBasicGet, NCSTestCase): class NCSMechanismTestBasicGet(test_plugin.TestBasicGet, NCSTestCase):