* Johnson Lin <[EMAIL PROTECTED]> [2008-12-02 18:16]:
> Stephen Hahn wrote:
>> * Johnson Lin <[EMAIL PROTECTED]> [2008-12-02 17:57]:
>>   
>>> I am working Sun xVM Server update function that depends on IPS update 
>>> APIs and Solaris pkg command as backend.
>>> There is a new feature request recently to ask for IPS update progress 
>>> status during a update job execution
>>>  so the UI progress bar can report status of a job such as 10%, 20%, 
>>> ...to 100% etc as it proceeds.
>>> Can pkg command such as install, refresh, and image-update etc support 
>>> this status update feature?
>>> I would like to see a programmatic interface in pkg command to report 
>>> update progress status since
>>> to parse the stdout from pkg command may not be a good idea.
>>
>>   Actually, I think your RFE is for a parseable output format from
>>   pkg(1).  Unless you are proposing using the Python client API (which
>>   already has a progress reporting mechanism)?
>
> No. I was not asking for a parsable output format unless there is no API 
> that can be used.

  There is no API to externally query a running pkg(1) instance about
  its progress.  Having a client API to perform a variety of operations
  in a stable fashion, we are unlikely to add such an interface.  A
  parseable output format is needed, however.

> Can you describe more for the Python client API to report update progress?

  It's documented in doc/client_api_versions.txt in our source tree.

> How do I integrate the API into our existing java codes?

  I suppose you could embed a Python interpreter in a JNI class and
  manipulate that.  Complicated.  Maybe others have better
  suggestions...

  - Stephen

-- 
[EMAIL PROTECTED]  http://blogs.sun.com/sch/
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to