How do I view/modify a class via OMAPI?
David Coulthart
davec at columbia.edu
Tue Sep 9 13:54:00 UTC 2008
I'm testing upgrading to DHCP 3.1.1 mainly because of the following
feature mentioned in the release notes:
"Management of class and subclass statements via OMAPI."
In my dhcpd.conf I have the following class defined:
class "captured" {
match pick-first-value (option dhcp-client-identifier, hardware);
}
subclass "captured" 1:00:00:00:00:00:01;
subclass "captured" 1:00:00:06:bb:a6:35;
subclass "captured" 1:00:00:1d:5e:dd:f9;
...
I'm hoping to be able to use OMAPI to add/remove those subclass entries.
As a starter, this is what I tried with omshell:
> server <server-ip>
> port 923
> key OMAPI_KEY <secret>
> connect
obj: <null>
> new "class"
obj: class
> set name = "captured"
obj: class
name = "captured"
> open
can't open object: invalid argument
obj: class
name = "captured"
I also tried 'new "subclass"' instead, but that didn't seem to work
either. What property do I need to use to lookup a class/subclass? I
didn't find any documentation on this, but if there is any, I would
definitely appreciate a pointer.
Thanks,
Dave Coulthart
More information about the dhcp-users
mailing list