support for storing remote_is_discoverable on a port
This commit is contained in:
@@ -11,7 +11,7 @@ __PACKAGE__->load_namespaces(
|
||||
);
|
||||
|
||||
our # try to hide from kwalitee
|
||||
$VERSION = 70; # schema version used for upgrades, keep as integer
|
||||
$VERSION = 71; # schema version used for upgrades, keep as integer
|
||||
|
||||
use Path::Class;
|
||||
use File::ShareDir 'dist_dir';
|
||||
|
||||
@@ -331,6 +331,15 @@ state, or else `undef` if the port is not in an error state.
|
||||
|
||||
sub error_disable_cause { return (shift)->get_column('error_disable_cause') }
|
||||
|
||||
=head2 remote_is_discoverable
|
||||
|
||||
Returns true if Netdisco is permitted to discover the remote device with
|
||||
the configuration of the local poller doing the local device discovery.
|
||||
|
||||
=cut
|
||||
|
||||
sub remote_is_discoverable { return (shift)->get_column('remote_is_discoverable') }
|
||||
|
||||
=head2 remote_is_wap
|
||||
|
||||
Returns true if the remote LLDP neighbor has reported Wireless Access Point
|
||||
|
||||
@@ -13,6 +13,8 @@ __PACKAGE__->add_columns(
|
||||
{ data_type => "text", is_nullable => 0 },
|
||||
"error_disable_cause",
|
||||
{ data_type => "text", is_nullable => 1 },
|
||||
"remote_is_discoverable",
|
||||
{ data_type => "boolean", default_value => \"true", is_nullable => 1 },
|
||||
"remote_is_wap",
|
||||
{ data_type => "boolean", default_value => \"false", is_nullable => 1 },
|
||||
"remote_is_phone",
|
||||
|
||||
@@ -126,6 +126,8 @@ will add the following additional synthesized columns to the result set:
|
||||
|
||||
=item error_disable_cause
|
||||
|
||||
=item remote_is_discoverable (boolean)
|
||||
|
||||
=item remote_is_wap (boolean)
|
||||
|
||||
=item remote_is_phone (boolean)
|
||||
@@ -143,12 +145,13 @@ sub with_properties {
|
||||
{
|
||||
'+select' => [qw/
|
||||
properties.error_disable_cause
|
||||
properties.remote_is_discoverable
|
||||
properties.remote_is_wap
|
||||
properties.remote_is_phone
|
||||
/],
|
||||
'+as' => [qw/
|
||||
error_disable_cause
|
||||
remote_is_wap remote_is_phone
|
||||
remote_is_discoverable remote_is_wap remote_is_phone
|
||||
/],
|
||||
join => 'properties',
|
||||
});
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
BEGIN;
|
||||
|
||||
ALTER TABLE device_port_properties ADD COLUMN "remote_is_discoverable" bool DEFAULT true;
|
||||
|
||||
COMMIT;
|
||||
Reference in New Issue
Block a user