Bug 910092 - [RESTAPI] Search by name when creating object don't work in user level API.
Summary: [RESTAPI] Search by name when creating object don't work in user level API.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-restapi
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Oved Ourfali
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks: 917401
TreeView+ depends on / blocked
 
Reported: 2013-02-11 19:10 UTC by Ondra Machacek
Modified: 2016-02-10 19:20 UTC (History)
10 users (show)

Fixed In Version: sf9
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 12290 0 None None None Never

Description Ondra Machacek 2013-02-11 19:10:38 UTC
Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1. Add user with DiskCreator to SD.
2. Create disk as user via user API by specifing SD name, not id


Expected results:
Disk is created.

Actual results:
$curl -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -H "Filter: $filter" \
    -u $PU2 -d "<disk><storage_domains><storage_domain><name>sd</name></storage_domain></storage_domains><provisioned_size>1048576</provisioned_size><interface>virtio</interface><format>cow</format></disk>" \
    https://url/api/disks

<html><head><title>JBoss Web/7.0.16..Final-redhat-1 - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.NullPointerException
	org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:340)
	org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:214)
	org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:190)
	org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:540)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
	org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
	org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
	org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
</pre></p><p><b>root cause</b> <pre>java.lang.NullPointerException
</pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the JBoss Web/7.0.16..Final-redhat-1 logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/7.0.16..Final-redhat-1</h3></body></html>

Additional info:
Problem is also for creating template by specifieng vm name:

curl -k -X POST -H "Accept: application/xml" -H "Content-Type: application/xml"  -H "Filter: $filter"\
    -d "<template><name>temp</name><vm><name>vm</name></vm></template>" \
    -u $U https://url:443/api/templates/

<fault>
    <reason>Operation Failed</reason>
    <detail>query execution failed due to insufficient permissions.</detail>
</fault>

Comment 1 Oved Ourfali 2013-02-21 15:48:51 UTC
Ondra - Please open a separate bug on the second issue. It has nothing to do with the first one.

Comment 4 Itamar Heim 2013-06-11 08:41:33 UTC
3.2 has been released

Comment 5 Itamar Heim 2013-06-11 08:41:33 UTC
3.2 has been released

Comment 6 Itamar Heim 2013-06-11 08:41:35 UTC
3.2 has been released

Comment 7 Itamar Heim 2013-06-11 08:48:55 UTC
3.2 has been released


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