Increase Keypair name size to 255

The keypair name in horizon has a max_length of 20 characters, it seems short.
We should just match the nova data model length, and set the max_length to 255
for consistency.

Change-Id: I53e43a792da677c39127ab43831dde5f70e588d3
Closes-Bug: #1257030
This commit is contained in:
Zhenguo Niu
2013-12-03 09:56:49 +08:00
parent 26a5b1f918
commit 35161baa84

View File

@@ -34,7 +34,7 @@ NEW_LINES = re.compile(r"\r|\n")
class CreateKeypair(forms.SelfHandlingForm):
name = forms.CharField(max_length="20",
name = forms.CharField(max_length="255",
label=_("Keypair Name"),
validators=[validators.validate_slug],
error_messages={'invalid': _('Keypair names may '
@@ -46,7 +46,7 @@ class CreateKeypair(forms.SelfHandlingForm):
class ImportKeypair(forms.SelfHandlingForm):
name = forms.CharField(max_length="20", label=_("Keypair Name"),
name = forms.CharField(max_length="255", label=_("Keypair Name"),
validators=[validators.RegexValidator('\w+')])
public_key = forms.CharField(label=_("Public Key"), widget=forms.Textarea)