|
From: Anton P. <ant...@pi...> - 2012-05-30 05:57:08
|
Hi Hung,
Perhaps you have no test_agent plug-in installed.
Let's change it to libsimulator.
The config stanza:
handler libsimulator {
entity_root = "{SYSTEM_CHASSIS,10}"
name = "test10"
}
goes to python code:
d = { "plugin" : "libsimulator", "entity_root" : "{SYSTEM_CHASSIS,10}",
"name" : "test10" }
Anton Pak
On Wed, 30 May 2012 08:48:08 +0400, Hung Ta <hun...@gm...> wrote:
> Hi Anton Pak,
>
> I've tried.
>
> Basically, your examples work. However, it failed at creating a new
> handler: in my case, there are some handlers (libsimulator) created
> first.
> After that, I run example_handlers.py. It deleted a handler OK, but
> created
> another handler (libtest_agent) failed.
>
> What do you think of this?
>
> Thanks,
> Hung
>
> On Wed, May 30, 2012 at 4:46 AM, Anton Pak
> <ant...@pi...>wrote:
>
>> Hi Hung,
>>
>> I've just added initial support in openhpi svn trunk (rev #7446).
>> Could you try it?
>>
>> Some instructions:
>> ==============================**==============
>> run openhpi daemon with several handlers (for example libsimulator,
>> libdyn_simulator, libtest_agent)
>> mkdir openhpi
>> cd openhpi
>> svn checkout
>> https://openhpi.svn.sf.net/**svnroot/openhpi/openhpi/trunk<https://openhpi.svn.sf.net/svnroot/openhpi/openhpi/trunk>
>> cd trunk
>> cd baselibs/python
>> ./example_lsres.py
>> ./example_handlers.py
>>
>> Anton Pak
>>
>>
>>
>> On Tue, 29 May 2012 08:00:45 +0400, Hung Ta <hun...@gm...>
>> wrote:
>>
>> Hi Anton Pak,
>>>
>>> I was busy on another project for a time. Now, I get back the issue.
>>>
>>> Researching the source code of py-openhpi-1.1 (openhpi_wrap.c), it
>>> seems
>>> that some ohpi wrap functions don't have valid arguments. For example,
>>> there is missing sessionid in _wrap_oHpiHandlerCreate(),
>>> _wrap_oHpiHandlerDestroy() ... So, I tried to fix them by fixing
>>> ohpi.i:
>>> declare oHpiHandlerCreate(), oHpiHandlerDestroy()... with valid
>>> argument.
>>> Then, rebuilt and tested but I still get the same problem.
>>>
>>> It's great if you can support me to add oHpiHandlerXXX into openhpi
>>> python
>>> package.
>>>
>>> Thank you so much for your support.
>>>
>>> Regards,
>>> Hung
>>>
>>> On Wed, May 9, 2012 at 2:58 PM, Anton Pak <ant...@pi...>
>>> wrote:
>>>
>>> Hi Hung!
>>>>
>>>> py-openhpi has been abandoned for years.
>>>> There is new python baselib in 3.1.0 but with limited support for
>>>> oHpiXXX
>>>> functions.
>>>> I can add oHpiHandlerXXX support if you need it.
>>>>
>>>> Anton Pak
>>>>
>>>>
>>>> On Wed, 09 May 2012 11:55:42 +0400, Hung Ta <hun...@gm...>
>>>> wrote:
>>>>
>>>> Hi Uli,
>>>>
>>>>>
>>>>> That is very useful. Thanks a lot!
>>>>>
>>>>> I've tested with openhpi release in C, and it worked fine. But with
>>>>> PyOpenHPI (py-openhpi-1.1.tar.gz) (the openhpi was ported to
>>>>> python), it
>>>>> seems not worked well.
>>>>> I installed py-openhpi-1.1 and created a simple example that creates
>>>>> a
>>>>> new
>>>>> handler using oHpiHandlerCreate() in python (as some examples
>>>>> written in
>>>>> README), it always returns err = -1015. Other functions
>>>>> (oHpiHandlerGetNext, oHpiHandlerInfo...) have the same result.
>>>>>
>>>>> Is py-openhpi-1.1.tar.gz stable?
>>>>>
>>>>> Do you or anyone test this and know why?
>>>>>
>>>>> Appreciate your reply.
>>>>>
>>>>> Thanks,
>>>>> hung
>>>>>
>>>>> On Tue, May 8, 2012 at 2:49 PM, Ulrich Kleber
>>>>> <Ulr...@hu...
>>>>> >*
>>>>> *wrote:
>>>>>
>>>>> Hi,****
>>>>>
>>>>>>
>>>>>>
>>>>>> OpenHPI has a few additional APIs to manage the OpenHPI specific
>>>>>> configuration dynamically.****
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>>
>>>>>> In openhpid/oHpi.c you find the handler operation APIs which manage
>>>>>> plugin
>>>>>> instances:****
>>>>>>
>>>>>> oHpiHandlerCreate****
>>>>>>
>>>>>> oHpiHandlerDestroy****
>>>>>>
>>>>>> oHpiHandlerInfo****
>>>>>>
>>>>>> oHpiHandlerGetNext****
>>>>>>
>>>>>> oHpiHandlerFind****
>>>>>>
>>>>>> oHpiHandlerRetry****
>>>>>>
>>>>>> and other functions to address OpenHPI configuration.****
>>>>>>
>>>>>> The description there is pretty short, but should tell you what they
>>>>>> do.**
>>>>>> **
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>>
>>>>>> You can find coding examples in the clients (clients/ohhandler.c)
>>>>>> and
>>>>>> you
>>>>>> can use these client programs also in your testbed.****
>>>>>>
>>>>>> There are man entries as well.****
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>>
>>>>>> That way you should be able to reconnect to a shelf manager or
>>>>>> change
>>>>>> the
>>>>>> connection method.****
>>>>>>
>>>>>>
>>>>>> Only the conf files are not changed by these programs. The changes
>>>>>> will
>>>>>> be
>>>>>> not persistent.****
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>> Cheers,****
>>>>>>
>>>>>> Uli****
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>> *From:* Hung Ta [mailto:hun...@gm...]
>>>>>> *Sent:* Dienstag, 8. Mai 2012 04:21
>>>>>> *To:* openhpi-devel@lists.**sourcefo**rge.net
>>>>>> <http://sourceforge.net>
>>>>>> <openhpi-devel@lists.**sourceforge.net<ope...@li...>
>>>>>> >
>>>>>>
>>>>>> *Subject:* Re: [Openhpi-devel] [openhpid] How to connect to Shelf
>>>>>> manager
>>>>>> without restart openhpi daemon****
>>>>>>
>>>>>> ** **
>>>>>>
>>>>>>
>>>>>> Thank you for your reply, Mohan.
>>>>>>
>>>>>> I also think as yours.
>>>>>>
>>>>>> But digging into openhpi source code, I found a function which
>>>>>> establishes connection to shelf manager, that is
>>>>>> ipmi_lan_setup_con().
>>>>>> This function is one of the device driver functions that allows
>>>>>> upper
>>>>>> application to talk to IPMI hardware platform. It takes
>>>>>>
>>>>>> ****
>>>>>>
>>>>>>
>>>>>> configuration parameters and make a connection to IPMI hardware
>>>>>> platform.
>>>>>>
>>>>>> But I wonder if we provide configuration parameter changes and
>>>>>> invoke
>>>>>> it, the daemon still works or not? Is it the function that
>>>>>> meets our purpose?
>>>>>>
>>>>>> ****
>>>>>>
>>>>>>
>>>>>> Thanks,
>>>>>> hung
>>>>>>
>>>>>> >Hung,****
>>>>>>
>>>>>> >** **
>>>>>>
>>>>>> >I do not know of an API that can dynamically read the changes in
>>>>>> the****
>>>>>>
>>>>>> >openhpi.conf file. When the configuration is changed, the daemon
>>>>>> needs****
>>>>>>
>>>>>> >to be restarted. ****
>>>>>>
>>>>>> >Complete list of the API's are in the HPI specification which can
>>>>>> be****
>>>>>>
>>>>>> >downloaded from ****
>>>>>>
>>>>>> >http://www.saforum.org/****Service-Availability-Forum---****<http://www.saforum.org/**Service-Availability-Forum---**>
>>>>>> Specification:-Hardware-****Platform-Interface-%28HPI%29~****
>>>>>> 217308~16627.htm<http://www.**saforum.org/Service-**
>>>>>> Availability-Forum---**Specification:-Hardware-**
>>>>>> Platform-Interface-%28HPI%29%**7E217308%7E16627.htm<http://www.saforum.org/Service-Availability-Forum---Specification:-Hardware-Platform-Interface-%28HPI%29%7E217308%7E16627.htm>
>>>>>> ><
>>>>>> http://www.saforum.org/****Service-Availability-Forum---****<http://www.saforum.org/**Service-Availability-Forum---**>
>>>>>> Specification:-Hardware-****Platform-Interface-%28HPI%29%****
>>>>>> 7E217308%7E16627.htm<http://**www.saforum.org/Service-**
>>>>>> Availability-Forum---**Specification:-Hardware-**
>>>>>> Platform-Interface-%28HPI%29%**7E217308%7E16627.htm<http://www.saforum.org/Service-Availability-Forum---Specification:-Hardware-Platform-Interface-%28HPI%29%7E217308%7E16627.htm>
>>>>>> >
>>>>>>
>>>>>> >****
>>>>>>
>>>>>> >** **
>>>>>>
>>>>>> >Mohan****
>>>>>>
>>>>>> >** **
>>>>>>
>>>>>> >** **
>>>>>>
>>>>>> >On Mon, 2012-05-07 at 10:52 +0700, Hung Ta wrote:****
>>>>>>
>>>>>> >> Hello openhpi experts,****
>>>>>>
>>>>>> >> ****
>>>>>>
>>>>>> >> I have a question would like to ask: assuming that there is
>>>>>> an****
>>>>>>
>>>>>> >> openhpid being started ( and assuming IPMIDirect plugin was
>>>>>> defined
>>>>>> in****
>>>>>>
>>>>>> >> openhpi.conf). Later, there is a change in IPMIDirect config
>>>>>> (e.g.****
>>>>>>
>>>>>> >> addr, port, authentication...), so is there any openhpi API able
>>>>>> to****
>>>>>>
>>>>>> >> reconnect the shelf manager without restarting the openhpid
>>>>>> daemon?
>>>>>> In****
>>>>>>
>>>>>> >> this case, we just provide those changed config parameters
>>>>>> and****
>>>>>>
>>>>>> >> reconnect to the shelf manager without restarting openhpid
>>>>>> daemon.****
>>>>>>
>>>>>> >> ****
>>>>>>
>>>>>> >> Could you please help?****
>>>>>>
>>>>>> >>** **
>>>>>>
>>>>>> >> Thanks and regards,****
>>>>>>
>>>>>> >> hung ****
>>>>>>
|