]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Refactor update_port in db_base_plugin_v2
authorPavel Bondar <pbondar@infoblox.com>
Wed, 10 Jun 2015 13:18:40 +0000 (16:18 +0300)
committerCarl Baldwin <carl.baldwin@hp.com>
Mon, 15 Jun 2015 17:26:17 +0000 (17:26 +0000)
commitf88f3dc8d6f7240d6c0d9d5006345b3a797ae067
treec89c12e813ad1c157f8dd59a81394f6325920dcb
parenta89f99c6b700b1c6f918fe359c7271ac25ed4bc4
Refactor update_port in db_base_plugin_v2

This commit is a preparation step for using pluggable IPAM.
- moved validations into _validate_port_for_update;
- updating ip addresses for port is backend specific, so
  moved into _update_port_with_ips in ipam_non_pluggable_backend;
- writing port changes to db is common for both backends, so
  moved into _update_db_port in ipam_backend_mixin;
- updated to use namedtuple to track add/original/remove ips;
- added _make_fixed_ip_dict to exclude keys other than
  ip_address and subnet_id;

Partially-Implements: blueprint neutron-ipam

Change-Id: I1110e88f372b1d0cc7ec72049ba69a6d548da867
neutron/db/db_base_plugin_common.py
neutron/db/db_base_plugin_v2.py
neutron/db/ipam_backend_mixin.py
neutron/db/ipam_non_pluggable_backend.py