Robert Drake
and 1 contributors

NAME

Net::ISC::DHCPd::OMAPI::Actions - Common actions on OMAPI objects

DESCRIPTION

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.

ATTRIBUTES

parent

 $omapi_obj = $self->parent;

Returns the parent Net::ISC::DHCPd::OMAPI object.

errstr

 $str = $self->errstr;

Holds the latest error. Check this if a method returns empty list.

extra_attributes

 $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.

METHODS

read

 $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).

write

 $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.

unset

 $bool = $self->unset(@attributes);

Will unset values for an object in DHCP server.

remove

 $bool = $self->remove;

This method will remove the object from the server.

COPYRIGHT & LICENSE

AUTHOR

See Net::ISC::DHCPd.