Flavor name edit should trim for white spaces and compare with other flavor names

Bug #1600418 reported by Vivek Agrawal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Yakup Adakli

Bug Description

When editing the flavor name from horizon
1. Enter new flavor name which is same as one of the existing flavor name
2. Make sure that you have entered leading and trailing spaces
Try saving this flavor and it fails with error.
we should ideally strip the flavor name before making any comparison.

As a specific example
1. Create flavor with name test1
2. Create flavor with name test2
3. Edit flavor test2
4. When editing try giving name " test1 "(new name same as one of the existing flavor and leading and trailing spaces in the new name)
5. Save the flavor
6. we get an error that 'Unable to modify test1'.

Now we were modifying test2 and not test1. Error should ideally say that the flavor with name 'test1' already exists(as the case is if we try the same from CLI)

One more unexpected behavior that happens is that 'test2' in above case is removed from the flavor listing page in UI

Changed in horizon:
assignee: nobody → Vivek Agrawal (vivek-agrawal)
status: New → In Progress
description: updated
description: updated
Changed in horizon:
status: In Progress → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

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

Changed in horizon:
assignee: Vivek Agrawal (vivek-agrawal) → Yakup Adakli (yakupa)
status: New → In Progress
Changed in horizon:
importance: Undecided → Medium
status: In Progress → Triaged
milestone: none → ocata-3
tags: added: newton-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/403687
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=23c482b941b53243b9f57c5707d266870c3c2225
Submitter: Jenkins
Branch: master

commit 23c482b941b53243b9f57c5707d266870c3c2225
Author: Yakup Adakli <email address hidden>
Date: Mon Nov 28 15:28:44 2016 +0300

    Strip whitespace added to flavor name in create and update flavor.

    Change-Id: I633a4124615ca0c6cfe6b103e117e3ebd6d79241
    Closes-Bug: #1600418

Changed in horizon:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/420766

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (stable/newton)

Reviewed: https://review.openstack.org/420766
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=68fea2bd6c3fbe10494acaae2a455aea8d9c28c9
Submitter: Jenkins
Branch: stable/newton

commit 68fea2bd6c3fbe10494acaae2a455aea8d9c28c9
Author: Yakup Adakli <email address hidden>
Date: Mon Nov 28 15:28:44 2016 +0300

    Strip whitespace added to flavor name in create and update flavor.

    Change-Id: I633a4124615ca0c6cfe6b103e117e3ebd6d79241
    Closes-Bug: #1600418
    (cherry picked from commit 23c482b941b53243b9f57c5707d266870c3c2225)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 11.0.0.0b3

This issue was fixed in the openstack/horizon 11.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 10.0.2

This issue was fixed in the openstack/horizon 10.0.2 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.