Bug 827368 - [RFE] Export VM IP address into REST API
[RFE] Export VM IP address into REST API
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi (Show other bugs)
3.0.3
x86_64 Linux
high Severity medium
: ---
: ---
Assigned To: Michael Pasternak
Oded Ramraz
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-01 05:03 EDT by Alex Jia
Modified: 2015-09-22 09 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-01 09:55:53 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alex Jia 2012-06-01 05:03:47 EDT
Description of problem:
At present, I can get VM IP address with GA([ovirt|rhevm]-guest-agent) installation on the VM by vdsClient getVmstats cmd, but I can't get it
via REST API, VM IP addresss hasn't been provided in the following resource:
https://xx.xx.xx.xx:8443/api/vms/$uuid-1/nics/$uuid-2/statistics
 

Version-Release number of selected component (if applicable):
# rpm -q rhevm-restapi-3.0.3_0001-3.el6.x86_64
rhevm-restapi-3.0.3_0001-3.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. install rhevm-guest-agent on rhel6 VM or ovirt-guest-agent on fedora16 VM
2. service rhevm-guest-agent start or service ovirt-guest-agent start
3. type above similar url then see whether VM IP is included by statistic info
  
Actual results:
<snip>

<statistic id="7211a516-3e61-3c4e-be79-739424d13461" href="/api/vms/76e0d894-0aa8-4b4c-9222-e9c3f81a3b5b/nics/cea74f2c-894e-404a-8d58-720a889eaed0/statistics/7211a516-3e61-3c4e-be79-739424d13461"><name>errors.total.tx</name><description>Total transmit errors</description><values type="INTEGER"><value><datum>0</datum></value></values><type>COUNTER</type><unit>NONE</unit><nic id="cea74f2c-894e-404a-8d58-720a889eaed0" href="/api/vms/76e0d894-0aa8-4b4c-9222-e9c3f81a3b5b/nics/cea74f2c-894e-404a-8d58-720a889eaed0"/></statistic>

</snip>

Expected results:
VM IP address is displaied on VM nic statistics when GA is installed on the guest like vdsClient getVmStats cmd.

Additional info:
I can get VM IP address by vdsClient getVmStats cmd if I installed GA on the guest:
# vdsClient -s 0 getVmStats 76e0d894-0aa8-4b4c-9222-e9c3f81a3b5b|grep netIfaces
	netIfaces = [{'name': 'eth0', 'inet6': ['fe80::250:56ff:feb9:7b99'], 'inet': ['10.66.85.154'], 'hw': '00:50:56:b9:7b:99'}]
Comment 1 Itamar Heim 2012-06-01 09:55:53 EDT
we don't correlate the ip address to a vnic.
they are available under:
<guest_info><ips><ip address="10.35.17.187"/></ips></guest_info>
Comment 2 Alex Jia 2012-06-04 01:55:52 EDT
(In reply to comment #1)
> we don't correlate the ip address to a vnic.
> they are available under:
> <guest_info><ips><ip address="10.35.17.187"/></ips></guest_info>

Yeah, you're right, I don't need to install GA in the guest then get guest ip in guest virtual network statistics. In fact, <guest_info>...</guest_info> has included it. thanks.
Comment 3 Itamar Heim 2012-06-04 02:15:22 EDT
just to be clear - you *do* need to install guest agent today to get this under guest_info
Comment 4 Alex Jia 2012-06-04 03:04:32 EDT
(In reply to comment #3)
> just to be clear - you *do* need to install guest agent today to get this
> under guest_info

Yes, thanks for your clarifying, I just saw related codes:
http://git.fedorahosted.org/git/?p=rhevm-api.git;a=commitdiff;h=b8636877d64d695ff3c53ecae021fe005dfe475a

Note You need to log in before you can comment on or make changes to this bug.