add ifindex column for show

This commit is contained in:
Oliver Gorwits
2022-08-14 21:13:27 +01:00
parent a004db2951
commit 3684451f2a
5 changed files with 31 additions and 10 deletions

View File

@@ -379,6 +379,14 @@ Returns true if the remote LLDP neighbor has reported Telephone capability.
sub remote_is_phone { return (shift)->get_column('remote_is_phone') }
=head2 ifindex
Returns the interface index (C<ifIndex>) of the port.
=cut
sub ifindex { return (shift)->get_column('ifindex') }
=head2 remote_inventory
Returns a synthesized description of the remote LLDP device if inventory

View File

@@ -136,6 +136,8 @@ will add the following additional synthesized columns to the result set:
=item remote_is_phone (boolean)
=item ifindex
=back
=cut
@@ -152,10 +154,12 @@ sub with_properties {
properties.remote_is_discoverable
properties.remote_is_wap
properties.remote_is_phone
properties.ifindex
/],
'+as' => [qw/
error_disable_cause
remote_is_discoverable remote_is_wap remote_is_phone
ifindex
/],
join => 'properties',
});