neutron/neutron/db
Rodolfo Alonso Hernandez edd8ad31d7 Check port VNIC type when associating a floating IP
When associating a floating IP to a port and the router is distributed,
the VNIC type of this port must be "normal" only. In any other case,
the floating IP can't be assigned. For example, a SR-IOV can have a
floating IP if the router is distributed (the router is in the same
host of the port).

This patch adds also function can_port_be_bound_to_virtual_bridge to
neutron/db/l3_db.py module.
Originally this function was introduced in neutron-lib with [1] but
in stable branch there is older neutron-lib used so this isn't available
from neutron-lib.

[1] https://review.openstack.org/#/c/615126/

Closes-Bug: #1566951

Change-Id: I4944041df81e24683bc612560808bcdcc2db6bf2
(cherry picked from commit 1966ad3945)
(cherry picked from commit 0f14e30fa4)
(cherry picked from commit 1c573bb8b9)
2019-01-21 12:36:20 +01:00
..
allowed_address_pairs Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
availability_zone use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
extra_dhcp_opt Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
metering Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
migration Hook bandit security linter to pep8 target 2017-08-18 18:00:36 +00:00
models Merge "Add port dns_domain to DB and object models" 2017-07-27 23:59:52 +00:00
network_dhcp_agent_binding Relocate Agent DB model 2016-10-07 14:18:19 -04:00
port_security Cleanup _find_related_obj 2017-02-25 06:29:33 +00:00
qos Tag mechanism supports resources with standard attribute 2017-07-25 08:14:04 +09:00
quota CountableResource: try count/get functions for all plugins 2017-09-12 16:23:22 +00:00
__init__.py Update License Headers to replace Nicira with VMware 2014-02-27 08:11:15 +00:00
_model_query.py Merge "Support object string field filtering on "LIKE" statement" 2017-07-07 22:58:04 +00:00
_resource_extend.py Refactor CommonDbMixin for removal 2017-04-25 14:13:30 -04:00
_utils.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
address_scope_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
agents_db.py Stop logging versions on every agent update 2017-08-25 17:37:32 +00:00
agentschedulers_db.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
allowedaddresspairs_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
api.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
common_db_mixin.py Move _get_marker_obj() out of CommonDbMixin. 2017-05-02 16:47:42 +00:00
data_plane_status_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
db_base_plugin_common.py Fixed FlushError on subnet creation retry 2017-07-26 19:21:02 +00:00
db_base_plugin_v2.py [RBAC] Fix setting network as not shared 2018-04-23 07:57:01 +00:00
dns_db.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
dvr_mac_db.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
external_net_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
extradhcpopt_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
extraroute_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
flavors_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
ipam_backend_mixin.py Always pass device_owner to _ipam_get_subnets() 2018-02-17 18:32:02 +00:00
ipam_pluggable_backend.py ipam: don't commit IPAllocation while IpamAllocation is rolled back 2017-12-21 07:21:40 -08:00
l3_agentschedulers_db.py Handle AgentNotFoundByTypeHost exception properly 2018-06-14 10:14:20 +02:00
l3_attrs_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
l3_db.py Check port VNIC type when associating a floating IP 2019-01-21 12:36:20 +01:00
l3_dvr_db.py Check port VNIC type when associating a floating IP 2019-01-21 12:36:20 +01:00
l3_dvr_ha_scheduler_db.py Fix connection between 2 dvr routers 2018-11-14 20:50:07 +00:00
l3_dvrscheduler_db.py Merge "DVR: Centralized FloatingIPs are not cleared after migration." into stable/pike 2018-11-21 02:00:06 +00:00
l3_gwmode_db.py Use super to make _build_routers_list safer 2017-06-15 00:28:16 -07:00
l3_hamode_db.py Fix dvr ha router gateway goes wrong host 2018-10-22 10:49:52 -07:00
l3_hascheduler_db.py use service type constants from neutron_lib plugins 2017-06-27 15:16:05 -06:00
models_v2.py Allow to set/modify network mtu 2017-08-11 00:57:34 +00:00
network_ip_availability_db.py New enginefacade for networks, subnets. 2017-03-30 01:26:45 -07:00
portbindings_base.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
portbindings_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
portsecurity_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
portsecurity_db_common.py use neutron-lib port security api-def 2017-05-01 11:45:42 -06:00
provisioning_blocks.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
quota_db.py Create packages for quota modules 2015-07-28 11:55:01 -07:00
rbac_db_mixin.py use neutron-lib callbacks 2017-04-26 12:12:53 -06:00
rbac_db_models.py Bump network rev on RBAC change 2017-08-02 16:44:01 +00:00
securitygroups_db.py Only allow SG port ranges for whitelisted protocols 2018-05-11 00:24:34 +02:00
securitygroups_rpc_base.py Decompose SG RPC API DB methods 2017-06-14 16:11:41 -07:00
segments_db.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
servicetype_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
sqlalchemytypes.py For typo in sqlalchemytypes 2017-02-13 16:18:46 +00:00
standard_attr.py Make code follow log translation guideline 2017-08-14 10:53:33 -07:00
standardattrdescription_db.py Eliminate lookup of "resource extend" funcs by name 2017-04-21 14:48:42 -04:00
subnet_service_type_db_models.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00
tag_db.py Clean up deprecated sqla model import paths 2017-02-25 03:42:34 +00:00
vlantransparent_db.py use core resource attribute constants from neutron-lib 2017-06-30 06:25:36 -06:00