# HG changeset patch # User Tero Marttila # Date 1395071208 -7200 # Node ID 9e1abcf47d27e53d99a39695d72f68e05a15c29f # Parent 01d31fda75abb9d8ed25e6908aef624450dd736e pvl.hosts-lldp: output host location diff -r 01d31fda75ab -r 9e1abcf47d27 bin/pvl.hosts-lldp --- a/bin/pvl.hosts-lldp Mon Mar 17 17:36:59 2014 +0200 +++ b/bin/pvl.hosts-lldp Mon Mar 17 17:46:48 2014 +0200 @@ -105,9 +105,9 @@ # apply for host, local, remote, remote_host in apply_hosts_lldp(options, hosts) : if remote_host : - print "{host:30} {local[port]:25} <-> {remote[port]:25} {remote_host:30}".format(host=host, local=local, remote=remote, remote_host=remote_host) + print "{host:30} {host.location:>30} {local[port]:>25} <-> {remote[port]:<25} {remote_host.location:>30} # {remote[chassis]} ({remote_host})".format(host=host, local=local, remote=remote, remote_host=remote_host) else : - print "{host:30} {local[port]:25} <-- {remote[port]:25} # {remote[chassis]} ({remote[sys_name]})".format(host=host, local=local, remote=remote) + print "{host:30} {host.location:>30} {local[port]:>25} <-- {remote[port]:<25} {empty:30} # {remote[chassis]} ({remote[sys_name]})".format(host=host, local=local, remote=remote, empty='') if __name__ == '__main__': pvl.args.main(main)