Net::ISC::DHCPd::OMAPI::Actions - Common actions on OMAPI objects
This module contains methods which can be called on each of the Net::ISC::DHCPd::OMAPI subclasses.
Changing object attributes will not alter the attributes on server. To do so use "write" to update the server.
$omapi_obj = $self->parent;
Returns the parent Net::ISC::DHCPd::OMAPI object.
$str = $self->errstr;
Holds the latest error. Check this if a method returns empty list.
$hash_ref = $self->extra_attributes;
Contains all attributes, which is not predefined by the OMAPI object.
Note: If you ever need to use this - send me a bug report, since it means something is missing.
$int = $self->read;
Open an object. Returns the number of attributes read. 0 = not in server.
It looks up an object on server, by all the attributes that has action
lookup. Will update all attributes in the local object, and setting all unknown objects in "extra_attributes".
This is subject for change, but:
read() will also do a post check which checks if the retrieved values actually match the one used to lookup. If they do not match all retrieved data will be stored in "extra_attributes" and this method will return zero (0).
$bool = $self->write; $bool = $self->write(@attributes);
Will set attributes on server object.
@attributes is by default every attribute on create, or every attribute with action "modify" on update.
$bool = $self->unset(@attributes);
Will unset values for an object in DHCP server.
$bool = $self->remove;
This method will remove the object from the server.