@@ -442,7 +442,8 @@ Results are ordered by the Device DNS and IP fields.
|
|||||||
|
|
||||||
=item *
|
=item *
|
||||||
|
|
||||||
Related rows from the C<device_vlan> table will be prefetched.
|
Column C<pcount> gives a count of the number of ports on the device
|
||||||
|
that are actually configured to carry the VLAN.
|
||||||
|
|
||||||
=back
|
=back
|
||||||
|
|
||||||
@@ -460,13 +461,16 @@ sub carrying_vlan_name {
|
|||||||
return $rs
|
return $rs
|
||||||
->search_rs({}, {
|
->search_rs({}, {
|
||||||
order_by => [qw/ me.dns me.ip /],
|
order_by => [qw/ me.dns me.ip /],
|
||||||
columns => [
|
select => [{ count => 'ports.vlan' }],
|
||||||
'me.ip', 'me.dns',
|
as => ['pcount'],
|
||||||
'me.model', 'me.os',
|
columns => [
|
||||||
'me.vendor', 'vlans.vlan',
|
'me.ip', 'me.dns',
|
||||||
'vlans.description'
|
'me.model', 'me.os',
|
||||||
],
|
'me.vendor', 'vlans.vlan',
|
||||||
join => 'vlans'
|
'vlans.description'
|
||||||
|
],
|
||||||
|
join => {'vlans' => 'ports'},
|
||||||
|
distinct => 1,
|
||||||
})
|
})
|
||||||
->search($cond, $attrs);
|
->search($cond, $attrs);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user