Bug 1251900
Summary: | ovirt-java-sdk: missing imageImport function overload with correlation_id in java sdk | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Tareq Alayan <talayan> |
Component: | ovirt-engine-sdk-java | Assignee: | Daniel Erez <derez> |
Status: | CLOSED NOTABUG | QA Contact: | Raz Tamir <ratamir> |
Severity: | high | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.6.0 | CC: | acanan, amureini, ecohen, gklein, juan.hernandez, lsurette, yeylon |
Target Milestone: | ovirt-3.6.3 | ||
Target Release: | 3.6.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | storage | ||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-08-17 14:45:32 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | Storage | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tareq Alayan
2015-08-10 09:17:59 UTC
The latest version of the Java SDK (3.6.0.0-0.15, same that you are using) already contains an "importImage" method with a "correlationId" parameter: https://gerrit.ovirt.org/gitweb?p=ovirt-engine-sdk-java.git;a=blob;f=sdk/src/main/java/org/ovirt/engine/sdk/decorators/StorageDomainImage.java;h=da6758ebd243f01f3a9bb0c4615d001246dba75a;hb=HEAD#l176 public Action importImage(Action action, Boolean async, String correlationId) { ... } Juan, in java doc Name : ovirt-engine-sdk-java-javadoc Arch : noarch Version : 3.6.0.0 Release : 0.720150409.git14b3c31.el6 Size : 4.1 M Repo : installed From repo : ovirt-master-snapshot Summary : Javadocs for ovirt-engine-sdk-java URL : http://ovirt.org License : ASL 2.0 Description : This package contains the API documentation for ovirt-engine-sdk-java. public Action importImage(Action action) throws org.apache.http.client.ClientProtocolException, ServerException, IOException Performs importImage action. Parameters: action - Action Returns: Action and it fails when automation since it misses the exepected function overload. java_sdk.VERSION '3.6.0.0.0.15.20150724.2543969' That version of the Javadoc is old, it corresponds to version 3.6.0.0-0.7 of the SDK, and you are using 3.6.0.0-0.15. You can verify that the method exists in the SDK that you have installed with the following command: $ javap -cp /usr/share/java/ovirt-engine-sdk-java/ovirt-engine-sdk-java.jar org.ovirt.engine.sdk.decorators.StorageDomainImage | grep importImage Note that the relevant method has three paremeters: action, async and correlationId. Can it be that the automation frameworks expects them in a different order? Yes, is it possible to change the order to (action, str correlation_id, bool async) Yes, it is possible, something like this: https://gerrit.ovirt.org/45096 sdk: Change order of parameters of StorageDomain.importImage However the current order (alphabetical) is the default order for all new methods. This means that if a new action is added in the future, to any resource, it will be ordered as "async" and then "correlationId". So the testing framework will have to eventually deal with this, I think it is better if you handle it now. |