horizon/openstack_dashboard/test/api_tests
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
..
__init__.py Splits OpenStack Dashboard bits from framework app code. 2012-10-11 11:47:50 -07:00
base_tests.py Merge "Properly compare versions in APIVersionManager" 2017-03-02 20:53:15 +00:00
cinder_rest_tests.py Fix missing volume name on launch instance modal 2017-07-23 20:21:32 -07:00
cinder_tests.py Replace six.iteritems(iter) with iter.items() 2016-12-14 11:13:20 +08:00
config_rest_tests.py Port config_rest_tests to Python 3 2015-09-01 18:35:44 +02:00
glance_rest_tests.py Support for Glance v2 2016-09-12 11:16:33 -07:00
glance_tests.py Merge "Enable volumes metadata update" 2016-10-03 23:47:31 +00:00
heat_rest_tests.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00
heat_tests.py hacking: noqa cleanup in openstack_dashboard 2017-03-17 19:38:47 +00:00
keystone_rest_tests.py Add Keystone Groups to REST API 2016-10-11 11:33:37 -07:00
keystone_tests.py py3: Replace unicode with six.text_type 2015-08-27 01:26:02 +02:00
network_rest_tests.py Move SG and FIP API wrapper to api.neutron 2017-06-04 17:51:25 +00:00
network_tests.py Move SG and FIP API wrapper to api.neutron 2017-06-04 17:51:25 +00:00
neutron_rest_tests.py api.rest.neutron: Ensure dict is passed to api.neutron args 2017-08-08 16:58:27 +00:00
neutron_tests.py Allow admin to create port on networks of different projects 2017-08-21 10:30:12 +00:00
nova_rest_tests.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00
nova_tests.py Add instance locked status on instances table 2017-06-14 20:00:56 -07:00
policy_rest_tests.py Merge "Update Horizon to use latest nova policy rules for validation" 2017-04-05 20:34:46 +00:00
rest_util_tests.py Fix order of arguments in assertEqual 2016-08-16 12:02:45 +07:00
swift_rest_tests.py Merge "Added Server-side filtering for swift UI" 2017-03-29 05:24:49 +00:00
swift_tests.py Merge "Added Server-side filtering for swift UI" 2017-03-29 05:24:49 +00:00