Bug 1282832 - The "--parameter-..." options aren't processed correctly
Summary: The "--parameter-..." options aren't processed correctly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine-cli
Classification: oVirt
Component: Core
Version: 3.6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ovirt-3.6.2
: 3.6.0.1
Assignee: Juan Hernández
QA Contact: Gonza
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-17 14:58 UTC by Juan Hernández
Modified: 2016-02-18 11:00 UTC (History)
3 users (show)

Fixed In Version: ovirt-engine-cli-3.6.1.0
Clone Of:
Environment:
Last Closed: 2016-02-18 11:00:52 UTC
oVirt Team: Infra
Embargoed:
juan.hernandez: ovirt-3.6.z?
juan.hernandez: planning_ack?
juan.hernandez: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 48676 0 master MERGED cli: Process correct "--parent..." options Never
oVirt gerrit 48812 0 cli_3.6 MERGED cli: Process correctly "--parent..." options Never

Description Juan Hernández 2015-11-17 14:58:37 UTC
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 13:40:34 UTC
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA

Comment 2 Gonza 2016-02-04 12:15:03 UTC
Verified with:
ovirt-engine-cli-3.6.2.0-1.el6.noarch

[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.