Bug 845235 - ovirt-engine-cli: collection-based-options definition doesn't look like cli format
ovirt-engine-cli: collection-based-options definition doesn't look like cli ...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli (Show other bugs)
3.1.0
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Michael Pasternak
Ilia Meerovich
infra
: TestBlocker
Depends On: 833788
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-02 07:44 EDT by Oded Ramraz
Modified: 2016-02-10 14:30 EST (History)
12 users (show)

See Also:
Fixed In Version: 3.1.0.8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 833788
: 859684 (view as bug list)
Environment:
Last Closed: 2012-12-04 14:57:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 1 Oded Ramraz 2012-08-02 07:46:23 EDT
Michael , Did you reach a conclusion yet ?
Comment 8 Michael Pasternak 2012-08-14 08:05:47 EDT
well, after struggling xsd schema compatibility issues for a while, i came to conclusion that only possible way to implement this feature in a generic way is:

--<type>.<collection_obj>.<collection> "<collection_item>.<coll_item_prop>=val"

for instance:

create host --power_management-options-option "option.name=n1,option.value=v1" --power_management-options-option "option.name=n2,option.value=v2"
Comment 10 Ilia Meerovich 2012-09-20 06:54:43 EDT
It is working, however we have a bug there, it can work in both was:
1) --os-boot boot.dev=hd
2) --os-boot dev=hd

Please take a look:

[RHEVM shell (connected)]# create vm  --description 'Test VM LOCA' --cluster-name Default --name 'restvm_LOCAL' --display-type 'spice' --display-monitors 1 --type 'desktop' --template-id '00000000-0000-0000-0000-000000000000' --memory 1073741824 --os-boot boot.dev=hd --os-type 'unassigned' --cpu-topology-cores 1 --cpu-topology-sockets 1

id                        : 12d568b1-46c8-4205-8f92-d8723964dd87
name                      : restvm_LOCAL
description               : Test VM LOCA
cluster-id                : 99408929-82cf-4dc7-a532-9d998063fa95
cpu-topology-cores        : 1
cpu-topology-sockets      : 1
creation_time             : 2012-09-20T13:50:59.809+03:00
display-allow_reconnect   : False
display-monitors          : 1
display-type              : spice
high_availability-enabled : False
high_availability-priority: 0
memory                    : 1073741824
memory_policy-guaranteed  : 1073741824
origin                    : rhev
os-boot-dev               : hd
os-type                   : unassigned
placement_policy-affinity : migratable
quota-id                  : 00000000-0000-0000-0000-000000000000
stateless                 : False
status-state              : down
template-id               : 00000000-0000-0000-0000-000000000000
type                      : desktop
usb-enabled               : False

[RHEVM shell (connected)]# create vm  --description 'Test VM LOCA' --cluster-name Default --name 'restvm_LOCAL1' --display-type 'spice' --display-monitors 1 --type 'desktop' --template-id '00000000-0000-0000-0000-000000000000' --memory 1073741824 --os-boot dev=hd --os-type 'unassigned' --cpu-topology-cores 1 --cpu-topology-sockets 1

id                        : 5081a5b9-cf14-498d-9796-cafeeba1a43e
name                      : restvm_LOCAL1
description               : Test VM LOCA
cluster-id                : 99408929-82cf-4dc7-a532-9d998063fa95
cpu-topology-cores        : 1
cpu-topology-sockets      : 1
creation_time             : 2012-09-20T13:51:16.357+03:00
display-allow_reconnect   : False
display-monitors          : 1
display-type              : spice
high_availability-enabled : False
high_availability-priority: 0
memory                    : 1073741824
memory_policy-guaranteed  : 1073741824
origin                    : rhev
os-boot-dev               : hd
os-type                   : unassigned
placement_policy-affinity : migratable
quota-id                  : 00000000-0000-0000-0000-000000000000
stateless                 : False
status-state              : down
template-id               : 00000000-0000-0000-0000-000000000000
type                      : desktop
usb-enabled               : False

[RHEVM shell (connected)]#
Comment 11 Michael Pasternak 2012-09-20 07:05:44 EDT
(In reply to comment #10)
> It is working, however we have a bug there, it can work in both was:
> 1) --os-boot boot.dev=hd
> 2) --os-boot dev=hd
> 

Ilia, 

1. this bug about changing collection based options format

2. as i've mentioned in Comment 7, #2 not always will work because of 
   api schema consistency issues, therefore formal format is #1
Comment 12 Michael Pasternak 2012-09-20 07:07:02 EDT
Correction: Comment 8, not 7
Comment 13 Ilia Meerovich 2012-09-20 08:16:06 EDT
so should i open another bug for it?
Comment 14 Michael Pasternak 2012-09-20 08:24:50 EDT
(In reply to comment #13)
> so should i open another bug for it?

i'm not sure this is a bug, just this object assignable from property=value,
format, since we do not obligate supporting this format, it doesn't sound bad,
let Simon to decide on this.
Comment 15 Simon Grinberg 2012-09-20 11:05:53 EDT
(In reply to comment #14)
> (In reply to comment #13)
> > so should i open another bug for it?
> 
> i'm not sure this is a bug, just this object assignable from property=value,
> format, since we do not obligate supporting this format, it doesn't sound
> bad,
> let Simon to decide on this.


(In reply to comment #10)
> It is working, however we have a bug there, it can work in both was:
> 1) --os-boot boot.dev=hd
> 2) --os-boot dev=hd
> 

I actually like #2 since it makes more sense, however as Michael indicated, it may not always work. If #1 is the correct and only option that always works, then we should block 2. Otherwise we'll get support cases of people complaining about inconsistency and require that #2 should be supported. 

Please clone this one and change title accordingly. This RFE is fulfilled and the #1 vs #2 is a bug. No even high priority since in documentation only the proper format will appear.
Comment 16 Ilia Meerovich 2012-09-23 04:36:32 EDT
bug 859684 opened for this issue as clone of this bug

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