[Users] cli: how to get value of a parameter
Michael Pasternak
mpastern at redhat.com
Sun Mar 18 13:26:49 UTC 2012
On 03/18/2012 02:43 PM, Gianluca Cecchi wrote:
> 2012/3/18 Michael Pasternak wrote:
>>
>> Hi,
>>
>> On 03/18/2012 10:44 AM, Gianluca Cecchi wrote:
>>> Hello,
>>> going through http://www.ovirt.org/wiki/CLI to see some syntax hints.
>>> I don't see a way to get parameter of an object.
>>> For example if I want to see the size of a vmpool, how can I do it
>>
>> you have two options for this:
>>
>> 1. show vmpool vmpool_name
>> 2. list vmpools --show-all
>
> yes, but they returns all the properties of an object. I would prefer
> to have an option that gives only the value of the property/properties
> I'm interested in
> something like
> show vmpool vmpool_name --props=prop1[,prop2,...,propN]
>
> eg
> show vmpool vmpool_name --props=size
that's doable, can you file RFE on this?!
>
>>> And is it possible to store values as variables and use then them for
>>> further commands?
>>
>> this one of the features i have in my list.
>
>>
>> i also have pipe support in my list, when it will be available,
>> you will be able to redirect shell output directly to grep.
>
> Ok, fine to have them.
> So in ovirt-shell command, when you type "help" and you get
>
> "
> In addition to the basic command form, the following functionality is
> available:
> ...
> * The output of any command can be piped to a shell command with
> the '|' character.
> "
> Actually it is not implemented yet, corect?
true.
> Because I tried some options but it seems none of them worked...
>
> BTW: getting results seems quite slow in my opinion. Does it depend on
> ovirt-shell itself or something I can tune in PotgreSQL RDBMS
> parameters perhaps?
the query cycle is:
0. shell -> sdk
1. sdk: http request to server
2. api: unmarshal from xml2java
3. api
4. engine
5. db
6. engine
7. api
8. api: marshall to xml
9. sdk - unmarshall xml2python
10. cli foramt
11. shell
i did profiling and results where good, unless server was really busy,
in your case i believe latency caused by client side filtering, i.e --kwargs,
you should use it only on collections where oVirt search not available
(no --query option), or it doesn't answer your needs.
--kwargs is very useful feature, but not efficient as in order
to perform filtering on collection, its should get all collection
members first.
>
> Gianluca
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
More information about the Users
mailing list