Skip to content
Open
Changes from 1 commit
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
10 changes: 7 additions & 3 deletions nipap-cli/nipap_cli/nipap_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'},

Copy link
Copy Markdown

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 '{'

'children': { 'title': 'Children' },
'comment': { 'title': 'Comment' },
'customer_id': { 'title': 'Customer ID' },
Expand Down Expand Up @@ -607,7 +608,6 @@ def list_prefix(arg, opts, shell_opts):
pass
# override certain column widths
col_def['type']['width'] = 1
col_def['tags']['width'] = 2

col_header_data = {}
# build prefix formatting string
Expand All @@ -631,8 +631,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)

col_data['tags'] = ','.join(p.tags)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

col_data['avps'] = '-'
if len(p.avps) > 0:
col_data['avps'] = ', '.join('{}:{}'.format(key,value) for key,value in sorted(p.avps.items()))

Copy link
Copy Markdown

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)


Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank line contains whitespace

try:
col_data['pool_name'] = p.pool.name
except:
Expand Down