Enforce length checking for instance name field in update instance

Bug #1279590 reported by Yuanhui Liu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Yuanhui Liu

Bug Description

There is an allowed maximum length for instance name, while current code doesn't check / restrict the instance name field when update an instance.

One question regarding this issue is what number should be used for the max_length: current code in create instance is using 80 as the max_length, while back end seems to be using 255, as shown in the error message below:

RESP BODY: {"badRequest": {"message": "Server name has more than 255 characters.", "code": 400}}

Would be really appreciate if somebody can help clarify this. Thanks.

Yuanhui Liu (liuyu)
Changed in horizon:
assignee: nobody → Yuanhui Liu (liuyu)
Changed in horizon:
status: New → Confirmed
Revision history for this message
Yuanhui Liu (liuyu) wrote :

Thanks Zhengguo for your confirmation. Was wondering if you have seen my question in my bug description section and if you know the answer for that? Thank you!

Revision history for this message
Julie Pichon (jpichon) wrote :

Horizon should match the backend's restriction.

tags: added: low-hanging-fruit
Changed in horizon:
importance: Undecided → Medium
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/79485

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

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

commit ea5ae375321407986c271103099678198671033e
Author: Yuanhui Liu <email address hidden>
Date: Mon Mar 10 16:01:17 2014 -0700

    Enforce length checking for instance name field

    Add the max_length checking for instance name field in Update Instance.
    Also changed the max_length value from 80 to 255 in Create Instance
    to match the backend's restriction.

    Change-Id: I52398a13a545449699a7209db49c06859daa9463
    Closes-Bug: #1279590

Changed in horizon:
status: In Progress → Fix Committed
Akihiro Motoki (amotoki)
Changed in horizon:
milestone: none → icehouse-rc1
Thierry Carrez (ttx)
Changed in horizon:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in horizon:
milestone: icehouse-rc1 → 2014.1
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.