Bug 845235 - ovirt-engine-cli: collection-based-options definition doesn't look like cli format
Summary: ovirt-engine-cli: collection-based-options definition doesn't look like cli ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine-cli
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Michael Pasternak
QA Contact: Ilia Meerovich
URL:
Whiteboard: infra
Depends On: 833788
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-02 11:44 UTC by Oded Ramraz
Modified: 2016-02-10 19:30 UTC (History)
12 users (show)

Fixed In Version: 3.1.0.8
Doc Type: Bug Fix
Doc Text:
Clone Of: 833788
: 859684 (view as bug list)
Environment:
Last Closed: 2012-12-04 19:57:08 UTC
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 1 Oded Ramraz 2012-08-02 11:46:23 UTC
Michael , Did you reach a conclusion yet ?

Comment 8 Michael Pasternak 2012-08-14 12:05:47 UTC
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 10:54:43 UTC
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 11:05:44 UTC
(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 11:07:02 UTC
Correction: Comment 8, not 7

Comment 13 Ilia Meerovich 2012-09-20 12:16:06 UTC
so should i open another bug for it?

Comment 14 Michael Pasternak 2012-09-20 12:24:50 UTC
(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 15:05:53 UTC
(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 08:36:32 UTC
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.