Skip to content
Snippets Groups Projects
Commit 5109c5c3 authored by Erik Reid's avatar Erik Reid
Browse files

print netconf output properly

parent d2f63d92
No related branches found
No related tags found
No related merge requests found
......@@ -214,9 +214,14 @@ def _main(router_fqdn: str, app_config_params: dict):
type=click.BOOL,
help='just run the netconf query and output the simplified xml, then exit')
def main(router_fqdn: str, app_config_params: dict, netconf_only: bool):
# this is expected to be called only when debugging
if netconf_only:
_doc = juniper.get_interface_info_ncrpc(router_fqdn)
print(etree.tostring(_doc, pretty_print=True))
print(etree.tostring(_doc, pretty_print=True).decode('utf-8'))
return
# normal flow ...
_main(router_fqdn, app_config_params)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment