routerbox/utils/manage_heipv6.py
2020-05-15 02:15:45 -04:00

26 lines
525 B
Python
Executable File

#!/usr/bin/env python3
import he_ipv6
import he_ipv6.logger
import logging
logger = logging.getLogger('HE Tunnelbroker Manager')
def main():
_args = he_ipv6.args.parseArgs().parse_args()
logger.debug('Invoked with args: {0}'.format(vars(_args)))
tb = he_ipv6.tunnelbroker.TunnelBroker(**vars(_args))
if _args.oper == 'start':
tb.start()
elif _args.oper == 'stop':
tb.stop()
elif _args.oper == 'update':
tb.update()
return(None)
if __name__ == '__main__':
main()