Bug 1344048 - When importing an image as a template from Glance via the REST API, the template's name is ignored and a default one is generated
Summary: When importing an image as a template from Glance via the REST API, the templ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 3.6.2
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-4.0.0-rc
: 4.0.0
Assignee: Idan Shaby
QA Contact: Carlos Mestre González
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-08 15:20 UTC by Idan Shaby
Modified: 2016-08-01 12:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-01 12:24:42 UTC
oVirt Team: Storage
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
amureini: devel_ack+
acanan: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 58869 0 master MERGED restapi: don't ignore new template's name on import image from Glance 2016-06-09 08:53:40 UTC
oVirt gerrit 58904 0 ovirt-engine-4.0 MERGED restapi: don't ignore new template's name on import image from Glance 2016-06-09 12:46:58 UTC

Description Idan Shaby 2016-06-08 15:20:14 UTC
Description of problem:
When importing an image as a template from Glance via the REST API, the template's name is ignored and a default one is generated.

There are two URLs that can be used to import the image via the REST API:
1. .../api/storagedomains/<domain_id>/images/<image_id>/import
2. .../api/openstackimageproviders/<provider_id>/images/<image_id>/import

The first option works, the second doesn't.

Version-Release number of selected component (if applicable):
6e601c1586eccfd16b0416f57e1d71e79ef2098b

How reproducible:
100%

Steps to Reproduce:
Using a URL of the form:
".../api/openstackimageproviders/<provider_id>/images/<image_id>/import"
Send a post request:
<action>
  <storage_domain id="<domain_id>"/>
  <cluster id="<cluster_id>"/>
  <import_as_template>true</import_as_template>
  <template><name>template_name</name></template>
  <disk><alias>alias</alias></disk>
</action>

Actual results:
A new default template's name is generated, something that looks like "GlanceTemplate-<7_GUID_chars>".

Expected results:
The template's name should be "template_name".

Comment 1 Red Hat Bugzilla Rules Engine 2016-06-08 15:21:45 UTC
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.

Comment 2 Martin Perina 2016-06-10 15:06:17 UTC
Setting target release to 4.0.0 as it's included in today's 4.0.0.4 build

Comment 4 Carlos Mestre González 2016-07-07 16:03:15 UTC
verified: rhevm-4.0.2-0.2.rc1.el7ev.noarch


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