Description of problem: There is one available function in which we can import an image from a glance repository. Class StorageDomainImage Method: Action importImage(Action action) it is very important to our automation code to have Action importImage(Action action, string correlationId) Version-Release number of selected component (if applicable): ovirt-engine-sdk-java-3.6.0.0-0.15.20150724.git2543969.el6.noarch.rpm
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.