Oliver Gorwits > App-Netdisco-2.012005 > App::Netdisco::Util::Port

Download:
App-Netdisco-2.012005.tar.gz

Dependencies

Annotate this POD

Website

View/Report Bugs
Source   Latest Release: App-Netdisco-2.026001_003

NAME ^

App::Netdisco::Util::Port

DESCRIPTION ^

A set of helper subroutines to support parts of the Netdisco application.

There are no default exports, however the :all tag will export all subroutines.

EXPORT_OK ^

vlan_reconfig_check( $port )

Will return nothing if these checks pass OK.

port_reconfig_check( $port )

Will return nothing if these checks pass OK.

get_port( $device, $portname )

Given a device IP address and a port name, returns a DBIx::Class::Row object for the Port on the Device in the Netdisco database.

The device IP can also be passed as a Device DBIx::Class object.

Returns undef if the device or port are not known to Netdisco.

get_iid( $info, $port )

Given an SNMP::Info instance for a device, and the name of a port, returns the current interface table index for that port. This can be used in further SNMP requests on attributes of the port.

Returns undef if there is no such port name on the device.

get_powerid( $info, $port )

Given an SNMP::Info instance for a device, and the name of a port, returns the current PoE table index for the port. This can be used in further SNMP requests on PoE attributes of the port.

Returns undef if there is no such port name on the device.

is_vlan_interface( $port )

Returns true if the $port DBIx::Class object represents a vlan subinterface.

This uses simple checks on the port type and name, and therefore might sometimes returns a false-negative result.

port_has_phone( $port )

Returns true if the $port DBIx::Class object has a phone connected.

This uses a simple check on the type of the remote connected device, and therefore might sometimes return a false-negative result.

syntax highlighting: