Bug 1253710 - [RFE] Add template methods to work with Cloud-Init/Sysprep settings through RHEVM API
[RFE] Add template methods to work with Cloud-Init/Sysprep settings through R...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine (Show other bugs)
3.5.3
Unspecified Unspecified
medium Severity medium
: ovirt-4.0.0-alpha
: 4.0.0
Assigned To: Shahar Havivi
sefi litmanovich
: FutureFeature
: 1324962 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-14 09:41 EDT by Javier Ramirez
Modified: 2016-08-23 16:28 EDT (History)
15 users (show)

See Also:
Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Enhancement
Doc Text:
Cloud-Init and Sysprep settings can now be modified using REST APIs.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-23 16:28:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Virt
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 45241 master MERGED api: RFE: support cloud-init/sysprep in Template Never

  None (edit)
Comment 1 Javier Ramirez 2015-08-14 10:05:11 EDT
- What is the nature and description of the request?  

	Customer have several (6 to 8) RHEV-Ms and they are moving to using cloud-init to create base templates for provisioning VMs and they would like to automate some of this work using RHEV API.

- Why does the customer need this? (List the business requirements here)  

Customer are moving from a Satellite based provisioning approach to cloud-init and templates.

With 6 to 8 RHEV-Ms an easier way to edit and display Cloud-Init/Sysprep settings in templates using the API is required.
      
- How would the customer like to achieve this? (List the functional requirements here)  

Available template methods in the RHEVM API to edit and display Cloud-Init/Sysprep settings.
      
- For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  

Cloud-Init/Sysprep settings in templates to be displayed in the XML using the browser.

Cloud-Init/Sysprep settings in templates be able to be modified using API calls.
      
- Is there already an existing RFE upstream or in Red Hat Bugzilla?  

None found.
      
- Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  

As soon as possible.
      
- Is the sales team involved in this request and do they have any additional input?  

No

- List any affected packages or components.  

Unknown.

- Would the customer be able to assist in testing this functionality if implemented?  

Yes.
Comment 2 Scott Herold 2015-08-20 21:58:56 EDT
RFE flagged for 3.6 after dev freeze.  Proposing for RHEV 4.0.
Comment 3 Juan Hernández 2016-04-07 14:46:02 EDT
*** Bug 1324962 has been marked as a duplicate of this bug. ***
Comment 4 sefi litmanovich 2016-04-19 08:54:00 EDT
Test but not yet verified with ovirt-engine-4.0.0-0.0.master.20160405102116.git3819ab7.el7.centos.noarch.

Verified flows:
1. Create a template from Vm with initialization params. -> Template inherits all the different params values successfully, initialization attribute and it's sub attributes appear on API as in Vm entity. Test case works both when creating template trough webadmin and API.

2. Edit an existing template, fill initialization params with values - > Same result. Test case works both when editing template through webadmin and API.

3. Create a vm from a template with initialization params -> Vm inherits all params values successfully. Test case works both when creating vm through webadmin and API.

4. Create a vm pool from a template with initialization params -> Vm pool and the specific vms in it inherit all params values successfully. Test case works both when creating vm pool through webadmin and API.

Bugs:

1. Editing some sub attribute of vm's or template's initialization attr via API will override all other sub_attributes e.g.

say you have a template with:

<initialization>
<host_name>foo.bar.com</host_name>
<dns_servers>1.2.3.4</dns_servers
</initialization>

and now you want to change the dns_servers value:

PUT https://{engine_url/ovirt-engine/api/templates/{template_id}

<template>
<initialization>
<dns_servers>5.6.7.8</dns_servers
</initialization>
</template>

Result is that host_name is overridden and is now blank, only dns_servers will be updated. 


2. There is a related bug which I will open because is not blocking the feature:
when you set some initialization params on template and then try to create a new vm from webadmin templates tab, it overrides the initialization params of the template. this doesn't happen if you create a new vm from VMS tab and chose that template.
Comment 5 Shahar Havivi 2016-04-20 03:44:59 EDT
This is a bug but a different one,
Please open a new bug for that issue.
Comment 6 sefi litmanovich 2016-04-20 04:26:10 EDT
verified with ovirt-engine-4.0.0-0.0.master.20160405102116.git3819ab7.el7.centos.noarch.
Verified according to flows mentioned in comment #4.
two related bugs  were opened:

https://bugzilla.redhat.com/show_bug.cgi?id=1328737
https://bugzilla.redhat.com/show_bug.cgi?id=1328463
Comment 8 errata-xmlrpc 2016-08-23 16:28:33 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-1743.html

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