def remove_external_address_block(self, context, cidr):
        LOG.audit(_('Removing ip block from %s'), cidr, context=context)
        cidr = urllib.unquote(cidr).decode()
        # raise if invalid
        netaddr.IPNetwork(cidr)
        rules = db.provider_fw_rule_get_all_by_cidr(context, cidr)
        for rule in rules:
            db.provider_fw_rule_destroy(context, rule['id'])
        if rules:
            self.compute_api.trigger_provider_fw_rules_refresh(context)
        return {'status': 'OK', 'message': 'Deleted %s rules' % len(rules)}
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/ec2/admin.py/AdminController.remove_external_address_block/original