#!/usr/bin/python
# -*- coding: ascii -*-
# vim:ts=4:sw=4:softtabstop=0:smarttab
# License: LGPL
# Keith Dart <kdart@kdart.com>

"""
Various simple control functions for the HP switch.

hpswitch <agent> <community>

"""

import sys

from pycopia.Devices import HPswitch

# only prints the ARP table of the swith right now.

def main(argv):
    host = argv[1]
    community = argv[2]
    hps = HPswitch.get_manager(host, community)
#    attrnames = hps.get_attributes()
#    attrnames.sort()
    for tn in hps.getall("ipNetToMedia"):
        print tn

try:
    main(sys.argv)
except IndexError:
    print __doc__
except KeyboardInterrupt:
    pass
