Bug 1305575

Summary: [RFE] Python SDK 4.0 - make boot device syntax more pythonic
Product: [oVirt] ovirt-engine-sdk-python Reporter: Sandro Bonazzola <sbonazzo>
Component: RFEsAssignee: Juan Hernández <juan.hernandez>
Status: CLOSED CURRENTRELEASE QA Contact: Lukas Svaty <lsvaty>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: ---CC: bugs, grafuls, mgoldboi, pstehlik
Target Milestone: ovirt-4.0.0-alphaKeywords: FutureFeature, Improvement
Target Release: 4.0.0aFlags: rule-engine: ovirt-4.0.0+
pnovotny: testing_plan_complete-
mgoldboi: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt 4.0.0 alpha1 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-26 10:57:31 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Infra RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sandro Bonazzola 2016-02-08 15:45:53 UTC
Description of problem:
In 3.6:

params.OperatingSystem(
    type_='unassigned',
    boot=(
        params.Boot(dev='cdrom'),
        params.Boot(dev='hd'),
    ),
)

now translates to

params.OperatingSystem(
    type_='unassigned',
    boot=params.Boot(
        devices=params.devicesType(
            device=[
                'cdrom',
                'hd',
            ],
       ),
    )
)

while I would have expected something like:

params.OperatingSystem(
    type_='unassigned',
    boot=params.Boot(
        devices=['cdrom', 'hd'],
    )
)

to just store a list of strings.

Comment 1 Juan Hernández 2016-03-31 16:27:44 UTC
In version 4 of the SDK it works like this:

  import ovirtsdk4.types as types

  types.OperatingSystem(
    type='unassigned',
    boot=types.Boot(
      devices=[
        types.BootDevice.NETWORK,
        types.BootDevice.HD,
      ],
    ),
  ),

Comment 2 Lukas Svaty 2016-07-26 10:57:31 UTC
This bug was fixed and is slated to be in the upcoming version. As we
are focusing our testing at this phase on severe bugs, this bug was
closed without going through its verification step. If you think this
bug should be verified by QE, please set its severity to high and move
it back to ON_QA