Bug 1282832 - The "--parameter-..." options aren't processed correctly
The "--parameter-..." options aren't processed correctly
Product: ovirt-engine-cli
Classification: oVirt
Component: Core (Show other bugs)
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-3.6.2
Assigned To: Juan Hernández
: ZStream
Depends On:
  Show dependency treegraph
Reported: 2015-11-17 09:58 EST by Juan Hernández
Modified: 2016-02-18 06:00 EST (History)
3 users (show)

See Also:
Fixed In Version: ovirt-engine-cli-
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-18 06:00:52 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
juan.hernandez: ovirt‑3.6.z?
juan.hernandez: planning_ack?
juan.hernandez: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 48676 master MERGED cli: Process correct "--parent..." options Never
oVirt gerrit 48812 cli_3.6 MERGED cli: Process correctly "--parent..." options Never

  None (edit)
Description Juan Hernández 2015-11-17 09:58:37 EST
The CLI assumes that the option used to specify parent collections is "--type-identifier", but it can also be "--parent-type-identifier" or "--parent-type-name". If one of these two alternatives is used when trying to add an object, the CLI won't recognize them and won't select the right parent. As a result the autocompleted list of available options will be incorrect. For example, when adding a disk to a storage domain the user will type the following:

  $ add disk --parent-storagedomain-name mydata <TAB><TAB>

But the CLI won't understand the "--parent-storagedomain-name" option, and it will show the options of the "/disks" collection instead of the options of the "/storagedomains/{storagedomain:id}/disks" collection.
Comment 1 Sandro Bonazzola 2015-12-23 08:40:34 EST
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA
Comment 2 Gonza 2016-02-04 07:15:03 EST
Verified with:

[oVirt shell (connected)]# add disk --parent-storagedomain-name mydata <TAB><TAB>
alias                            expect                           name                             parent-storagedomain-name        quota-id                         unregistered
bootable                         format                           openstack_volume_type-name       parent-vm-identifier             sgio                             wipe_after_delete
correlation_id                   interface                        parent-datacenter-identifier     parent-vm-name                   shareable                        
description                      lun_storage-logical_unit         parent-datacenter-name           propagate_errors                 size                             
disk_profile-id                  lun_storage-type                 parent-storagedomain-identifier  provisioned_size                 sparse                

[oVirt shell (connected)]# add disk <TAB><TAB>
alias                            expect                           lun_storage-type                 parent-storagedomain-identifier  provisioned_size                 sparse
bootable                         format                           name                             parent-storagedomain-name        quota-id                         storage_domains-storage_domain
correlation_id                   interface                        openstack_volume_type-name       parent-vm-identifier             sgio                             wipe_after_delete
description                      lun_storage-host                 parent-datacenter-identifier     parent-vm-name                   shareable                        
disk_profile-id                  lun_storage-logical_unit         parent-datacenter-name           propagate_errors                 size

Note You need to log in before you can comment on or make changes to this bug.