@requires_rw<EOL><INDENT>def remove_asn(self, auth, asn):<DEDENT>
self._logger.debug("<STR_LIT>" % unicode(asn))<EOL>asns = self.list_asn(auth, asn)<EOL>where, params = self._expand_asn_spec(asn)<EOL>sql = "<STR_LIT>" + where<EOL>self._execute(sql, params)<EOL>for a in asns:<EOL><INDENT>audit_params = {<EOL>'<STR_LIT:username>': auth.username,<EOL>'<STR_LIT>': auth.authenticated_as,<EOL>'<STR_LIT>': auth.full_name,<EOL>'<STR_LIT>': auth.authoritative_source,<EOL>'<STR_LIT:description>': '<STR_LIT>' % unicode(a['<STR_LIT>'])<EOL>}<EOL>sql, params = self._sql_expand_insert(audit_params)<EOL>self._execute('<STR_LIT>' % sql, params)<EOL><DEDENT>
Remove an AS number.

            * `auth` [BaseAuth]
                AAA options.
            * `spec` [asn]
                An ASN specification.

            Remove ASNs matching the `asn` argument.

            This is the documentation of the internal backend function. It's
            exposed over XML-RPC, please also see the XML-RPC documentation for
            :py:func:`nipap.xmlrpc.NipapXMLRPC.remove_asn` for full
            understanding.