Which number should be used as max_length restriction for instance_name field?

asked 2014-02-17 17:50:09 -0600

liuyu gravatar image

Current code doesn't have restriction on max_length for instance_name field in "update instance". When I did the test, I saw the backend seems to be using "255" as the max_length checking, as shown in the message below:

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

But current code in "create instance" does restrict the max_length for instance_name field, and it seems to be using "80" as the max_length restriction, as shown in the code below:

name = forms.CharField(max_length=80, label=_("Instance Name"))

So just would like to confirm which number should I use as the max_length to restrict the instance_name field in "update instance"? 80 or 255?

Thank you!

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-02-18 10:57:04 -0600

akrivoka gravatar image

Since Nova allows for instance names of up to 255 chars, I see no reason to restrict it to 80 in Horizon. IMO, the create instance form should be changed to allow up to 255 chars, and the same restriction should be applied in edit instance form.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-02-17 17:50:09 -0600

Seen: 68 times

Last updated: Feb 18 '14