horizon/openstack_dashboard/test
Akihiro Motoki 15d996f7e4 Allow admin to create port on networks of different projects
Due to the change in the neutron API wrapper [1],
admin cannot create a port on networks owned by different project.
This is because api.neutron.network_get returns subnet detail
(Subnet object) only when project_id matches that of a target network.
This commit changes the logic to try to retrieve subnet detail first.
The condition is not simple and it looks wise to let neutron decide it.

The error reported in the bug also happens in the Port Create form
in the project dashboard if a user tries to create a port on an
external network. To handle the situation, handle() in CreatePort form
honors whether subnet detail is retrieved or not by checking a subnet
information is an instance of api.neutron.Subnet class.
This is a bit tricky but considering the current policy for create_port
I believe it is a good compromise.

Also fixes the wrong initial value of 'specify_ip' field of CreatePort
form. The initial value should be one of choices or None. Otherwise,
when 'specify_ip' field is hidden, an error message is returned
(though the message is not visible in the form), a user cannot submit
the form and the form is displayed continuously....

[1] commit 803209e237

Closes-Bug: #1645708
Change-Id: I6aae0a29eedebc920247912fec0729bf47cda002
2017-08-21 10:30:12 +00:00
..
api_tests Allow admin to create port on networks of different projects 2017-08-21 10:30:12 +00:00
integration_tests Replace dict.iteritems() with dict.items() in horizon 2017-08-01 08:31:49 +08:00
jasmine Remove unused jasmine_tests.py 2015-05-13 12:39:00 -06:00
templates Splits OpenStack Dashboard bits from framework app code. 2012-10-11 11:47:50 -07:00
test_data Split out FWaaS dashboard 2017-06-27 14:20:03 +00:00
test_panels Add Apache 2.0 license to source file 2016-12-02 17:40:28 +07:00
test_plugins assertEquals is deprecated, use assertEqual 2016-01-27 00:59:19 +08:00
tests Fix tenant_quota_usages function calls caching 2017-06-26 17:36:07 +03:00
__init__.py Revamp of testing machinery. 2012-04-23 22:24:21 -07:00
error_pages_urls.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
helpers.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00
settings.py Added SELECTABLE_THEMES setting 2017-07-26 11:52:35 +01:00
themes.py Added SELECTABLE_THEMES setting 2017-07-26 11:52:35 +01:00
urls.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00