| Summary: | Docs: Python v4 SDK documentation does not mention the correct import statement - for the v4 SDK. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Pavel Zhukov <pzhukov> | ||||||
| Component: | Documentation | Assignee: | rhev-docs <rhev-docs> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | rhev-docs <rhev-docs> | ||||||
| Severity: | low | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 4.0.0 | CC: | amureini, gklein, juan.hernandez, lsurette, omachace, pzhukov, rbalakri, srevivo, tnisan, ykaul, ylavi | ||||||
| Target Milestone: | ovirt-4.0.3 | Keywords: | Reopened | ||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2016-08-25 02:07:45 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | Docs | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
|
Description
Pavel Zhukov
2016-08-21 17:05:46 UTC
Engine logs please? Ondre, should someone from Storage look at it, or is this an issue with the SDK itself? (In reply to Allon Mureinik from comment #2) > Ondre, should someone from Storage look at it, or is this an issue with the > SDK itself? Ondra, of course. My apologies for misspelling your name. The import is not importing the v4 SDK: should be: import ovirtsdk4 as sdk while the snippet @ https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/single/python-sdk-guide/#Example_Creating_a_Virtual_Machine_Storage_Disk_using_Python shows: from ovirtsdk.api import API from ovirtsdk.xml import params So I assume it's using the v3 SDK. (if that's correct, then this should be moved to a Docs bug). (In reply to Yaniv Kaul from comment #4) > The import is not importing the v4 SDK: > should be: > import ovirtsdk4 as sdk > > while the snippet @ > https://access.redhat.com/documentation/en/red-hat-virtualization/4.0/single/ > python-sdk-guide/ > #Example_Creating_a_Virtual_Machine_Storage_Disk_using_Python shows: > > from ovirtsdk.api import API > from ovirtsdk.xml import params > > So I assume it's using the v3 SDK. > > (if that's correct, then this should be moved to a Docs bug). It's correct. That's why I've opened this BZ against docs component Created attachment 1192834 [details]
engine log
Changing title accordingly... This is Python SDK v3. The script in attachment is not what you have in traceback in bug description. I can see there : d = sd.disks.add(disk_params) Didn't you want to write something like `vm.disks.add(..)` ? (In reply to Ondra Machacek from comment #8) > This is Python SDK v3. The script in attachment is not what you have in > traceback > in bug description. I can see there : > > d = sd.disks.add(disk_params) > > Didn't you want to write something like `vm.disks.add(..)` ? Right.Thanks. I messed up things during copy-pasting. Sorry about that. Closing (In reply to Ondra Machacek from comment #8) > This is Python SDK v3. The script in attachment is not what you have in The docs link in comment 1 is for v4 API and does not contain the correct import statement, as indicated in comment 4 . Please fix. As far as I know we don't have SDK v4 doc, yet. The link is for v3. We don't have any v4 docs yet. This is planned for the first z stream. |