
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 databasename - name of the object to retrieve from the databaseracktables - (mandatory) a RackTables::Schema instancerackman - an optional parent RackMan objectOne of name of id must be specified.
Find and return network information about the given IP address. Result is given as a hashref.
Arguments
Result
id - integer, network id (in IPv4Network)addr - string, IP addressmask - integer, network mask lengthname - string, network namecomment - string, comment or description, if any
Hashref, contains the attributes for this RackObject
Hashref, contains information about the default IPv4 gateway:
addr - string, IPv4 address in dot-quad formiface - string, interface namemasklen - integer, network mask lengthnetwork - string, network addressnetname - string, network nameobject_id - integer, ID of the peer RackObjecttype - string, type of the address (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:
type - string, type of the address (regular, shared, virtual, router)iface - string, interface nameaddr - string, IP addressArrayref, contains the list of IPv6 addresses for this RackObject, each address being a hashref with the following keys:
type - string, type of the address (regular, shared, virtual, router)iface - string, interface nameaddr - string, IP addressInteger, 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 namel2address - string, port L2 addressl2address_text - string, port L2 address in colon-separated formatiif_id - integer, inner interface IDiif_name - string, inner interface nameoif_id - integer, outter interface IDoif_name - string, outter interface namepeer_port_id - integer, peer port IDpeer_port_name - string, peer port namepeer_object_id - integer, peer object IDpeer_object_name - string, peer object nameArrayref, 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 IDname - string, rack namecomment - text, rack commentrow_id - integer, rack row IDrow_name - string, rack row nameAn 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)