-
Notifications
You must be signed in to change notification settings - Fork 132
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
nipap-cli address list also shows the tags and attributes #1167
base: master
Are you sure you want to change the base?
Conversation
This patch makes it possible, to also see the tags and attributes per prefix, when doing an ```nipap-cli address list``` Feedback wanted
nipap-cli/nipap_cli/nipap_cli.py
Outdated
col_data['avps'] = '-' | ||
if len(p.avps) > 0: | ||
col_data['avps'] = ', '.join('{}:{}'.format(key,value) for key,value in sorted(p.avps.items())) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
nipap-cli/nipap_cli/nipap_cli.py
Outdated
|
||
col_data['avps'] = '-' | ||
if len(p.avps) > 0: | ||
col_data['avps'] = ', '.join('{}:{}'.format(key,value) for key,value in sorted(p.avps.items())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ','
line too long (115 > 79 characters)
nipap-cli/nipap_cli/nipap_cli.py
Outdated
col_data['tags'] = '#%d' % len(p.tags) | ||
|
||
col_data['tags'] = ','.join(p.tags) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blank line contains whitespace
nipap-cli/nipap_cli/nipap_cli.py
Outdated
@@ -522,6 +522,7 @@ def list_prefix(arg, opts, shell_opts): | |||
'added': { 'title': 'Added' }, | |||
'alarm_priority': { 'title': 'Alarm Prio' }, | |||
'authoritative_source': { 'title': 'Auth source' }, | |||
'avps':{ 'title': 'extra-attributes'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ':'
whitespace after '{'
This commit is for cleanup of the nits found when automatically checking the Merge-Request
nipap-cli/nipap_cli/nipap_cli.py
Outdated
|
||
col_data['avps'] = '-' | ||
if len(p.avps) > 0: | ||
col_data['avps'] = ','.join('{}:{}'.format(key, value) for key, value in sorted(p.avps.items())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (116 > 79 characters)
nipap-cli/nipap_cli/nipap_cli.py
Outdated
col_data['tags'] = ','.join(p.tags) | ||
|
||
col_data['avps'] = '-' | ||
if len(p.avps) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
nipap-cli/nipap_cli/nipap_cli.py
Outdated
@@ -630,8 +630,12 @@ def list_prefix(arg, opts, shell_opts): | |||
|
|||
# overwrite some columns due to special handling | |||
col_data['tags'] = '-' | |||
if len(p.tags) > 0: | |||
col_data['tags'] = '#%d' % len(p.tags) | |||
if len(p.tags) > 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
nipap-cli/nipap_cli/nipap_cli.py
Outdated
@@ -522,6 +522,7 @@ def list_prefix(arg, opts, shell_opts): | |||
'added': { 'title': 'Added' }, | |||
'alarm_priority': { 'title': 'Alarm Prio' }, | |||
'authoritative_source': { 'title': 'Auth source' }, | |||
'avps':{ 'title': 'Extra-Attributes' }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing whitespace after ':'
whitespace after '{'
whitespace before '}'
|
||
col_data['avps'] = '-' | ||
if len(p.avps) > 0: | ||
col_data['avps'] = ','.join('{}:{}'.format(key, value) for key, value in sorted(p.avps.items())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
line too long (116 > 79 characters)
This patch makes it possible, to also see the tags and attributes per prefix, when doing an
nipap-cli address list
Feedback wanted