Skip to content

[BUG]: In volume details, io_limit_policy dictionary in key 'name' is holding 'id' value. #43

Open
@Piaskun

Description

@Piaskun

Describe the bug
If volume has io_limit_policy applied, on volume details we have:

"io_limit_policy": {
  "id": "qp_2",
  "name": "qp_2"
},

So for both 'id' and 'name' key, dictionary has 'id' value.

To Reproduce
Steps to reproduce the behavior:

  1. Set IO policy on volume
  2. Query volume details
  3. io_limit_policy dictionary has io_policy id in both 'id' and 'name' keys.

Expected behavior
io_limit_policy dictionary has io_policy name value under 'name' key.

Additional context
I suspect bug in:
volume.py line 971:

            if obj_vol.io_limit_policy:
                volume_details.update(
                    {'io_limit_policy': {'name': obj_vol.io_limit_policy.id,
                                         'id': obj_vol.io_limit_policy.id}})

Metadata

Metadata

Assignees

No one assigned

    Labels

    jiraAn internal JIRA issue exists in backlogneeds-triageTriage requiredtype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions