Fix two bugs in asset_ilines.py
- use .wrap, not .fill when printing AS-SET - fix a bug when one does not add '-l' (LOCAL) asns, populate the LOCAL as-set with a string, not an int. git-svn-id: svn+ssh://svn.ipng.nl/usr/share/subversion/repositories/ircnet.ipng.ch@58 c5d60b8d-fdcb-4146-b734-af4215e9eb71
This commit is contained in:
@ -73,7 +73,7 @@ function bitcron_main()
|
|||||||
do_asn $ASN_LIST 250 1300 || error "ilines.asn.conf failed"
|
do_asn $ASN_LIST 250 1300 || error "ilines.asn.conf failed"
|
||||||
|
|
||||||
echo "Gathering I-Lines for AS-SETs"
|
echo "Gathering I-Lines for AS-SETs"
|
||||||
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX 300 1300 || error "ilines.as-set.conf failed"
|
do_asset AS-IP-MAN-PEERING-TIX,AS-IP-MAN-PEERING-CIXP,AS-IP-MAN-PEERING-SWISSIX,AS-BIT 300 1300 || error "ilines.as-set.conf failed"
|
||||||
|
|
||||||
if [ $ERR -eq 0 ]; then
|
if [ $ERR -eq 0 ]; then
|
||||||
echo "This is what we've got:"
|
echo "This is what we've got:"
|
||||||
|
@ -99,7 +99,7 @@ def main():
|
|||||||
"AS-IP-MAN-PEERING-SWISSIX"]
|
"AS-IP-MAN-PEERING-SWISSIX"]
|
||||||
_class = 200
|
_class = 200
|
||||||
_output = None
|
_output = None
|
||||||
_asns = [20932]
|
_asns = ['20932']
|
||||||
|
|
||||||
for o,a in opts:
|
for o,a in opts:
|
||||||
if o == "-h" or o == "-help":
|
if o == "-h" or o == "-help":
|
||||||
@ -177,7 +177,7 @@ def main():
|
|||||||
|
|
||||||
for _asset in _data['as-set']:
|
for _asset in _data['as-set']:
|
||||||
ofile.write("# %s:\n# %s\n" %
|
ofile.write("# %s:\n# %s\n" %
|
||||||
(_asset, "\n# ".join(textwrap.fill(
|
(_asset, "\n# ".join(textwrap.wrap(
|
||||||
', '.join(_data['as-set'][_asset])))))
|
', '.join(_data['as-set'][_asset])))))
|
||||||
ofile.write("#\n\n")
|
ofile.write("#\n\n")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user