horizon/openstack_dashboard/api
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
..
rest Fix Python 3 issues with serialization json from request 2017-08-11 12:13:56 +03:00
__init__.py Split out FWaaS dashboard 2017-06-27 14:20:03 +00:00
base.py Fix H405 (multi line docstring) warnings (openstack_dashboard) 2017-06-09 16:05:31 +00:00
cinder.py Prefer volumev3 and volumev2 endpoints over volume 2017-06-30 16:06:55 +02:00
glance.py Clean /tmp after upload when using glance v2 client 2017-08-04 10:54:51 +08:00
heat.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00
keystone.py Merge "Use publicURL as default of OPENSTACK_ENDPOINT_TYPE consistently" 2017-06-13 13:14:12 +00:00
microversions.py Ensure log messages are not translated 2017-04-11 10:24:01 +00:00
network.py Move SG and FIP API wrapper to api.neutron 2017-06-04 17:51:25 +00:00
neutron.py Allow admin to create port on networks of different projects 2017-08-21 10:30:12 +00:00
nova.py Merge "Save image name in Server.image_name method" 2017-08-03 03:37:00 +00:00
swift.py Use flake8-import-order plugin 2017-07-03 08:02:23 +00:00