summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/admin/floating_ips/forms.py
diff options
context:
space:
mode:
Diffstat (limited to 'openstack_dashboard/dashboards/admin/floating_ips/forms.py')
-rw-r--r--openstack_dashboard/dashboards/admin/floating_ips/forms.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/admin/floating_ips/forms.py b/openstack_dashboard/dashboards/admin/floating_ips/forms.py
index 6dd7db2..182f720 100644
--- a/openstack_dashboard/dashboards/admin/floating_ips/forms.py
+++ b/openstack_dashboard/dashboards/admin/floating_ips/forms.py
@@ -34,6 +34,9 @@ class AdminFloatingIpAllocate(forms.SelfHandlingForm):
34 "You need to specify an explicit address which is under " 34 "You need to specify an explicit address which is under "
35 "the public network CIDR (e.g. 202.2.3.0/24)."), 35 "the public network CIDR (e.g. 202.2.3.0/24)."),
36 mask=False) 36 mask=False)
37 description = forms.CharField(max_length=255,
38 label=_("Description"),
39 required=False)
37 40
38 def __init__(self, *args, **kwargs): 41 def __init__(self, *args, **kwargs):
39 super(AdminFloatingIpAllocate, self).__init__(*args, **kwargs) 42 super(AdminFloatingIpAllocate, self).__init__(*args, **kwargs)
@@ -48,6 +51,8 @@ class AdminFloatingIpAllocate(forms.SelfHandlingForm):
48 param = {} 51 param = {}
49 if data['floating_ip_address']: 52 if data['floating_ip_address']:
50 param['floating_ip_address'] = data['floating_ip_address'] 53 param['floating_ip_address'] = data['floating_ip_address']
54 if data['description']:
55 param['description'] = data['description']
51 subnet = api.neutron.subnet_get(request, data['pool']) 56 subnet = api.neutron.subnet_get(request, data['pool'])
52 param['subnet_id'] = subnet.id 57 param['subnet_id'] = subnet.id
53 fip = api.neutron.tenant_floating_ip_allocate( 58 fip = api.neutron.tenant_floating_ip_allocate(