RackMan::Device - Class for representing a RackObject
use RackMan::Device; my $obj = RackMan::Device->new({ name => $name, racktables => $rtschema });
This module is a Moose-based class for representing a RackObject.
Create and return a new object.
Arguments
Arguments are expected as a hashref with the following keys:
id - ID of the object to retrieve from the database
id
name - name of the object to retrieve from the database
name
racktables - (mandatory) a RackTables::Schema instance
racktables
RackTables::Schema
rackman - an optional parent RackMan object
rackman
One of name of id must be specified.
Find and return network information about the given IP address. Result is given as a hashref.
ipv4addrs
ipv6addrs
Result
id - integer, network id (in IPv4Network)
addr - string, IP address
addr
mask - integer, network mask length
mask
name - string, network name
comment - string, comment or description, if any
comment
Hashref, contains the attributes for this RackObject
Hashref, contains information about the default IPv4 gateway:
addr - string, IPv4 address in dot-quad form
iface - string, interface name
iface
masklen - integer, network mask length
masklen
network - string, network address
network
netname - string, network name
netname
object_id - integer, ID of the peer RackObject
object_id
type - string, type of the address (regular, shared, virtual, router)
type
regular
shared
virtual
router
Arrayref, contains the list of explicit tags for this RackObject
Arrayref, contains the list of implicit tags for this RackObject
Arrayref, contains the list of IPv4 addresses for this RackObject, each address being a hashref with the following keys:
Arrayref, contains the list of IPv6 addresses for this RackObject, each address being a hashref with the following keys:
Integer, RackObject's ID
String, RackObject's name
String, RackObject's asset tag
Boolean
String, RackObject's comment
String, RackObject's type
Arrayref, contains the list of ports associated to this RackObject, each port being a hashref with the following keys:
name - string, port name
l2address - string, port L2 address
l2address
l2address_text - string, port L2 address in colon-separated format
l2address_text
iif_id - integer, inner interface ID
iif_id
iif_name - string, inner interface name
iif_name
oif_id - integer, outter interface ID
oif_id
oif_name - string, outter interface name
oif_name
peer_port_id - integer, peer port ID
peer_port_id
peer_port_name - string, peer port name
peer_port_name
peer_object_id - integer, peer object ID
peer_object_id
peer_object_name - string, peer object name
peer_object_name
Arrayref, contains the object ID of the parents
List of the IPv4 addresses of the device which are not associated with a virtual interface, as given by the [general]/virtual_interfaces config parameter. See "CONFIGURATION" in rack for more details.
Hashref, information about the rack containing the device
id - integer, rack ID
name - string, rack name
comment - text, rack comment
row_id - integer, rack row ID
row_id
row_name - string, rack row name
row_name
An optional parent RackMan object, as given when this object was created
The underlying RackObject corresponding to the device
List of the regular MAC addresses of the device
List of the regular IPv4 addresses of the device
List of the regular IPv6 addresses of the device
Hashref, contains the tree of tags, with the explicit tags at first level
Sebastien Aperghis-Tramoni (sebastien@aperghis.net)
To install RackMan, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RackMan
CPAN shell
perl -MCPAN -e shell install RackMan
For more information on module installation, please visit the detailed CPAN module installation guide.