disassociating a health monitor [closed]
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 ?
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.