blob: f86cfb20480621aa940470b8a42c45ffac55cb16 [file] [log] [blame]
Bartek Grzybowskifbbdbec2019-09-25 16:37:05 +02001#!/usr/bin/env python
Kang Xi11d278c2018-04-06 16:56:04 -04002
Kang Xi11d278c2018-04-06 16:56:04 -04003import logging
4import json
Bartek Grzybowskibe1067b2020-03-04 14:01:02 +01005from vcpecommon import * # pylint: disable=W0614
Bartek Grzybowski01abb5d2019-12-17 15:09:26 +01006import argparse
Kang Xi11d278c2018-04-06 16:56:04 -04007
Bartek Grzybowski01abb5d2019-12-17 15:09:26 +01008# Run the script with [-h|--help] to get usage info
Kang Xi11d278c2018-04-06 16:56:04 -04009
10logging.basicConfig(level=logging.INFO, format='%(message)s')
11
Bartek Grzybowski01abb5d2019-12-17 15:09:26 +010012parser = argparse.ArgumentParser(formatter_class=
13 argparse.ArgumentDefaultsHelpFormatter)
14parser.add_argument('--config',help='Configuration file path',default=None)
15args = parser.parse_args()
16
17vcpecommon = VcpeCommon(cfg_file=args.config)
Kang Xi11d278c2018-04-06 16:56:04 -040018nodes=['brg', 'bng', 'mux', 'dhcp']
19hosts = vcpecommon.get_vm_ip(nodes)
20print(json.dumps(hosts, indent=4, sort_keys=True))