Skip to content

Add "verbose" option for suppressing unnecessary log#3087

Merged
wangxin merged 1 commit intosonic-net:masterfrom
wangxin:verbose-option
Mar 10, 2021
Merged

Add "verbose" option for suppressing unnecessary log#3087
wangxin merged 1 commit intosonic-net:masterfrom
wangxin:verbose-option

Conversation

@wangxin
Copy link
Copy Markdown
Collaborator

@wangxin wangxin commented Mar 4, 2021

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

What is the motivation for this PR?

When execute an ansible module, the detailed arguments and module result are logged
at DEBUG level by default. Sometimes, the module result could be too huge to be logged
even at DEBUG level.

How did you do it?

This change added keyword option "verbose" to the method in AnsibleHostBase class
for executing ansible modules. Default value of "verbose" is "True". If "verbose" is set to
"False", only simplified messages will be logged at DEBUG level. This change also updated
some test scripts and the sanity check scripts to use this option.

How did you verify/test it?

  • Test run the affected scripts with sanity check enabled.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

When execute an ansible module, the detailed arguments and module result are logged
at DEBUG level by default. Sometimes, the module result could be too huge to be logged
even at DEBUG level.

This change added keyword option "verbose" to the method in AnsibleHostBase class
for executing ansible modules. Default value of "verbose" is "True". If "verbose" is set to
"False", only simplified messages will be logged at DEBUG level. This change also updated
some test scripts and the sanity check scripts to use this option.

Signed-off-by: Xin Wang <[email protected]>
@wangxin wangxin requested a review from a team March 4, 2021 04:27
@wangxin wangxin merged commit 42bbc2e into sonic-net:master Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants