[openstack-dev] [Horizon] Edit subnet in workflows - ip_version hidden?

Radomir Dopieralski openstack at sheep.art.pl
Wed Mar 12 06:43:21 UTC 2014


On 11/03/14 16:57, Abishek Subramanian (absubram) wrote:

> Althouh - how up to date is this code?

This should be easy to check with the "git blame" command:

$ git blame
openstack_dashboard/dashboards/project/networks/subnets/workflows.py

[...]
31d55e50 (Akihiro MOTOKI      2013-01-04 18:33:03 +0900  56) class
CreateSubnet(network_workflows.CreateNetwork):
[...]
31d55e50 (Akihiro MOTOKI      2013-01-04 18:33:03 +0900  82) class
UpdateSubnetInfoAction(CreateSubnetInfoAction):
[...]
31d55e50 (Akihiro MOTOKI      2013-01-04 18:33:03 +0900 101)
                        #widget=forms.Select(
[...]

As you can see, it's all in the same patch, so it's on purpose.

It seems to me, that in the update dialog you are not supposed to change
the IP Version field, Akihiro Motoki tried to disable it
first, but then he hit the problem with the browser not submitting
the field's value and the form displaying the wrong option in there,
so he decided to hide it instead. But we won't know until the author
speaks for himself.

Personally, I would also add a check in the clean() method that the
IP Version field value indeed didn't change -- to make sure nobody
edited the form's HTML to get rid of the disabled or readonly attribute.

-- 
Radomir Dopieralski



More information about the OpenStack-dev mailing list