# 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'])