def test_delete_without_health_monitor(self):
     pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
     pool['members'] = [test_handler_member._fake_member()]
     pool['health_monitors_status'] = []
     self._test_delete(pool)
     (self.a.last_client.slb.service_group.delete.
         assert_called_with(pool['id']))
Beispiel #2
0
 def test_delete_without_health_monitor(self):
     pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
     pool['members'] = [test_handler_member._fake_member()]
     pool['health_monitors_status'] = []
     self._test_delete(pool)
     (self.a.last_client.slb.service_group.delete.assert_called_with(
         pool['id']))
    def test_delete(self):
        pool = self.fake_pool("TCP", "LEAST_CONNECTIONS")
        pool["members"] = [test_handler_member._fake_member()]
        pool["health_monitors_status"] = [{"monitor_id": "hm1"}]
        self.a.pool.delete(None, pool)

        self.print_mocks()

        (self.a.last_client.slb.service_group.delete.assert_called_with(pool["id"]))
Beispiel #4
0
    def test_delete(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{'monitor_id': 'hm1'}]
        self.a.pool.delete(None, pool)

        self.print_mocks()

        (self.a.last_client.slb.service_group.delete.assert_called_with(
            pool['id']))
    def test_delete(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{'monitor_id': 'hm1'}]
        self.a.pool.delete(None, pool)

        self.print_mocks()

        (self.a.last_client.slb.service_group.delete.
            assert_called_with(pool['id']))
    def test_delete(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{'monitor_id': 'hm1', "pools": [pool]}]
        self.a.pool.neutron.openstack_driver._pool_get_hm.return_value = test_base.FakeHM()

        self._test_delete(pool)

        (self.a.last_client.slb.service_group.delete.
            assert_called_with(pool['id']))
Beispiel #7
0
    def test_delete(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{
            'monitor_id': 'hm1',
            "pools": [pool]
        }]
        self.a.pool.neutron.openstack_driver._pool_get_hm.return_value = test_base.FakeHM(
        )

        self._test_delete(pool)

        (self.a.last_client.slb.service_group.delete.assert_called_with(
            pool['id']))
    def test_delete_with_hm_dissociates_hm(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        hm = self.fake_hm("TCP")
        hm["pools"].append(self.fake_pool('TCP', 'LEAST_CONNECTIONS'))
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{'monitor_id': 'hm1', "pools": [pool]}]

        self.a.pool.neutron.openstack_driver._pool_get_hm.return_value = hm

        self._test_delete(pool)
        self.a.last_client.slb.service_group.update.assert_called_with(
            "id1",
            health_monitor="",
            health_check_disable=True)
Beispiel #9
0
    def test_delete_with_hm_dissociates_hm(self):
        pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
        hm = self.fake_hm("TCP")
        hm["pools"].append(self.fake_pool('TCP', 'LEAST_CONNECTIONS'))
        pool['members'] = [test_handler_member._fake_member()]
        pool['health_monitors_status'] = [{
            'monitor_id': 'hm1',
            "pools": [pool]
        }]

        self.a.pool.neutron.openstack_driver._pool_get_hm.return_value = hm

        self._test_delete(pool)
        self.a.last_client.slb.service_group.update.assert_called_with(
            "id1", health_monitor="", health_check_disable=True)
Beispiel #10
0
 def test_delete_removes_monitor(self):
     pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
     pool['members'] = [test_handler_member._fake_member()]
     pool['health_monitors_status'] = [{'monitor_id': "hm1"}]
     self.a.pool.delete(None, pool)
     self.a.last_client.slb.hm.delete.assert_called()
 def test_delete_removes_monitor(self):
     pool = self.fake_pool('TCP', 'LEAST_CONNECTIONS')
     pool['members'] = [test_handler_member._fake_member()]
     pool['health_monitors_status'] = [{'monitor_id': "hm1"}]
     self.a.pool.delete(None, pool)
     self.a.last_client.slb.hm.delete.assert_called()