Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1148828

Summary: [REGENERATE JAVA SDK] Unable to get unregistered vms in SDK
Product: Red Hat Enterprise Virtualization Manager Reporter: Juan Hernández <juan.hernandez>
Component: ovirt-engine-sdk-javaAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED ERRATA QA Contact: Ondra Machacek <omachace>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: aberezin, amureini, bazulay, ecohen, gklein, iheim, lsurette, omachace, pstehlik, ratamir, rbalakri, Rhev-m-bugs, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: rhevm-sdk-java-3.5.0.5-3.el6ev Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1148715 Environment:
Last Closed: 2015-02-11 18:11:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1148715    
Bug Blocks: 1156162    

Description Juan Hernández 2014-10-02 13:21:58 UTC
+++ This bug was initially created as a clone of Bug #1148715 +++

Description of problem:
To get unregistered vms thorough REST api:
GET /api/storagedomain/{sd_id:'xxxx'}/vms;unregistered

in SDK this behaviour isn't supported  

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Juan Hernández on 2014-10-02 09:16:48 EDT ---

This happens because the "unregistered" parameter isn't included in the RSDL metadata for the storagedomains/{storagedomain:id}/vms collection.

Once this is fixed the SDKs will need to be regenerated.

Comment 2 Ondra Machacek 2014-10-23 12:30:12 UTC
public static void main(String[] args) throws Exception{
        Api api = new Api(URL, user, password, true, false);

        org.ovirt.engine.sdk.decorators.StorageDomain sd = api.getStorageDomains().get("om03");
        for(org.ovirt.engine.sdk.decorators.StorageDomainVM vm : sd.getVMs().list(1, true)) {
            System.out.println(vm.getName());
        }

        api.shutdown();
    }

Comment 4 errata-xmlrpc 2015-02-11 18:11:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0184.html