def _expand_asn_spec(self, spec):
if type(spec) is not dict:<EOL><INDENT>raise NipapInputError("<STR_LIT>")<EOL><DEDENT>allowed_values = ['<STR_LIT>', '<STR_LIT:name>']<EOL>for a in spec:<EOL><INDENT>if a not in allowed_values:<EOL><INDENT>raise NipapExtraneousInputError("<STR_LIT>" % a)<EOL><DEDENT><DEDENT>if '<STR_LIT>' in spec:<EOL><INDENT>if type(spec['<STR_LIT>']) not in (int, long):<EOL><INDENT>raise NipapValueError("<STR_LIT>")<EOL><DEDENT>if '<STR_LIT:name>' in spec:<EOL><INDENT>raise NipapExtraneousInputError("<STR_LIT>")<EOL><DEDENT><DEDENT>elif '<STR_LIT:name>' in spec:<EOL><INDENT>if type(spec['<STR_LIT:name>']) != type('<STR_LIT>'):<EOL><INDENT>raise NipapValueError("<STR_LIT>")<EOL><DEDENT>if '<STR_LIT>' in spec:<EOL><INDENT>raise NipapExtraneousInputError("<STR_LIT>")<EOL><DEDENT><DEDENT>where, params = self._sql_expand_where(spec, '<STR_LIT>')<EOL>return where, params<EOL>
Expand ASN specification to SQL.

            asn [integer]
                Automonous System Number

            name [string]
                name of ASN