Re: [Users] Rest-Api to get the VM ip-address in oVirt /RHEV-M 3.0

On 12/12/2012 02:51 PM, Romil Gupta wrote:
ya i can see it
<guest_info> <ip address="10.1.0.66"/> </guest_info>
great, next step: can you do 'vm.get_guest_info().get_ips()' in sdk? (make sure you're looking at right vm)
On Wed, Dec 12, 2012 at 6:13 PM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com>> wrote:
On 12/12/2012 02:30 PM, Romil Gupta wrote: > sorry I didn't get you ! > ya ... i can fetch VM via api but i can't get its ip address using the api !
Romil,
when i say api, i mean ovirt-restapi, i understand that you using sdk, but to find the problem i need you to fetch vm/s via ovirt-restapi directly
do from curl or any other http client: GET http(s)://sever:port/api/vms and let me know if you can see ips in returned xml
> > > > > On Wed, Dec 12, 2012 at 5:53 PM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com>>> wrote: > > On 12/12/2012 01:52 PM, Romil Gupta wrote: > > Hi Michael, > > > > I have 'rhev-agent-2.3.16-3.el6.x86_64 ' on every VM's and I tired api.vms.get(VM_NAME).guest_info.ips but it return NONE ! > > I can see on UI that all VM's have some IP Address . > > can you please check once ? > > can you see it when fetching vm via api directly? > > > > > Thanks > > Romil > > > > > > On Wed, Dec 12, 2012 at 5:11 PM, Michael Pasternak <mpastern@redhat.com <mailto:mpastern@redhat.com> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com>> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com> <mailto:mpastern@redhat.com <mailto:mpastern@redhat.com>>>> wrote: > > > > On 12/12/2012 01:31 PM, Romil Gupta wrote: > > > > > > Hi, > > > > > > I am looking for a REST-API to get the IP-ADDRESS of a VM ? > > > At the creation time we attach a nic's to a VM , but I didn't find any API to get the IP address. > > > > > > I want to pass the VM_NAME as a parameter and get the IP-ADDRESS of a particular VM ! > > > is it possible ?? > > > > yes it is, ips located under <guest_info> in vm, but note that you > > have to have guest agent installed. > > > > > > > > Thanks for all your continuous help till now. > > > > > > Regards, > > > Romil > > > > > > > > > -- > > > > Michael Pasternak > > RedHat, ENG-Virtualization R&D > > > > > > > > > > -- > > I don't wish to be everything to everyone, but I would like to be something to someone. > > > -- > > Michael Pasternak > RedHat, ENG-Virtualization R&D > > > > > -- > I don't wish to be everything to everyone, but I would like to be something to someone.
--
Michael Pasternak RedHat, ENG-Virtualization R&D
-- I don't wish to be everything to everyone, but I would like to be something to someone.
-- Michael Pasternak RedHat, ENG-Virtualization R&D
participants (1)
-
Michael Pasternak