Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

1490

June 11th, 2009 16:00

How to add/create a device using perl ?

Hi everybody,

when using Domain Manager on sm_gui or sm_tpmgr I only have to provide a minimum of information, e.g. hostname/ip and accessmode only. The "apply some magic"-machine behind that is taking care of all the necessary operations.
Is there any simple perl API function built in providing nearly the same functionality ?

I wrote a script fetching some hosts, which should be added to the repository... thats the plan so far.

I tried to figure out what I can do with the already known features.

a) $object = $session->create ( "Host", "somehost" ); what of course creates a "somehost" within "Host" which is nearly empty.
Now I can fill in all the values (what values are at least needed to get it discovered / set it to pending list?), using several operations available for "Host" like setAccessMode or makeIP .. and finally.. find something to discover it or put it on the pending list. (hints on that will be fine too)
But that does not seem the way it's meant to be to me.

b) I can also write my data into a file, used as seedfile when invoking a system command from the script, say.. let perl invoke sm_tpmgr -s DOMAIN --seed=/path/to/seed.file

. but.. as already wrote in a) .. doesn't seem the way..

Didn't found a proper discripton of what I expected / was looking for in the perl API documentaion.

Any hints on that ?

Thanks & rgds
Christian
No Responses!
No Events found!

Top