routerbox/utils/manage_heipv6.py

25 lines
478 B
Python
Raw Normal View History

2020-05-12 18:13:42 -04:00
#!/usr/bin/env python3
import he_ipv6
2020-05-12 03:26:44 -04:00
2020-05-12 18:13:42 -04:00
import logging
2020-05-12 03:26:44 -04:00
logger = logging.getLogger()
def main():
2020-05-12 18:13:42 -04:00
_args = he_ipv6.args.parseArgs().parse_args()
2020-05-12 03:26:44 -04:00
logger.debug('Invoked with args: {0}'.format(vars(_args)))
2020-05-12 18:13:42 -04:00
tb = he_ipv6.tunnelbroker.TunnelBroker(**vars(_args))
2020-05-12 03:26:44 -04:00
if _args.oper == 'start':
tb.start()
elif _args.oper == 'stop':
tb.stop()
elif _args.oper == 'update':
2020-05-14 13:50:50 -04:00
tb.update()
2020-05-12 03:26:44 -04:00
return(None)
if __name__ == '__main__':
main()