[one-users] CLI Enhancement

Javier Fontan jfontan at gmail.com
Thu Oct 28 13:12:54 PDT 2010


Hello,

I have been checking that error and it seems you are using ruby <=
1.8.5 (maybe a RHEL installation?). That version lacks REXML::Format,
that we use to write the xml. We are looking into solutions for that.

Concerning hostname in onevm show can be added with this patch:

--8<------
diff --git a/src/cli/onevm b/src/cli/onevm
index e454e20..7724976 100755
--- a/src/cli/onevm
+++ b/src/cli/onevm
@@ -812,6 +812,7 @@ true)
                 puts str % ["NAME", vm.name]
                 puts str % ["STATE", vm.state_str]
                 puts str % ["LCM_STATE", vm.lcm_state_str]
+                puts str % ["HOSTNAME", vm['HISTORY/HOSTNAME']]

                 value=vm['STIME'].to_i
                 if value==0
------>8--

Adding the number of leases to onevnet show is a bit more tricky as
the xmlrpc call for show does not have that information. We can
iterate over leases and get the number but I don't think it is the
nicest way to do it. I'll check what can be done for that.

The patch for onevm is still not added to the repository, I have to
test it a bit more before adding that change.

Bye

On Thu, Oct 28, 2010 at 9:21 PM, Rich Wellner <rkw at objenv.com> wrote:
> onevm show is missing hostname and user.
>
> onevnet show is missing user and leases.
>
> I think that's it.
>
> Thanks for the tip about -x.  I didn't see that one yet.
>
> -x didn't work on my node.  Unfortunately I can't do a cut and paste from
> that machine, but I've attached a screen shot.
>
> I get the same error regardless of where the -x is placed.
>
> rw2
>
> On 10/28/10 2:11 PM, Javier Fontan wrote:
>>
>> Hello,
>>
>> Tell us the extra parameters you need for onevm show, if onevm list
>> shows that it is easy to add to show as the data is already there. You
>> can also use onevm show -x<vmid>  for scripts as its response is xml
>> with all the data that came from the xmlrpc call.
>>
>> Bye
>>
>> On Thu, Oct 28, 2010 at 8:06 PM, Rich Wellner<rkw at objenv.com>  wrote:
>>>
>>> As I've gotten down to some additional scripting, I've found that some of
>>> the information shown in 'list' commands is not shown in 'show' commands.
>>> Taking an example of onevm list/show that means that in order to get
>>> complete information about a guest (i.e. including what host it is
>>> running
>>> on, I have to run both commands.  Is it possible to make the show
>>> commands
>>> more complete in the future?
>>>
>>> rw2
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opennebula.org
>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>
>>>
>>
>>
>
>



-- 
Javier Fontan, Grid & Virtualization Technology Engineer/Researcher
DSA Research Group: http://dsa-research.org
Globus GridWay Metascheduler: http://www.GridWay.org
OpenNebula Virtual Infrastructure Engine: http://www.OpenNebula.org



More information about the Users mailing list