App-Netdisco

 view release on metacpan or  search on metacpan

lib/App/Netdisco/Util/PortAccessEntity.pm  view on Meta::CPAN


App::Netdisco::Util::PortAccessEntity

=head1 DESCRIPTION

Helper subroutines to update PAE details in device_port_properties
These are updated both during discover and macsuck.

=cut

sub update_pae_attributes {
  my ($device) = @_;
  no warnings "uninitialized";

  my $snmp = App::Netdisco::Transport::SNMP->reader_for($device)
    or return Status->defer("pae failed: could not SNMP connect to $device");
  debug sprintf ' [%s] pae - updating PortAccessEntity details', $device->ip;

  # device property
  my $pae_control = $snmp->pae_control();

lib/App/Netdisco/Util/Statistics.pm  view on Meta::CPAN


=head1 EXPORT_OK

=head2 update_stats()

Update the Netdisco statistics, either new for today or updating today's
figures.

=cut

sub update_stats {
  my $schema = schema(vars->{'tenant'});
  eval { require SNMP::Info };
  my $snmpinfo_ver = ($@ ? 'n/a' : $SNMP::Info::VERSION);
  my $postgres_ver = pretty_version($schema->storage->dbh->{pg_server_version}, 2);

  # roll everything back if we're testing
  my $txn_guard = $ENV{ND2_DB_ROLLBACK}
    ? $schema->storage->txn_scope_guard : undef;

  # TODO: (when we have the capabilities table?)

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.520 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )