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

Bug 1148715

Summary: Unable to get unregistered vms in SDK
Product: Red Hat Enterprise Virtualization Manager Reporter: Raz Tamir <ratamir>
Component: ovirt-engine-restapiAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Raz Tamir <ratamir>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.5.0CC: acanan, amureini, bazulay, ecohen, gklein, iheim, juan.hernandez, lsurette, rbalakri, Rhev-m-bugs, scohen, yeylon
Target Milestone: ---   
Target Release: 3.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: storage
Fixed In Version: org.ovirt.engine-root-3.5.0-15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1148827 1148828 (view as bug list) Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1148827, 1148828    

Description Raz Tamir 2014-10-02 08:17:13 UTC
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:

Comment 1 Juan Hernández 2014-10-02 13:16:48 UTC
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 Juan Hernández 2014-10-03 09:24:21 UTC
After applying this patch and regenerating the Python SDK the following script should list the unregistered VMs:

import ovirtsdk.api
import ovirtsdk.xml

api = ovirtsdk.api.API(
  url="https://ovirt.example.com/ovirt-engine/api",
  username="admin@internal",
  password="******",
  ca_file="/etc/pki/ovirt-engine/ca.pem"
)

sd = api.storagedomains.get(name="mydata")
for vm in sd.vms.list(unregistered=True):
    print(vm.get_name())

api.disconnect()

Comment 3 Raz Tamir 2014-10-23 07:51:04 UTC
verified - followed the steps in comment 2

Comment 4 Allon Mureinik 2015-02-16 19:13:11 UTC
RHEV-M 3.5.0 has been released, closing this bug.

Comment 5 Allon Mureinik 2015-02-16 19:13:13 UTC
RHEV-M 3.5.0 has been released, closing this bug.