summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2014-11-25 02:58:49 +0000
committerGerrit Code Review <review@openstack.org>2014-11-25 02:58:49 +0000
commit581977d958a456294044043e0c422303ba5a1def (patch)
tree73259cc17e5fd75c2839d60129f79c17dd80c717
parent8ea580e39d51ecdf796b473e6220bd3d76654511 (diff)
parent87311b00884eeb75568a2c7d246872e4f90d8f2c (diff)
downloadneutron-581977d958a456294044043e0c422303ba5a1def.tar.gz
Merge "BSN: include missing data in floating IP call" into stable/juno
-rw-r--r--neutron/plugins/bigswitch/servermanager.py4
-rw-r--r--neutron/tests/unit/bigswitch/test_servermanager.py8
2 files changed, 8 insertions, 4 deletions
diff --git a/neutron/plugins/bigswitch/servermanager.py b/neutron/plugins/bigswitch/servermanager.py
index 7b43ccfbcd..37169140c1 100644
--- a/neutron/plugins/bigswitch/servermanager.py
+++ b/neutron/plugins/bigswitch/servermanager.py
@@ -585,12 +585,12 @@ class ServerPool(object):
def rest_create_floatingip(self, tenant_id, floatingip):
resource = FLOATINGIPS_PATH % (tenant_id, floatingip['id'])
errstr = _("Unable to create floating IP: %s")
- self.rest_action('PUT', resource, errstr=errstr)
+ self.rest_action('PUT', resource, floatingip, errstr=errstr)
def rest_update_floatingip(self, tenant_id, floatingip, oldid):
resource = FLOATINGIPS_PATH % (tenant_id, oldid)
errstr = _("Unable to update floating IP: %s")
- self.rest_action('PUT', resource, errstr=errstr)
+ self.rest_action('PUT', resource, floatingip, errstr=errstr)
def rest_delete_floatingip(self, tenant_id, oldid):
resource = FLOATINGIPS_PATH % (tenant_id, oldid)
diff --git a/neutron/tests/unit/bigswitch/test_servermanager.py b/neutron/tests/unit/bigswitch/test_servermanager.py
index c3ea3b887a..2d239ea4c5 100644
--- a/neutron/tests/unit/bigswitch/test_servermanager.py
+++ b/neutron/tests/unit/bigswitch/test_servermanager.py
@@ -458,13 +458,17 @@ class ServerManagerTests(test_rp.BigSwitchProxyPluginV2TestCase):
def test_floating_calls(self):
pl = manager.NeutronManager.get_plugin()
with mock.patch(SERVERMANAGER + '.ServerPool.rest_action') as ramock:
- pl.servers.rest_create_floatingip('tenant', {'id': 'somefloat'})
- pl.servers.rest_update_floatingip('tenant', {'name': 'myfl'}, 'id')
+ body1 = {'id': 'somefloat'}
+ body2 = {'name': 'myfl'}
+ pl.servers.rest_create_floatingip('tenant', body1)
+ pl.servers.rest_update_floatingip('tenant', body2, 'id')
pl.servers.rest_delete_floatingip('tenant', 'oldid')
ramock.assert_has_calls([
mock.call('PUT', '/tenants/tenant/floatingips/somefloat',
+ body1,
errstr=u'Unable to create floating IP: %s'),
mock.call('PUT', '/tenants/tenant/floatingips/id',
+ body2,
errstr=u'Unable to update floating IP: %s'),
mock.call('DELETE', '/tenants/tenant/floatingips/oldid',
errstr=u'Unable to delete floating IP: %s')