Change in ovirt-engine[master]: restapi: Remove duplicated guest info

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Sep 15 13:34:08 UTC 2015


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Remove duplicated guest info
......................................................................


restapi: Remove duplicated guest info

Currently the RESTAPI provides the IP configuration gathered by the
guest agent in two places:

1. In the "guest_info" element of the VM resource:

  GET /vms/{vm:id}
  <vm>
    <guest_info>
      <ips>
        <ip address="192.168.122.30"/>
      </ips>
      <fqdn>whatever.example.com</fqdn>
    </guest_info>
  </vm>

2. In the "reported_devices" elements of the NIC and reported devices
resources:

  GET /vms/{vm:id}/nics/{nic:id}
  <nic>
    <reported_devices>
      <reported_device>
        <name>eth0</name>
        <mac address="00:1a:4a:b5:4c:94"/>
        <ips>
          <ip address="192.168.1.115" version="v4"/>
          <ip address="fe80::21a:4aff:feb5:4c94" version="v6"/>
          <ip address="::1:21a:4aff:feb5:4c94" version="v6"/>
        </ips>
      </reported_device>
    </reported_devices>
  </nic>

The first place is the original one, and has been superseded by the
second one, which provides more accurate information, including multiple
addresses.

This patch removes the first place, and moves the fully qualified domain
name to the VM resource, so that it will still be available:

  GET /vms/{vm:id}
  <vm>
    <fqdn>whatever.example.com</fqdn>
  </vm>

Change-Id: I155b45b66c9efef5215501fd30a37fd7dc3e624d
Bug-Url: https://bugzilla.redhat.com/1060791
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/README.md
M backend/manager/modules/restapi/interface/definition/src/main/schema/api.xsd
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
M backend/manager/modules/restapi/types/src/test/java/org/ovirt/engine/api/restapi/types/VmMapperTest.java
4 files changed, 56 insertions(+), 41 deletions(-)

Approvals:
  Juan Hernandez: Verified; Looks good to me, approved
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/45992
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I155b45b66c9efef5215501fd30a37fd7dc3e624d
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Ori Liel <oliel at redhat.com>
Gerrit-Reviewer: automation at ovirt.org



More information about the Engine-commits mailing list