summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-08-22 09:41:18 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-08-22 09:41:18 +0200
commit8b2e577ef86d99ceca59d73aa71f3d62f44b0de7 (patch)
treea0f140b0ea70a3e772e78c89e444017f266b255e /examples
parent1d314d7e2b213fbfe0133c5b3446fdf1d23f0ac5 (diff)
examples/ncclient: set default log level to INFO
Change-Id: I959045c8d7ec16291f7144c572faea06cf1ad433 Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/ncclient/copy_config.py6
-rwxr-xr-xexamples/ncclient/edit_config.py8
-rwxr-xr-xexamples/ncclient/get.py4
-rwxr-xr-xexamples/ncclient/get_config.py4
4 files changed, 11 insertions, 11 deletions
diff --git a/examples/ncclient/copy_config.py b/examples/ncclient/copy_config.py
index 227acb128..f397aaa44 100755
--- a/examples/ncclient/copy_config.py
+++ b/examples/ncclient/copy_config.py
@@ -25,9 +25,9 @@ def _copy_config(config_filename, host='localhost', port=2831, username='admin',
logger.info("Connected to HC")
with open(config_filename, 'r') as f:
ret = m.copy_config(target='candidate', source=_SOURCE_TEMPLATE % f.read())
- logger.debug("CopyConfig successful:\n%s" % ret)
+ logger.info("<copy-config> successful:\n%s" % ret)
ret = m.commit()
- logger.debug("Commit successful:\n%s", ret)
+ logger.info("<commit> successful:\n%s", ret)
if __name__ == '__main__':
@@ -40,6 +40,6 @@ if __name__ == '__main__':
if args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
- logging.basicConfig(level=logging.WARNING)
+ logging.basicConfig(level=logging.INFO)
_copy_config(args.config_filename)
diff --git a/examples/ncclient/edit_config.py b/examples/ncclient/edit_config.py
index d43b0b719..741232b51 100755
--- a/examples/ncclient/edit_config.py
+++ b/examples/ncclient/edit_config.py
@@ -24,11 +24,11 @@ def _edit_config(config_filename, host='localhost', port=2831, username='admin',
logger.info("Connected to HC")
with open(config_filename, 'r') as f:
ret = m.edit_config(config=f.read())
- logger.debug("EditConfig successful:\n%s" % ret)
+ logger.info("<edit-config> successful:\n%s" % ret)
validate = m.validate()
- logger.debug("Validate successful:\n%s" % validate)
+ logger.info("<validate> successful:\n%s" % validate)
commit = m.commit()
- logger.debug("Commit successful:\n%s" % commit)
+ logger.info("<commit> successful:\n%s" % commit)
if __name__ == '__main__':
argparser = argparse.ArgumentParser(description="Configures VPP using <edit-config> RPC")
@@ -44,6 +44,6 @@ if __name__ == '__main__':
if args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
- logging.basicConfig(level=logging.WARNING)
+ logging.basicConfig(level=logging.INFO)
_edit_config(args.config_filename, validate=args.validate, commit=args.commit)
diff --git a/examples/ncclient/get.py b/examples/ncclient/get.py
index 44a726015..999304f77 100755
--- a/examples/ncclient/get.py
+++ b/examples/ncclient/get.py
@@ -22,7 +22,7 @@ def _get(reply_filename=None, host='localhost', port=2831, username='admin', pas
with manager.connect(host=host, port=port, username=username, password=password, hostkey_verify=False) as m:
logger.info("Connected to HC")
state = m.get()
- logger.debug("Get successful:\n%s" % state)
+ logger.info("<get> successful:\n%s" % state)
if reply_filename:
with open(reply_filename, 'w') as f:
f.write(state.data_xml)
@@ -40,6 +40,6 @@ if __name__ == '__main__':
if args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
- logging.basicConfig(level=logging.WARNING)
+ logging.basicConfig(level=logging.INFO)
_get(args.reply_filename)
diff --git a/examples/ncclient/get_config.py b/examples/ncclient/get_config.py
index 53b6854d6..631926ebb 100755
--- a/examples/ncclient/get_config.py
+++ b/examples/ncclient/get_config.py
@@ -22,7 +22,7 @@ def _get_config(reply_filename=None, host='localhost', port=2831, username='admi
with manager.connect(host=host, port=port, username=username, password=password, hostkey_verify=False) as m:
logger.info("Connected to HC")
config = m.get_config(source='running')
- logger.debug("GetConfig successful:\n%s" % config)
+ logger.info("<get-config> successful:\n%s" % config)
if reply_filename:
with open(reply_filename, 'w') as f:
f.write(config.data_xml)
@@ -40,6 +40,6 @@ if __name__ == '__main__':
if args.verbose:
logging.basicConfig(level=logging.DEBUG)
else:
- logging.basicConfig(level=logging.WARNING)
+ logging.basicConfig(level=logging.INFO)
_get_config(args.reply_filename)