def test_delete_e(self): try: with a10.A10DeleteContext(self.handler, self.ctx, self.m) as c: c raise FakeException() except FakeException: self.empty_close_mocks()
def delete(self, context, l7rule): with a10.A10DeleteContext(self, context, l7rule): policy = l7rule.policy rules = l7rule.policy.rules for index, rule in enumerate(rules): if rule.id == l7rule.id: del rules[index] break policy.rules = rules l7rule.policy = policy self.create(context, l7rule)
def delete(self, context, pool): with a10.A10DeleteContext(self, context, pool) as c: debug_fmt = "handler_pool.delete(): removing member {0} from pool {1}" for member in pool.members: LOG.debug(debug_fmt.format(member, member.pool_id)) self.a10_driver.member._delete(c, context, member) LOG.debug("handler_pool.delete(): Checking pool health monitor...") if pool.healthmonitor: # The pool.healthmonitor we get doesn't have a pool # Make a new one with the hm as the root hm = copy.copy(pool.healthmonitor) hm.pool = copy.copy(pool) hm.pool.healthmonitor = None LOG.debug("handler_pool.delete(): HM: %s" % hm) self.a10_driver.hm._delete(c, context, hm) try: c.client.slb.service_group.delete(self._meta_name(pool)) except (acos_errors.NotFound, acos_errors.NoSuchServiceGroup): pass handler_persist.PersistHandler( c, context, pool, self._meta_name(pool)).delete()
def delete(self, context, lb): with a10.A10DeleteContext(self, context, lb) as c: self._delete(c, context, lb) self.hooks.after_vip_delete(c, context, lb)
def test_delete(self): with a10.A10DeleteContext(self.handler, self.ctx, self.m) as c: c self.print_mocks() self.a.openstack_driver.pool.successful_completion.assert_called_with( self.ctx, self.m, delete=True)
def delete(self, context, hm): with a10.A10DeleteContext(self, context, hm) as c: self._delete(c, context, hm)
def delete(self, context, member): with a10.A10DeleteContext(self, context, member) as c: self._delete(c, context, member)
def delete(self, context, listener): with a10.A10DeleteContext(self, context, listener) as c: self._delete(c, context, listener)
def delete(self, context, l7policy): with a10.A10DeleteContext(self, context, l7policy) as c: self._delete(c, context, l7policy)
def test_delete(self): with a10.A10DeleteContext(self.handler, self.ctx, self.m) as c: c self.a.openstack_driver.pool.db_delete.assert_called_with( None, 'fake-id-001')