Bug 817798
| Summary: | REST API: logical network <usages> accept only <usage> as UPPERCASE. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Avi Tal <atal> | ||||||
| Component: | ovirt-engine-restapi | Assignee: | Muli Salem <msalem> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Yaniv Kaul <ykaul> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | low | ||||||||
| Version: | 3.0.0 | CC: | dyasny, ecohen, iheim, jkt, lpeer, mpastern, Rhev-m-bugs, srevivo, ykaul | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | network | ||||||||
| Fixed In Version: | si16 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2012-12-04 20:00:51 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | Network | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
Created attachment 581347 [details]
engine log
Created attachment 581348 [details]
console log
Proposed patch in: http://gerrit.ovirt.org/#/c/6502/1 fixed in: 82c3d142c558288aa3b617aaf5ec8c97f4cf7fdd verify on si13 - PASS POST <network> <name>sw1</name> <data_center id="6af93d87-cdd7-4b22-8a6e-f63285019ac6"/> <usages> <usage>vm</usage> </usages> </network> response code 201 Reopen BZ because response body still contain usages in CAPITAL Letters. response: <network> <name>sw1</name> <data_center id="6af93d87-cdd7-4b22-8a6e-f63285019ac6"/> <usages> <usage>VM</usage> <usage>DISPLAY</usage> </usages> </network> why there is no description for this in /capabilities resource?, please describe <usages> accordingly. Proposed patch in http://gerrit.ovirt.org/#/c/7431/ verify on SI16 - PASS sent: <usages> <usage>vm</usage> </usages> response usage is the same. note: same for "display" |
POST the following usages collection to api/networks <network> <name>sw1</name> ... <usages><usage>vm</usage></usages> </network> (NOTE: VM instead of vm will work perfect) response for lowercase 'vm': 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 org.ovirt.engine.api.restapi.resource.BackendNetworksResource.getActionParameters(BackendNetworksResource.java:60) org.ovirt.engine.api.restapi.resource.BackendNetworksResource.add(BackendNetworksResource.java:35) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:616) org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155) org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222) org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211) org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525) 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)