def _lb_delete(self, service_id, service_name, service_namespace): lb = LoadbalancerKM.get(service_id) if not lb: self.logger.debug( "LB doesnot exist for (%s,%s) in cfg db, return" % (service_namespace, service_name)) return self._vnc_delete_listeners(lb) self._vnc_delete_lb(service_id) LoadbalancerKM.delete(service_id)
def _delete_lb(self, uid): lb = LoadbalancerKM.get(uid) if not lb: return # Delete rules created for this member. firewall_rules = set(lb.get_firewall_rules()) for fw_rule_uuid in firewall_rules: VncIngress.delete_ingress_to_service_rule_by_id(fw_rule_uuid) lb.remove_firewall_rule(fw_rule_uuid) self._delete_all_listeners(lb) self._vnc_delete_lb(lb) LoadbalancerKM.delete(uid)