Type list request version support error

Bug #1750964 reported by chenyb4
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-senlinclient
Fix Released
Undecided
chenyb4

Bug Description

When i was execute "openstack cluster profile/policy type list" appear error.

NoneType' object has no attribute 'keys'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 113, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/senlinclient/v1/policy_type.py", line 41, in take_action
    for v in t.support_status.keys():
AttributeError: 'NoneType' object has no attribute 'keys'
clean_up PolicyTypeList: 'NoneType' object has no attribute 'keys'
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 134, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 279, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/osc_lib/shell.py", line 169, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 400, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/site-packages/cliff/display.py", line 113, in run
    column_names, data = self.take_action(parsed_args)
  File "/usr/lib/python2.7/site-packages/senlinclient/v1/policy_type.py", line 41, in take_action
    for v in t.support_status.keys():
AttributeError: 'NoneType' object has no attribute 'keys'

The problem is that senlin introduced the request version judgment.
Look senlin code:
https://github.com/openstack/senlin/blob/master/senlin/api/openstack/v1/policy_types.py#L36
The request version judgment is made here, so the return value is different.

Look python-senlin code:
https://github.com/openstack/python-senlinclient/blob/master/senlinclient/v1/policy_type.py#L41
There is no value processing based on the different request return values.

chenyb4 (chenyb4)
Changed in python-senlinclient:
assignee: nobody → chenyb4 (chenyb4)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-senlinclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/546918

Changed in python-senlinclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-senlinclient (master)

Reviewed: https://review.openstack.org/546918
Committed: https://git.openstack.org/cgit/openstack/python-senlinclient/commit/?id=842c1c3c0187bbb407fd532c80bf529edad1dbbf
Submitter: Zuul
Branch: master

commit 842c1c3c0187bbb407fd532c80bf529edad1dbbf
Author: Yuanbin.Chen <email address hidden>
Date: Thu Feb 22 16:12:03 2018 +0800

    Fix request version returns value handling error.

    The request version is processed in the senlin code, so there are
    different return values. The senlinclient should do different things.

    Change-Id: I1091377e18e5e57d6c605d42ec40bd5b75625a3b
    Closes-Bug: #1750964

Changed in python-senlinclient:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-senlinclient 1.8.0

This issue was fixed in the openstack/python-senlinclient 1.8.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.