def test_acquire_service_pub_ip_info_user_specified_non_exist_fip(self):
cls = d_lb_public_ip.FloatingIpServicePubIPDriver
m_driver = mock.Mock(spec=cls)
m_driver._drv_pub_ip = public_ip.FipPubIpDriver()
neutron = self.useFixture(k_fix.MockNeutronClient()).client
floating_ip = {'floating_ip_address': '1.2.3.5',
'port_id': None}
neutron.list_floatingips.return_value = {'floatingips': [floating_ip]}
project_id = mock.sentinel.project_id
spec_type = 'LoadBalancer'
spec_lb_ip = '1.2.3.4'
self.assertIsNone(cls.acquire_service_pub_ip_info
(m_driver, spec_type,
spec_lb_ip, project_id))
评论列表
文章目录