def test_vip_create(self): vip1 = self.api_vips.first() form_data = {'address': vip1['address'], 'name': vip1['name'], 'description': vip1['description'], 'subnet_id': vip1['subnet_id'], 'protocol_port': vip1['protocol_port'], 'protocol': vip1['protocol'], 'pool_id': vip1['pool_id'], 'session_persistence': vip1['session_persistence'], 'connection_limit': vip1['connection_limit'], 'admin_state_up': vip1['admin_state_up'] } vip = {'vip': self.api_vips.first()} quantumclient.create_vip({'vip': form_data}).AndReturn(vip) self.mox.ReplayAll() ret_val = api.lbaas.vip_create(self.request, **form_data) self.assertIsInstance(ret_val, api.lbaas.Vip)
def test_vip_create(self): vip1 = self.api_vips.first() form_data = { "address": vip1["address"], "name": vip1["name"], "description": vip1["description"], "subnet_id": vip1["subnet_id"], "protocol_port": vip1["protocol_port"], "protocol": vip1["protocol"], "pool_id": vip1["pool_id"], "session_persistence": vip1["session_persistence"], "connection_limit": vip1["connection_limit"], "admin_state_up": vip1["admin_state_up"], } vip = {"vip": self.api_vips.first()} quantumclient.create_vip({"vip": form_data}).AndReturn(vip) self.mox.ReplayAll() ret_val = api.lbaas.vip_create(self.request, **form_data) self.assertIsInstance(ret_val, api.lbaas.Vip)
def test_vip_create(self): vip1 = self.api_vips.first() form_data = { 'address': vip1['address'], 'name': vip1['name'], 'description': vip1['description'], 'subnet_id': vip1['subnet_id'], 'protocol_port': vip1['protocol_port'], 'protocol': vip1['protocol'], 'pool_id': vip1['pool_id'], 'session_persistence': vip1['session_persistence'], 'connection_limit': vip1['connection_limit'], 'admin_state_up': vip1['admin_state_up'] } vip = {'vip': self.api_vips.first()} quantumclient.create_vip({'vip': form_data}).AndReturn(vip) self.mox.ReplayAll() ret_val = api.lbaas.vip_create(self.request, **form_data) self.assertIsInstance(ret_val, api.lbaas.Vip)