List Info

Thread: Re: dhcpctl_object_remove




Re: dhcpctl_object_remove
country flaguser name
United States
2007-03-10 21:03:33
Thanks this worked. I had to do an open and then call
wait_for_completion on open before calling object_remove. 
Also for some reason it gives key conflict when removing
object with a given name. if I just match on ip/clientId
that seems to work.
Thanks again.

ghandi
----- Original Message ----
From: Martin McCormick <martindc.cis.okstate.edu>
To: dhcp-usersisc.org; ghandi krishna <g_ghandi_kyahoo.com>
Sent: Saturday, March 10, 2007 4:54:25 PM
Subject: Re: dhcpctl_object_remove 

ghandi krishna writes:
> My code is able to add a host entry by filling in
ip-address and 
> client-id fields for the host object, However
attempting to delete the 
> object using dhcpctl_object_remove fails with a
"not found" error. How 
> does one go about removing host object ??? I have
searched archives for 
> dhcp-users but couldn't come up with a conclusive
answer.
    Are you sure you have "open"'d the  object
after
creating it?  I forgot that the first time I tried this and
got
the same error.  Remember that you are making a sort of
draft of
what you want to happen but nothing goes over the wire until
you
open the remote object which is your dhcp server and then
"remove" the record.  Here is an expect fragment
of the script
that worked:

send -- "new hostr"
expect -exact ">"
send -- "set name =
"helium.example.domain"r"
expect -exact ">"
send -- "set hardware-address =
00:60:08:37:7F:0Ar"
expect -exact ">"
send -- "set hardware-type = 1r"
expect -exact ">"
send -- "set ip-address = 10.100.3.4r"
expect -exact ">"
send -- "openr"
expect -exact ">"
send -- "remover"
expect -exact ">"
send -- $EOF
expect -exact "$"

    The last two lines kill off the omshell and look for
the
shell prompt.


Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations
Group






 
____________________________________________________________
________________________
Need Mail bonding?
Go to the Yahoo! Mail Q&A for great tips from Yahoo!
Answers users.
http://answers.yahoo.com/dir/?link=list&sid=3965460
91


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )