[one-users] Widening list command output?

Karl Katzke kkatzke at sentryds.com
Mon Oct 31 18:23:09 PDT 2011


Héctor -

Making a change there didn’t seem to produce any changes. You’re right that I’d expect it to. Also, the XML output does produce the correct output — it’s in the database, it’s just truncated somewhere between the database  and the code. It looks like |d| is an instance of self.table_conf, which should allow me to use a file in .one/cli/ to set table parameters? I’m not very familiar with Ruby’s conventions, but that’s what I’d expect after reading the code. This does not seem to be documented anywhere.

... AHA! I figured it out.

In /etc/one/cli/image/oneimage.yaml will let you customize the CLI output.

This can be customized on a per user basis in $HOME/.one/cli/(name of CLI program).yaml ... And this CLI customization, which is actually pretty nice and neat, isn’t documented anywhere that I can find.

It looks like that is true for all of the CLI programs. Now if I could just get it to stop putting four to six extra spaces after the name...

-K



On 10/31/11 6:31 PM, "Héctor Sanjuán" <hsanjuan at opennebula.org> wrote:

> I think you can do a small change in
> /usr/lib/one/ruby/cli/one_helper/oneimage_helper.rb: format_pool():
>
>             column :NAME, "Name of the Image", :left, :size=>12 do |d|
>                 d["NAME"]
>             end
>
> I haven't tried, but if you change :size i'd expect it to print larger
> names.
>
> Hope it helps,
>
> Héctor Sanjuán
> OpenNebula Developer
>
> El 31/10/11 21:58, Karl Katzke escribió:
>> Is there a quick/easy way to widen the output of the OpenNebula commands
>> beyond the basic 80 characters wide?
>>
>> For instance, `oneimage list` crowds things such that the image name can
>> be only 12 chars wide. “OpenSuSE 11.” is 12 chars wide and there isn’t
>> an easy way to abbreviate it to be less than that.
>>
>> Thanks,
>> Karl Katzke
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20111101/c424075b/attachment-0003.htm>


More information about the Users mailing list