Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SNMP] Invert interactive logic in validate mib files #9258

Merged
merged 1 commit into from
Apr 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@

@click.command(context_settings=CONTEXT_SETTINGS, short_help='Validate MIB file names')
@click.argument('mib_files', nargs=-1)
@click.option('--fix-silent', '-s', is_flag=False, help='Rename all invalid MIB files without prompting to confirm')
@click.option('--interactive', '-i', is_flag=True, help='Prompt to confirm before renaming all invalid MIB files')
@click.pass_context
def validate_mib_filenames(ctx, mib_files, fix_silent):
def validate_mib_filenames(ctx, mib_files, interactive):
"""
Validate MIB file names. Frameworks used to load mib files expect MIB file names to match
MIB name.
Expand Down Expand Up @@ -83,7 +83,7 @@ def validate_mib_filenames(ctx, mib_files, fix_silent):
index += 1

option = '*'
if not fix_silent:
if interactive:
echo_info(
tabulate(
[[mib.index, mib.base_filename, mib.name, mib.is_valid] for mib in mibs],
Expand Down