Change in ovirt-engine[master]: restapi: Separate DNS server addresses with spaces

juan.hernandez at redhat.com juan.hernandez at redhat.com
Tue Oct 25 15:00:34 UTC 2016


Juan Hernandez has submitted this change and it was merged.

Change subject: restapi: Separate DNS server addresses with spaces
......................................................................


restapi: Separate DNS server addresses with spaces

Currently when a set of DNS servers is provided as the initialization
data for a virtual machine the result is concatenated and saved to the
database, without spaces. For example, if the following data passed to
the API:

  <vm>
    <initialization>
      <cloud_init>
        <network_configuration>
          <dns>
            <servers>
              <host>
                <address>192.168.0.1</address>
              </host>
              <host>
                <address>192.168.0.2</address>
              </host>
              <host>
                <address>192.168.0.3</address>
              </host>
            </servers>
          </dns>
          ...
        </network_configuration>
        ...
      </cloud_init>
    </initialization>
    ...
 </vm>

Then the following is stored in the database (note that there are no
spaces separating the addresses):

  192.168.0.1192.168.0.2192.168.0.3

And the following is added to the generated cloud-init configuration
file:

  dns-nameservers 192.168.0.1192.168.0.2192.168.0.3

This way to provide the cloud-init configuration is deprecated, the
preferred way is to use directly the 'initialization' element:

  <vm>
    <initialization>
      <dns_servers>192.168.0.1 192.168.0.2 192.168.0.3</dns_servers>
      ...
    </initialization>
    ...
  </vm>

But we should fix the issue anyhow. That is what this patch does.

Change-Id: I417bd7b1da69bda0d3b2879ee519ea4744fd35a9
Signed-off-by: Juan Hernandez <juan.hernandez at redhat.com>
---
M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VmMapper.java
1 file changed, 6 insertions(+), 6 deletions(-)

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



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

Gerrit-MessageType: merged
Gerrit-Change-Id: I417bd7b1da69bda0d3b2879ee519ea4744fd35a9
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: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Sven Kieske <svenkieskemittwald at gmail.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list