disassociating a health monitor [closed]

asked 2013-12-05 17:24:22 -0600

anonymous user

Anonymous

updated 2014-01-22 15:12:26 -0600

Evgeny gravatar image

In the loadbalancer plugin, we have this following function which is called for both the delete and dissociation of the health monitor from the pool (Correct me if I am wrong). I am having problem with differentiating both the calls in the driver, as one will delete the health monitor other will just disassociates the health monitor. Any clue how can I differentiate both the operations ?

def delete_health_monitor(self, context, id):
    with context.session.begin(subtransactions=True):
        hm = self.get_health_monitor(context, id)
        qry = context.session.query(
            ldb.PoolMonitorAssociation
        ).filter_by(monitor_id=id).join(ldb.Pool)
        for assoc in qry:
            driver = self._get_driver_for_pool(context, assoc['pool_id'])
            driver.delete_pool_health_monitor(context,
                                              hm,
                                              assoc['pool_id'])
    super(LoadBalancerPlugin, self).delete_health_monitor(context, id)

Out of curiosity, isn't it be easy if we had two separate function for doing delete and disassociate ?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by rbowen
close date 2016-09-28 14:34:07.319994

Comments

Closing: This question refers to a version of OpenStack which has been designated End Of Life. (See http://releases.openstack.org ). If the problem still exists in a more recent version, please open a new issue with updated details. Thanks.

rbowen gravatar imagerbowen ( 2016-09-28 14:34:02 -0600 )edit