Bug 1279231 - [REGENERATE PYTHON SDK] No auto-completion option for scheduling policy name under cluster object
[REGENERATE PYTHON SDK] No auto-completion option for scheduling policy name ...
Status: CLOSED CURRENTRELEASE
Product: ovirt-engine-sdk-python
Classification: oVirt
Component: Core (Show other bugs)
3.6.0.2
Unspecified Unspecified
unspecified Severity medium (vote)
: ovirt-3.6.3
: 3.6.3.0
Assigned To: Juan Hernández
Gonza
: Automation
Depends On: 1279159
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-08 14:01 EST by Juan Hernández
Modified: 2016-03-11 02:23 EST (History)
6 users (show)

See Also:
Fixed In Version: ovirt-engine-sdk-python-3.6.3.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1279159
Environment:
Last Closed: 2016-03-11 02:23:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑3.6.z+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
pstehlik: testing_ack+


Attachments (Terms of Use)

  None (edit)
Description Juan Hernández 2015-11-08 14:01:32 EST
+++ This bug was initially created as a clone of Bug #1279159 +++

Description of problem:
There is no 'name' attribute under scheduling policy object, when trying to add cluster, only scheduling-policy-policy, which is not compatible with other APIs

Version-Release number of selected component (if applicable):
rhevm-cli-3.5.0.6-1.el6ev.noarch
rhevm-cli-3.6.0.0-1.el6ev.noarch (this bug should be cloned to 3.6 as well)

How reproducible:
100%

Steps to Reproduce:
1.Add cluster in CLI with auto-completion options
2.
3.

Actual results:
scheduling-policy-policy exists, but incompatible with other APIs

Expected results:
scheduling-policy-name should exist

Additional info:

existing options under cluster:
'comment', 'ha_reservation', 'scheduling_policy-thresholds-duration', 'memory_policy-overcommit-percent', 'version-minor', 'data_center-id', 'scheduling_policy-id', 'correlation_id', 'expect', 'parent-datacenter-name', 'scheduling_policy-properties-property', 'fencing_policy-enabled', 'version-major', 'scheduling_policy-policy', 'scheduling_policy-thresholds-high', 'ksm-enabled', 'fencing_policy-skip_if_connectivity_broken-enabled', 'fencing_policy-skip_if_sd_active-enabled', 'ballooning_enabled', 'tunnel_migration', 'management_network-id', 'data_center-name', 'threads_as_cores', 'description', 'memory_policy-transparent_hugepages-enabled', 'display-proxy', 'gluster_service', 'parent-datacenter-identifier', 'management_network-name', 'fencing_policy-skip_if_connectivity_broken-threshold', 'error_handling-on_error', 'scheduling_policy-thresholds-low', 'name', 'cpu-id', 'maintenance_reason_required', 'virt_service', 'cpu-architecture', 'trusted_service', 'ksm-merge_across_nodes'

--- Additional comment from Oved Ourfali on 2015-11-08 04:08:49 EST ---

Juan, is that infra or sla?

--- Additional comment from Juan Hernández on 2015-11-08 13:41:31 EST ---

Initially it is infra. All CLI issues are infra as no other team takes care of the CLI.

Note however that in this particular case this will probably be caused by an incorrect description of the cluster "add" operation in the RSDL metadata. In that case the fix will require a change in the engine, and then a regeneration of the Python SDK, as the CLI extracts this information from the Python SDK. This means that eventually this bug will be moved or cloned to the RestAPI component. That moved or cloned bug will then be "sla".

--- Additional comment from Juan Hernández on 2015-11-08 13:58:18 EST ---

In order to fix this we need to change the RestAPI RSDL metadata. Then the Python SDK will need to be regenerated. The CLI doesn't need any change.
Comment 1 Red Hat Bugzilla Rules Engine 2015-11-08 18:06:03 EST
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 2 Sandro Bonazzola 2015-12-23 08:41:25 EST
oVirt 3.6.2 RC1 has been released for testing, moving to ON_QA
Comment 3 Gonza 2016-02-04 06:06:31 EST
Tested with:
ovirt-engine-cli-3.6.0.2-1.el6.noarch
ovirt-engine-sdk-python-3.6.2.1-1.el6.noarch

name property has been added to SchedulingPolicy object on api but --scheduling_policy-name parameter is not available on cli.

# sed -n '9851,+4p' /usr/lib/python2.6/site-packages/ovirtsdk/xml/params.py
class SchedulingPolicy(BaseResource):
    subclass = None
    superclass = BaseResource
    def __init__(self, actions=None, href=None, id=None, name=None, description=None, comment=None, creation_status=None, link=None, policy=None, thresholds=None, locked=None, default_policy=None, properties=None):
        super(SchedulingPolicy, self).__init__(actions, href, id, name, description, comment, creation_status, link, )


from 'help add cluster'
...
    * [--scheduling_policy-policy: string]
    * [--scheduling_policy-thresholds-low: int]
    * [--scheduling_policy-thresholds-high: int]
    * [--scheduling_policy-thresholds-duration: int]
    * [--scheduling_policy-id: string]
    * [--scheduling_policy-properties-property: collection]
      {
        [property.name: string]
        [property.value: string]
      }
...

# add cluster scheduling_policy-
scheduling_policy-id                   scheduling_policy-properties-property  scheduling_policy-thresholds-high      
scheduling_policy-policy               scheduling_policy-thresholds-duration  scheduling_policy-thresholds-low
Comment 4 Red Hat Bugzilla Rules Engine 2016-02-04 06:06:32 EST
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.
Comment 6 Gonza 2016-02-22 12:31:46 EST
Verified with:
ovirt-engine-cli-3.6.2.1-0.1.20160111.git696d8ea.el6.noarch
ovirt-engine-sdk-python-3.6.3.1-0.1.20160211.git13845c8.el6.noarch

[oVirt shell (connected)]# add cluster --scheduling_policy-name

Autocomplete is now working for scheduling_policy-name

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