Bug 854365
Summary: | ovirt-engine-cli : need to remove cdrom option from optional entities to create | ||
---|---|---|---|
Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Oded Ramraz <oramraz> |
Component: | ovirt-engine-cli | Assignee: | Michael Pasternak <mpastern> |
Status: | CLOSED DUPLICATE | QA Contact: | Oded Ramraz <oramraz> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 3.1.0 | CC: | bazulay, dyasny, ecohen, iheim, Rhev-m-bugs, sgrinber, ykaul |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-09-10 09:16:16 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Oded Ramraz
2012-09-04 18:33:43 UTC
attach of cdrom in api done via CREATE in /api/vms/xxx/cdroms, same in sdk/cli -> create cdrom --vm-identifier xxx --file-id yyy What exactly the CLI create ? We have two possible ways to decide which cdrom the VM will run with: 1. During VM creation / update VM 2. Using Change CD We don't have any way to create "floating" cdrom using RHEVM , I think the current behavior and documentation is misleading . (In reply to comment #1) > attach of cdrom in api done via CREATE in /api/vms/xxx/cdroms, > same in sdk/cli -> create cdrom --vm-identifier xxx --file-id yyy (In reply to comment #2) > What exactly the CLI create ? We have two possible ways to decide which > cdrom the VM will run with: oded, please see previous comment, it's not cli, it's the api structure -> to add resource to collection, you CREATE it in this collection -> CREATE in /api/vms/xxx/cdroms > 1. During VM creation / update VM > 2. Using Change CD > > We don't have any way to create "floating" cdrom using RHEVM , I think the > current behavior and documentation is misleading . > > (In reply to comment #1) > > attach of cdrom in api done via CREATE in /api/vms/xxx/cdroms, > > same in sdk/cli -> create cdrom --vm-identifier xxx --file-id yyy I understand the confusion, however the CLI concept (concepts are to late to change) is to be compatible with the API. In the API, to place an entity into sub collection is to create it there. What you are creating is a reference (in case of an existing object like a disk) or an object that must reside in a collection (Like nics or CDROM) So CDROM is a collection: https://rhevm31.mylaptop.redhat.com/api/vms/7cfd0163-422c-4fdf-869e-37378a754761/cdroms And you create a CDROM in the collection context, the same as you do for Nics <cdroms><cdrom href="/api/vms/7cfd0163-422c-4fdf-869e-37378a754761/cdroms/00000000-0000-0000-0000-000000000000" id="00000000-0000-0000-0000-000000000000"><vm href="/api/vms/7cfd0163-422c-4fdf-869e-37378a754761" id="7cfd0163-422c-4fdf-869e-37378a754761"/><file id="AnyDisk.iso"/></cdrom></cdroms> Michael, What I'm missing is the actions Change and Eject Is this achieved by updating the fileid? I think this is the confusing part. Reopening, Michael, I guess to add those you'll actually need to move it to the REST, right? If it can't be done then in any case this bug will need documentation. > Michael, > What I'm missing is the actions Change and Eject > Is this achieved by updating the fileid? change is UPDATE eject is a DELETE * same as in any other api resource > > I think this is the confusing part. > > Reopening, > Michael, I guess to add those you'll actually need to move it to the REST, > right? > > If it can't be done then in any case this bug will need documentation. btw cdrom is not a property by <cdrom> resource in <cdroms> collection (In reply to comment #6) > > Michael, > > What I'm missing is the actions Change and Eject > > Is this achieved by updating the fileid? > > change is UPDATE > eject is a DELETE > This is confusing, since eject will not remove the CDROM device from the VM While the concept may work well with other sub-collections, I think we need Eject/Change CD are in order for the CLI. Don't forget that the CLI is the UI equivalent, it has to be user friendly. So if it requires the API to provide those actions so be it. (In reply to comment #8) > (In reply to comment #6) > > > Michael, > > > What I'm missing is the actions Change and Eject > > > Is this achieved by updating the fileid? > > > > change is UPDATE > > eject is a DELETE > > > > This is confusing, since eject will not remove the CDROM device from the VM i don't know what the 'eject' is, this is GUI term, in api: UPDATE -> VdcActionType.ChangeDisk DELETE -> removes CD from vm * this is documented since 2.3 api what is works perfectly well from REST/sdk/cli collection concept PoV, don't forget that in real world cdrom is vm property, but in api we have collection of cdroms ... Decided to add new command : "add" in order to add cdrom to existing VM , instead of the former "create" operation . (In reply to comment #9) > (In reply to comment #8) > > (In reply to comment #6) > > > > Michael, > > > > What I'm missing is the actions Change and Eject > > > > Is this achieved by updating the fileid? > > > > > > change is UPDATE > > > eject is a DELETE > > > > > > > This is confusing, since eject will not remove the CDROM device from the VM > > i don't know what the 'eject' is, this is GUI term, Correction - 'eject' is the term humans uses to EJECT a CD. GUI, Documentation, in writing and when people talk to each other. 'remove' is also sometimes used, but less often. Never heard of anyone referring to that action as 'delete'. > > in api: > > UPDATE -> VdcActionType.ChangeDisk > DELETE -> removes CD from vm > > * this is documented since 2.3 api > > what is works perfectly well from REST/sdk/cli collection concept PoV, > don't forget that in real world cdrom is vm property, but in api we have > collection of cdroms ... Oded, we did not agreed on this change on yesterday's meeting. (In reply to comment #10) > Decided to add new command : "add" in order to add cdrom to existing VM , > instead of the former "create" operation . we decided not to add new 'add' command for the cdrom, but rename existent 'create' to 'add' (In reply to comment #11) > (In reply to comment #9) > > (In reply to comment #8) > > > (In reply to comment #6) > > > > > Michael, > > > > > What I'm missing is the actions Change and Eject > > > > > Is this achieved by updating the fileid? > > > > > > > > change is UPDATE > > > > eject is a DELETE > > > > > > > > > > This is confusing, since eject will not remove the CDROM device from the VM > > > > i don't know what the 'eject' is, this is GUI term, > > Correction - 'eject' is the term humans uses to EJECT a CD. GUI, > Documentation, in writing and when people talk to each other. > 'remove' is also sometimes used, but less often. > Never heard of anyone referring to that action as 'delete'. i don't mind renaming 'delete' to 'remove' if you find it better, please file+approve new bug, thanks. > > > > > in api: > > > > UPDATE -> VdcActionType.ChangeDisk > > DELETE -> removes CD from vm > > > > * this is documented since 2.3 api > > > > what is works perfectly well from REST/sdk/cli collection concept PoV, > > don't forget that in real world cdrom is vm property, but in api we have > > collection of cdroms ... *** This bug has been marked as a duplicate of bug 855773 *** |