]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoDB, IPAM & RPC changes for IPv6 Prefix Delegation
John Davidge [Thu, 16 Jul 2015 17:26:24 +0000 (18:26 +0100)]
DB, IPAM & RPC changes for IPv6 Prefix Delegation

This patch includes the DB, IPAM & RPC changes needed for the IPv6 Prefix
Delegation feature.

To enable this feature, the subnetpool_id attribute of subnets has been
modified to allow for a special subnetpool identifier - "prefix_delegation".

WORKFLOW:

1. Admin sets default_ipv6_subnet_pool in neutron.conf to "prefix_delegation"
2. User creates a new IPv6 subnet without a CIDR or subnetpool ID
3. User creates an interface between this subnet and a router with an existing
external interface

The agent-side changes will follow in separate patches.

A documentation patch is up for review here:

https://review.openstack.org/#/c/178739

Video guides for configuring and using this feature are available on
YouTube:

https://www.youtube.com/watch?v=wI830s881HQ
https://www.youtube.com/watch?v=zfsFyS01Fn0

Change-Id: Ic0c6ed4dba74da94a75838178a1837f93d2d0885
Co-Authored-By: Baodong (Robert) Li <baoli@cisco.com>
Partially-Implements: blueprint ipv6-prefix-delegation

9 years agoMerge "Python 3: Fix test_security_groups_db"
Jenkins [Tue, 4 Aug 2015 11:26:42 +0000 (11:26 +0000)]
Merge "Python 3: Fix test_security_groups_db"

9 years agoMerge "Add DNS and DHCP log into dhcp agent"
Jenkins [Tue, 4 Aug 2015 04:08:09 +0000 (04:08 +0000)]
Merge "Add DNS and DHCP log into dhcp agent"

9 years agoMerge "Prevent update alloc pool over existing gateway ip"
Jenkins [Tue, 4 Aug 2015 00:44:18 +0000 (00:44 +0000)]
Merge "Prevent update alloc pool over existing gateway ip"

9 years agoMerge "Fix a microsecond format of isoformat()"
Jenkins [Mon, 3 Aug 2015 20:57:02 +0000 (20:57 +0000)]
Merge "Fix a microsecond format of isoformat()"

9 years agoMerge "List up necessary files for thirdparty-ci.rst"
Jenkins [Mon, 3 Aug 2015 20:56:50 +0000 (20:56 +0000)]
Merge "List up necessary files for thirdparty-ci.rst"

9 years agoMerge "Extend vxlan_group option to allow a range of group addresses"
Jenkins [Mon, 3 Aug 2015 20:37:01 +0000 (20:37 +0000)]
Merge "Extend vxlan_group option to allow a range of group addresses"

9 years agoMerge "Updated sub_projects.rst for networking-vsphere"
Jenkins [Mon, 3 Aug 2015 19:09:36 +0000 (19:09 +0000)]
Merge "Updated sub_projects.rst for networking-vsphere"

9 years agoMerge "Replaces reduce with six.moves.reduce for py 2/3 compatibility"
Jenkins [Mon, 3 Aug 2015 18:29:54 +0000 (18:29 +0000)]
Merge "Replaces reduce with six.moves.reduce for py 2/3 compatibility"

9 years agoMerge "Adding a cleanup for 'qlbaas-' namespaces in netns_cleanup"
Jenkins [Mon, 3 Aug 2015 18:29:41 +0000 (18:29 +0000)]
Merge "Adding a cleanup for 'qlbaas-' namespaces in netns_cleanup"

9 years agoMerge "Update dhcp host portbinding on failover"
Jenkins [Mon, 3 Aug 2015 15:27:13 +0000 (15:27 +0000)]
Merge "Update dhcp host portbinding on failover"

9 years agoReplaces reduce with six.moves.reduce for py 2/3 compatibility
sonu.kumar [Mon, 3 Aug 2015 11:45:52 +0000 (17:15 +0530)]
Replaces reduce with six.moves.reduce for py 2/3 compatibility

This patch replaces "reduce" with "six.moves.reduce" to comply with
the newer python version i.e. python3.

Partially-Implements: Blueprint neutron-python3

Change-Id: Iddb52d86665123ade5920bc09f7802e29440e7dd

9 years agoPython 3: Fix test_security_groups_db
Cyril Roelandt [Mon, 3 Aug 2015 09:56:41 +0000 (11:56 +0200)]
Python 3: Fix test_security_groups_db

In Python 3, Exception() is not iterable.

Change-Id: I89ffefeebb18f967129245936270318014f17f3f
Blueprint: neutron-python3

9 years agoAdd DNS and DHCP log into dhcp agent
changzhi [Fri, 17 Jul 2015 02:43:09 +0000 (10:43 +0800)]
Add DNS and DHCP log into dhcp agent

Enable set DNS and DHCP log of dnsmasq for dhcp agent
Add a new configuration named 'dnsmasq_base_log_dir'
in dhcp_agent.ini.

This entry should be a path of log file. It should
like this:

    dnsmasq_base_log_dir=/tmp

And the DNS and DHCP log will be written into the file
"/tmp/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa/dhcp_dns_log".
The dir path will be created if the given path doesn't exists.

DocImpact

Closes-Bug: #1475636
Change-Id: I87be346ec5059eaa8a29f48fe53933af82d1b155

9 years agoMove 1c844d1677f7 expand migration to appropriate branch
Salvatore Orlando [Mon, 3 Aug 2015 06:36:54 +0000 (23:36 -0700)]
Move 1c844d1677f7 expand migration to appropriate branch

Commit cb60d0bb4e0cc0cba68f59fdf5f4e89d6ec52950 added an expand
migration. Howewer it indicated a contract migration as its
ancestor (2a16083502f3). As a result the migration was treated
by alembic as a contract one, even if it was defined in the
'expand' directory.

This patch 'rebases' this migration on top of the expand branch
HEAD. This might impact trunk chasers which have already executed
migration 1c844d1677f7 as a part of the contract branch.

Change-Id: I431aa684ccd029c6cff37a7666bb7ce1a7541f9c

9 years agoMerge "Remove unnecessary executable permission"
Jenkins [Mon, 3 Aug 2015 04:52:42 +0000 (04:52 +0000)]
Merge "Remove unnecessary executable permission"

9 years agoMerge "Introduce get_ports_attributes in OVSBridge"
Jenkins [Sun, 2 Aug 2015 12:42:10 +0000 (12:42 +0000)]
Merge "Introduce get_ports_attributes in OVSBridge"

9 years agoIntroduce get_ports_attributes in OVSBridge
rossella [Thu, 9 Jul 2015 22:08:50 +0000 (22:08 +0000)]
Introduce get_ports_attributes in OVSBridge

OVSBridge was inheriting db_list from BaseOVS, which was
returning the information of all the ports on the machine,
not only the ones belonging to the bridge.
The OVSNeutronAgent was using that method with the assumption
that ports were filtered by bridge.
To avoid confusion, this patch add a new method to OVSBridge
get_ports_attributes to query the info for all the ports
belonging to the bridge.
db_list is removed from BaseOVS since that method is already
available in ovsdb/api.py
ovs_lib methods that use db_list are refactored accordingly.

Co-Authored-By: Assaf Muller <amuller@redhat.com>
Change-Id: I2ce6d232744f48ba7fc0f824a7db32e3655bc2aa
Closes-Bug: 1473199

9 years agoMerge "Remove unneeded OS_TEST_DBAPI_ADMIN_CONNECTION"
Jenkins [Sun, 2 Aug 2015 03:20:12 +0000 (03:20 +0000)]
Merge "Remove unneeded OS_TEST_DBAPI_ADMIN_CONNECTION"

9 years agoMerge "Fixes a typo phys_brs in place of phys_br"
Jenkins [Sat, 1 Aug 2015 11:01:37 +0000 (11:01 +0000)]
Merge "Fixes a typo phys_brs in place of phys_br"

9 years agoRemove unnecessary executable permission
Qiaowei Ren [Thu, 16 Jul 2015 07:09:28 +0000 (15:09 +0800)]
Remove unnecessary executable permission

Bunch of neutron source code files are marked as executable which is not
appropriate, this patch just 'chmod -x' to all of them.

Closes-Bug: #1468564

Change-Id: Idec4ae16501d68e044e103db24ad3be0e0751e9a

9 years agoMerge "Enable resource usage tracking for reference plugins."
Jenkins [Sat, 1 Aug 2015 03:35:43 +0000 (03:35 +0000)]
Merge "Enable resource usage tracking for reference plugins."

9 years agoMerge "Arista Drivers decomposition part II"
Jenkins [Sat, 1 Aug 2015 00:48:44 +0000 (00:48 +0000)]
Merge "Arista Drivers decomposition part II"

9 years agoMerge "Python 3: pass bytes to base64.encode{string,bytes}"
Jenkins [Fri, 31 Jul 2015 22:29:00 +0000 (22:29 +0000)]
Merge "Python 3: pass bytes to base64.encode{string,bytes}"

9 years agoMerge "Python3: pass bytes to binascii.crc32"
Jenkins [Fri, 31 Jul 2015 22:28:38 +0000 (22:28 +0000)]
Merge "Python3: pass bytes to binascii.crc32"

9 years agoMerge "Fix order of calls in update_port"
Jenkins [Fri, 31 Jul 2015 22:23:05 +0000 (22:23 +0000)]
Merge "Fix order of calls in update_port"

9 years agoMerge "Python 3: Use '//' instead of '/'"
Jenkins [Fri, 31 Jul 2015 22:16:49 +0000 (22:16 +0000)]
Merge "Python 3: Use '//' instead of '/'"

9 years agoArista Drivers decomposition part II
Sukhdev Kapur [Thu, 30 Jul 2015 22:23:52 +0000 (15:23 -0700)]
Arista Drivers decomposition part II

As a part of vendor driver decomposition,
this patch moves the remaining Arista specific
code to openstack/networking-arista

Change-Id: Ie16b5ed936b116043dea36ec967bb5ae9cdacbdf
Partial-Implements: blueprint core-vendor-decomposition

9 years agoMerge "Initialize port_info dict as blank in OVS agent"
Jenkins [Fri, 31 Jul 2015 18:11:42 +0000 (18:11 +0000)]
Merge "Initialize port_info dict as blank in OVS agent"

9 years agoMerge "Ensure non-overlapping cidrs in subnetpools with galera"
Jenkins [Fri, 31 Jul 2015 16:20:31 +0000 (16:20 +0000)]
Merge "Ensure non-overlapping cidrs in subnetpools with galera"

9 years agoMerge "sriov: implement spoofchecking configuration"
Jenkins [Fri, 31 Jul 2015 16:09:04 +0000 (16:09 +0000)]
Merge "sriov: implement spoofchecking configuration"

9 years agoPython 3: pass bytes to base64.encode{string,bytes}
Cyril Roelandt [Tue, 28 Jul 2015 14:43:00 +0000 (16:43 +0200)]
Python 3: pass bytes to base64.encode{string,bytes}

In Python 3, base64.encodestring expects bytes. Also, base64.encodebytes should
be used in order not to trigger a DeprecationWarning.

Change-Id: Iaae377b612feda7e01963f0d527c898bc0fd21d1
Blueprint: neutron-python3

9 years agoPython3: pass bytes to binascii.crc32
Cyril Roelandt [Thu, 23 Jul 2015 09:23:21 +0000 (09:23 +0000)]
Python3: pass bytes to binascii.crc32

In Python3, binascii.crc32 must be given bytes. This commit does not change the
behaviour in Python 2.

Change-Id: I91607ced4ab26d1d2e3eb31a3e4b2a4b2131b7bd
Blueprint: neutron-python3

9 years agoFix order of calls in update_port
Sam Betts [Thu, 16 Jul 2015 13:08:59 +0000 (14:08 +0100)]
Fix order of calls in update_port

https://review.openstack.org/#/c/196908 introduced some extra logic to
do with DVR to update_port, however it changed the ordering of some of
the calls, this patch ensures that the calls that need to happen before
precommit happen in the right place.

Change-Id: I560100b3be76c616a93bf7d3264675dce6cef732
Closes-Bug: #1475297

9 years agoMerge "Moved out cisco n1kv mech driver and db models"
Jenkins [Fri, 31 Jul 2015 13:13:32 +0000 (13:13 +0000)]
Merge "Moved out cisco n1kv mech driver and db models"

9 years agoInitialize port_info dict as blank in OVS agent
Kevin Benton [Tue, 28 Jul 2015 23:15:34 +0000 (16:15 -0700)]
Initialize port_info dict as blank in OVS agent

The first assignment of port_info was from the scan_ports function
which could result in an exception and result in port_info being
unbound for the port stats scan below.

This patch just initializes port_info as an empty dict so the port
stats will always have an input.

Closes-Bug: #1479105
Change-Id: I017a6dd334e2673072c977cc13b73e8cceb16712

9 years agoEnsure non-overlapping cidrs in subnetpools with galera
Cedric Brandily [Thu, 28 May 2015 16:35:17 +0000 (18:35 +0200)]
Ensure non-overlapping cidrs in subnetpools with galera

This change enables galera support in _lock_subnetpool[1]. It uses an
update to disallow 2 transactions performing concurrent subnet
allocation in the same subnetpool to succeed: the 2 transactions will
conflict because they update the same row so the db (including Galera
multi-writer cluster) will discard the last transaction and
Controller.create[2] will catch and retry the "discarded" allocation.

This change adds the "hash" attribute in "subnetpools" table to enable
previous update.

[1] neutron.ipam.subnet_alloc.SubnetAllocator
[2] neutron.api.v2.base

Change-Id: I74f7100a6fd9b7787be693adffec15ec468d0018
Closes-Bug: #1451576

9 years agoMerge "test_db_base_plugin_v2: Improve DBReferenceError generation"
Jenkins [Fri, 31 Jul 2015 09:15:19 +0000 (09:15 +0000)]
Merge "test_db_base_plugin_v2: Improve DBReferenceError generation"

9 years agoMerge "SR-IOV: Fix SR-IOV agent to run ip link commands as root"
Jenkins [Fri, 31 Jul 2015 09:14:36 +0000 (09:14 +0000)]
Merge "SR-IOV: Fix SR-IOV agent to run ip link commands as root"

9 years agoMerge "Updated from global requirements"
Jenkins [Fri, 31 Jul 2015 09:04:50 +0000 (09:04 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "Update dhcp agent cache for network:dhcp ports"
Jenkins [Fri, 31 Jul 2015 07:47:07 +0000 (07:47 +0000)]
Merge "Update dhcp agent cache for network:dhcp ports"

9 years agoMerge "Add plural names for quota resources"
Jenkins [Fri, 31 Jul 2015 06:58:24 +0000 (06:58 +0000)]
Merge "Add plural names for quota resources"

9 years agoMerge "Introduce usage data tracking for Neutron"
Jenkins [Fri, 31 Jul 2015 06:57:44 +0000 (06:57 +0000)]
Merge "Introduce usage data tracking for Neutron"

9 years agoMerge "Keep dns nameserver order consistency"
Jenkins [Fri, 31 Jul 2015 04:43:24 +0000 (04:43 +0000)]
Merge "Keep dns nameserver order consistency"

9 years agoMerge "Python 3: fix test_attributes"
Jenkins [Thu, 30 Jul 2015 15:30:01 +0000 (15:30 +0000)]
Merge "Python 3: fix test_attributes"

9 years agoSR-IOV: Fix SR-IOV agent to run ip link commands as root
Moshe Levi [Thu, 30 Jul 2015 09:04:15 +0000 (12:04 +0300)]
SR-IOV: Fix SR-IOV agent to run ip link commands as root

Commit https://review.openstack.org/#/c/155523/
remove the remaining root_helper args, but didn't
update the SR-IOV agent to execute them as root.

This patch updates the agent to execute ip link commands
as root and pass options argument as a list in the
self._as_root method.

Closes-Bug: #1479694
Change-Id: I53cafd61845a69fae3a759fb7526950d655ffa20

9 years agoPython 3: Use '//' instead of '/'
fumihiko kakuma [Wed, 29 Jul 2015 23:17:10 +0000 (08:17 +0900)]
Python 3: Use '//' instead of '/'

In python 3, division(/) returns a float.
So use '//' instead of '/' in the case that an integer is required.

Change-Id: I9170ea57d5b967533767871fa612a02d797cda17
Blueprint: neutron-python3

9 years agoPrevent update alloc pool over existing gateway ip
John Kasperski [Thu, 30 Jul 2015 04:52:01 +0000 (23:52 -0500)]
Prevent update alloc pool over existing gateway ip

The gateway IP for a subnet is not allowed to be listed in the
allocation pool for that subnet. This restriction is checked and
enforced at subnet-create time.

During subnet-update, it is only partially checked. An
exception is returned if the update request tries to place the gateway
IP in an existing allocation pool OR if both gateway and allocation
pool are being changed and the gateway is located in the new pool.

If only the allocation pool is being updated, no check is made to
verify that the new allocation pool does not contain the existing
gateway IP.

Closes-Bug: #1479514
Change-Id: Id9583d6ad88188955388931cd688ca19bd2c9717

9 years agoMoved out cisco n1kv mech driver and db models
Saksham Varma [Fri, 24 Jul 2015 05:46:23 +0000 (22:46 -0700)]
Moved out cisco n1kv mech driver and db models

Moving out Cisco N1Kv database models and the mech driver
to the openstack/networking-cisco repo as part of the second
phase vendor-core decomposition

Partial-Bug: #1479123
Partial-implements: blueprint core-vendor-decomposition

Change-Id: I65a704b238d8cbe2951a6912fa4f1e8518c6f412

9 years agoMerge "Create packages for quota modules"
Jenkins [Wed, 29 Jul 2015 22:21:29 +0000 (22:21 +0000)]
Merge "Create packages for quota modules"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Wed, 29 Jul 2015 20:44:01 +0000 (20:44 +0000)]
Updated from global requirements

Change-Id: I3a884a73d51df0f93b5cc88b3e3250d81bb1f455

9 years agoMerge "Moving out cisco n1kv extensions"
Jenkins [Wed, 29 Jul 2015 17:44:42 +0000 (17:44 +0000)]
Merge "Moving out cisco n1kv extensions"

9 years agosriov: implement spoofchecking configuration
Roman Bogorodskiy [Thu, 16 Apr 2015 07:07:55 +0000 (09:07 +0200)]
sriov: implement spoofchecking configuration

- Make sriov agent to set the spoofchecking on VFs
  according to port_security_enabled attribute of the port.
- Extend vf management sanity check to probe spoof checking
  capability

Implements: blueprint sriov-spoofchk
Change-Id: I4d1060be26ee6cbd7d766c2bde364f694533de69

9 years agoMerge "Correct fcntl.flock use in Pidfile.unlock"
Jenkins [Wed, 29 Jul 2015 17:38:02 +0000 (17:38 +0000)]
Merge "Correct fcntl.flock use in Pidfile.unlock"

9 years agoFixes a typo phys_brs in place of phys_br
Ritesh Anand [Thu, 25 Jun 2015 19:25:12 +0000 (12:25 -0700)]
Fixes a typo phys_brs in place of phys_br

Change-Id: I0301952d5f7d4cd78c5d35c38aa5c6caabcc6298
Closes-Bug: #1423774

9 years agoUpdate dhcp agent cache for network:dhcp ports
sridhargaddam [Mon, 27 Jul 2015 03:46:48 +0000 (03:46 +0000)]
Update dhcp agent cache for network:dhcp ports

When a network with a dhcp_enabled subnet is scheduled on a dhcp
agent, dhcp driver creates the network:dhcp port for the subnet.
However, the port info is not updated in dhcp agents internal cache.
Subsequently if the user deletes the network:dhcp port, the port is
properly deleted on the server side (i.e., in the database) and when
the port_delete_end notification is sent to the dhcp agent, it simply
ignores it as the port entry would be missing in the cache. This patch
fixes this issue by updating the dhcp agents cache when dhcp driver
creates the network:dhcp port for the subnets.

Closes-Bug: #1478426
Change-Id: I69f5834dd964a4320c606c4e0aa2cdba70416943

9 years agoMerge "Allow overriding of the neutron endpoint URL in metadata agent"
Jenkins [Wed, 29 Jul 2015 14:16:00 +0000 (14:16 +0000)]
Merge "Allow overriding of the neutron endpoint URL in metadata agent"

9 years agoKeep dns nameserver order consistency
changzhi [Thu, 16 Jul 2015 02:14:16 +0000 (10:14 +0800)]
Keep dns nameserver order consistency

Currently, there is no dns servers prioritization for subnets
for Neutron.

Generally speaking, it is useful to keep the order of dns
nameservers consistent. Add a new column named 'order' in table
'dnsnameservers' and add nameserver into DB one by one.

Closes-Bug: #1218629
Implements: blueprint keep-dns-nameserver-orderconsistency
Change-Id: Id937aea411397d39370368a4eb45be26c4eefa9e

9 years agoExtend vxlan_group option to allow a range of group addresses
John Nielsen [Wed, 22 Jul 2015 18:43:04 +0000 (12:43 -0600)]
Extend vxlan_group option to allow a range of group addresses

If vxlan_group is specified in CIDR notation, it is interpreted as a
range of group addresses. VXLAN VNIs are mapped to group addresses in
a many-to-one round robin fashion, or one-to-one if a large enough
range is provided. Since VNIs are 24 bits, a /8 such as 239.0.0.0/8
allows each VNI to use a unique multicast group. (239.0.0.0/8 also
happens to be the "site-local" multicast range.)

With multiple VNIs on a single multicast group, it is likely that
VTEPs will unnecessarily receive broadcast/unknown/multicast
datagrams for VNIs in which they do not participate. Using a range of
groups mitigates or eliminates this issue. It is thus an alternative
to the l2_population extension and driver for environments where both
multicast and linuxbridge are used.

The default setting is unchanged, but the comments in the ini file
suggest 239.0.0.0/8 as an alternative. Administrators are free to use
any valid multicast range that can be expressed in CIDR notation, and
should choose a size and starting address that make sense for their
environment.

DocImpact
Closes-Bug: #1477331
Change-Id: If9a3487a28ba2b02a6ef934c5421cec5d505b53c

9 years agoMerge "Updated from global requirements"
Jenkins [Tue, 28 Jul 2015 23:39:34 +0000 (23:39 +0000)]
Merge "Updated from global requirements"

9 years agoMerge "[neutron-db-manage] revision: properly bootstrap a new branch"
Jenkins [Tue, 28 Jul 2015 19:18:44 +0000 (19:18 +0000)]
Merge "[neutron-db-manage] revision: properly bootstrap a new branch"

9 years agoEnable resource usage tracking for reference plugins.
Salvatore Orlando [Thu, 4 Jun 2015 22:43:35 +0000 (15:43 -0700)]
Enable resource usage tracking for reference plugins.

Specify which resources should be tracked when initializing
the ML2 and l3_router plugins. This will enable usage tracking
for the following resources:
- Networks
- Ports
- Subnets
- Subnet pools
- Security groups
- Security group rules
- Routers
- Floating IPs

Partially implements blueprint: bp/better-quotas

Change-Id: I57287b15ffdadc30297651a01e9f05110e9ce6b6

9 years agoAdd plural names for quota resources
Salvatore Orlando [Tue, 23 Jun 2015 11:54:28 +0000 (04:54 -0700)]
Add plural names for quota resources

Introduce a 'plural_name' attribute in the BaseResource
class in the neutron.quota.resource module. This will
enable to specify the plural name of a resource when it's
entered in the quota registry.

This will come handy for managing reservations and also
removes the need for passing the collection name when
counting a resource.

Also, the name of the 'resources' parameter for the
_count_resource routine has ben changed to collection_name,
as the previous one was misleading, since it led to believe
it should be used for a collection, whereas it is simply
the name of a collection.

Change-Id: I0b61ba1856e9552cc14574be28fec6c77fb8783c
Related-Blueprint: better-quotas

9 years agoIntroduce usage data tracking for Neutron
Salvatore Orlando [Thu, 16 Apr 2015 18:56:27 +0000 (11:56 -0700)]
Introduce usage data tracking for Neutron

This patch introduces application logic support for tracking
Neutron resource usage data, thus introducing a different
way of enforcing quota limits, which now relies on records
tracking resource usage for each tenant.

When these records go "out-of-sync" with actual resource usage,
the quota usage table entry is marked "dirty".
And it will be resynchronized the next time a resource count is
requested. Changes in resource utilization are detected using
SQLAlchemy events.

This patch however does not automatically enable resource usage
tracking for any plugin. Plugins must explicitly declare for which
resources they wish to enable tracking. To this aim, this patch
provides the @tracked_resources decorator.

As some operators might wish to not use resource usage tracking, this
patch adds the track_quota_usage configuration option. If set to
False, DB-level usage tracking will not be performed, and
resources will be counted as before, ie: invoking a plugin method.

Usage tracking is performed using a new resource type,
TrackedResource, which can work side by side with CountableResource,
the one Neutron used so far. To this aim a ResourceRegistry class
has been introduced for registering and managing resources. Most
of the resource management code previously embedded in the
QuotaEngine class is being moved to ResourceRegistry as a part of
this patch.

Partially implements blueprint better-quota

Change-Id: If461399900973a38d7b82e0b3ac54fc052f09529

9 years agoCreate packages for quota modules
Salvatore Orlando [Tue, 2 Jun 2015 23:13:35 +0000 (16:13 -0700)]
Create packages for quota modules

This patch simply renames quota modules introducing two
new packages:
1) neutron.quota
2) neutron.db.quota

This paves the way for adding more quota related modules.
Unit tests paths are changed accordingly, as well as references
to moved modules.
This patch hovewer preserves the ability of importing
neutron.db.quota_db in order to avoid breaking repositories which
use neutron as a requirement.

Change-Id: I946e87f1b2ebb3e80d64aecfe58aeff9f81896f3
Related-blueprint: better-quotas

9 years agoMerge "Python 3: fix test_dhcp"
Jenkins [Tue, 28 Jul 2015 16:47:36 +0000 (16:47 +0000)]
Merge "Python 3: fix test_dhcp"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Tue, 28 Jul 2015 16:46:48 +0000 (16:46 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Add FUJITSU vendor plugin in sub_projects"
Jenkins [Tue, 28 Jul 2015 16:46:29 +0000 (16:46 +0000)]
Merge "Add FUJITSU vendor plugin in sub_projects"

9 years agoPython 3: fix test_attributes
Cyril Roelandt [Fri, 24 Jul 2015 14:19:19 +0000 (16:19 +0200)]
Python 3: fix test_attributes

In Python 3, strings have an __iter__ method, which makes convert_to_list fail.

Change-Id: I2411ecd31d7d05ff6f0f004180edffc76d28573b
Blueprint: neutron-python3

9 years agoAdd FUJITSU vendor plugin in sub_projects
Yushiro FURUKAWA [Tue, 28 Jul 2015 02:36:04 +0000 (11:36 +0900)]
Add FUJITSU vendor plugin in sub_projects

Change-Id: Iee06e96d0887f7a973079194ec05b444c0874763

9 years agoPython 3: fix test_dhcp
Cyril Roelandt [Fri, 24 Jul 2015 13:52:42 +0000 (15:52 +0200)]
Python 3: fix test_dhcp

In Python 3, dhcp.LOG.process is not called when calling dhcp.LOG.debug. Since
what we really want to know is whether dhcp.LOG.debug is called, tweak the test
a little.

Change-Id: I9c9d9a6162181d6e518a603193013c28e218cdee
Blueprint: neutron-python3

9 years agoMerge "Fix inconsistency of if/return logic in attributes.py"
Jenkins [Tue, 28 Jul 2015 12:02:07 +0000 (12:02 +0000)]
Merge "Fix inconsistency of if/return logic in attributes.py"

9 years agotest_db_base_plugin_v2: Improve DBReferenceError generation
YAMAMOTO Takashi [Fri, 3 Jul 2015 14:59:46 +0000 (23:59 +0900)]
test_db_base_plugin_v2: Improve DBReferenceError generation

The current coding, raising DBReferenceError directly, seems to
confuse sqlalchemy a bit.  Instead, actually causes the error by
tweaking the row being inserted.

Change-Id: I17ec6dab19b0e573675559042b7529f7bdd2671b

9 years agoFix a microsecond format of isoformat()
fumihiko kakuma [Mon, 27 Jul 2015 01:11:18 +0000 (10:11 +0900)]
Fix a microsecond format of isoformat()

isoformat() omits the microsecond from the format when the microsecond is 0.
Therefore, use strftime('%Y-%m-%dT%H:%M:%S.%f') instead.

Related Change-Id: Id6e8645362fe70b1427d45d5b44048fe47aba0f7
Closes-Bug: #1478418

Change-Id: I27059fa3476ceb51033534cc60d40047d88390d7

9 years agoMerge "Python 3: do not index dict_values objects"
Jenkins [Mon, 27 Jul 2015 21:33:36 +0000 (21:33 +0000)]
Merge "Python 3: do not index dict_values objects"

9 years agoMerge "Python 3: fix test_context"
Jenkins [Mon, 27 Jul 2015 21:33:21 +0000 (21:33 +0000)]
Merge "Python 3: fix test_context"

9 years agoUpdated from global requirements
OpenStack Proposal Bot [Mon, 27 Jul 2015 17:56:32 +0000 (17:56 +0000)]
Updated from global requirements

Change-Id: Ib81ed61a31427abe8033081fadb39a3c3080fbd4

9 years agoMerge "Fix KeyError: 'L3_ROUTER_NAT' in l3 scheduler functional test"
Jenkins [Mon, 27 Jul 2015 17:34:50 +0000 (17:34 +0000)]
Merge "Fix KeyError: 'L3_ROUTER_NAT' in l3 scheduler functional test"

9 years agoMerge "Cleanup IPAM tests"
Jenkins [Mon, 27 Jul 2015 16:34:28 +0000 (16:34 +0000)]
Merge "Cleanup IPAM tests"

9 years agoPython 3: fix test_context
Cyril Roelandt [Fri, 24 Jul 2015 16:05:42 +0000 (18:05 +0200)]
Python 3: fix test_context

In Python 3, b'...'.startswith must be given bytes.

Change-Id: I4e83685ac6119db6f16d693df37955620271082f
Blueprint: neutron-python3

9 years agoMerge "Add DB support for resource usage tracking"
Jenkins [Mon, 27 Jul 2015 14:31:20 +0000 (14:31 +0000)]
Merge "Add DB support for resource usage tracking"

9 years agoFix KeyError: 'L3_ROUTER_NAT' in l3 scheduler functional test
Assaf Muller [Sat, 25 Jul 2015 20:14:32 +0000 (16:14 -0400)]
Fix KeyError: 'L3_ROUTER_NAT' in l3 scheduler functional test

The issue was introduced by commit with change ID:
Ic4df299bac83c80abf0890a81d2dd36d15993b33

In Neutron-speak we define the 'core plugin' as something like ML2, while
service plugins examples are L3, VPNaaS, etc. The code was initializing
the L3 service plugin as the core plugin, which is unexpected behavior.
The code will now use the DB core plugin base class as the core plugin,
and not initialize the service plugins. The tests will manually and locally
instantiate a L3 service plugin instance and use it.

Change-Id: I2b7d2f6ccd5fe18e322e70b4e376db23d76b9092
Closes-Bug: #1478273

9 years agoMerge "L2 agent RPC add new RPC calls"
Jenkins [Mon, 27 Jul 2015 14:00:17 +0000 (14:00 +0000)]
Merge "L2 agent RPC add new RPC calls"

9 years agoCleanup IPAM tests
Pavel Bondar [Mon, 27 Jul 2015 13:00:56 +0000 (16:00 +0300)]
Cleanup IPAM tests

Replace assert with self.assetTrue.
Use self.assertIsInstance for comparing instance type.
Pass arguments to assertEqual as (expected, observed).

Change-Id: Ic0201276bdda7d99f9d1e25751eab8f9ebbb4a16

9 years agoFix inconsistency of if/return logic in attributes.py
John Davidge [Mon, 27 Jul 2015 10:39:59 +0000 (11:39 +0100)]
Fix inconsistency of if/return logic in attributes.py

In neutron/api/v2/attributes.py some methods use:

if data is None:
    return
return something

Others use:

if data is not None:
    return something

Both have the same effect, but are inconsistent.

This patch standardises the usage around the shorter version.

Change-Id: Idc9e6eb1852d2565906fc2c8e8a7c0a63bc1a0dd
Closes-Bug: 1478512

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Mon, 27 Jul 2015 06:07:28 +0000 (06:07 +0000)]
Imported Translations from Transifex

For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure

Change-Id: I6119ea9a2b1cb4ec1b0cc73f882d8f9d34fabe8d

9 years ago[neutron-db-manage] revision: properly bootstrap a new branch
Ihar Hrachyshka [Sat, 18 Jul 2015 12:52:53 +0000 (14:52 +0200)]
[neutron-db-manage] revision: properly bootstrap a new branch

If the intended branch is not present, bootstrap it:

- create directory;
- mark the new migration script with proper branch label;
- make the script down_revision == None to indicate it's a new branch;

One missing thing is making the script depends_on the previous release
branch. This is currently unsupported by alembic though.

Partially-Implements: blueprint online-schema-migrations
Change-Id: Ib3b9dfcbdb56db99b07a8e54629dda5933e1c1f5

9 years agoAdd DB support for resource usage tracking
Salvatore Orlando [Tue, 19 May 2015 16:49:26 +0000 (09:49 -0700)]
Add DB support for resource usage tracking

This patch introduces database support for tracking Neutron
resource usage data. A single DB model class tracks usage
info for all neutron resources.

The patch also provides a simple API for managing resource
usage info, as well as unit tests providing coverage for
this API.

This patch also makes a slight change to the ContextBase
class, adding the ability to explicitly set is_advsvc at
initialization time. While this probably makes no difference
for practical use of the context class, it simplifies
development of DB-only unit tests.

Related-Blueprint: better-quotas

Change-Id: I62100551b89103a21555dcc45e84195c05e89800

9 years agoMerge "Stop use of oslo_utils.timeutils.strtime()"
Jenkins [Sat, 25 Jul 2015 22:37:12 +0000 (22:37 +0000)]
Merge "Stop use of oslo_utils.timeutils.strtime()"

9 years agoMerge "Decompose Apic ML2 mechanism driver"
Jenkins [Sat, 25 Jul 2015 03:04:54 +0000 (03:04 +0000)]
Merge "Decompose Apic ML2 mechanism driver"

9 years agoMerge "Remove duplicate DHCP agent registration in unit test"
Jenkins [Fri, 24 Jul 2015 20:36:02 +0000 (20:36 +0000)]
Merge "Remove duplicate DHCP agent registration in unit test"

9 years agoDecompose Apic ML2 mechanism driver
Ivar Lazzaro [Thu, 18 Jun 2015 23:02:11 +0000 (16:02 -0700)]
Decompose Apic ML2 mechanism driver

As a part of the vendor decomposition effort, the
apic ML2 driver code is removed and replaced by
its version in the openstack/networking-cisco
repo.

Change-Id: Iffb5245b4c88b65afe62dd7435ee80489a654fee
Partial-implements: blueprint core-vendor-decomposition

9 years agoRemove duplicate DHCP agent registration in unit test
Assaf Muller [Fri, 24 Jul 2015 19:19:43 +0000 (15:19 -0400)]
Remove duplicate DHCP agent registration in unit test

Looks like a copy/paste mistake.

Change-Id: Ib8878e68f5348e03c9021ae3760b81f7cc73e68f

9 years agoPython 3: do not index dict_values objects
Cyril Roelandt [Fri, 24 Jul 2015 14:58:35 +0000 (16:58 +0200)]
Python 3: do not index dict_values objects

Change-Id: I7260468b81d42415ac08ecda09973720b5b263a4
Blueprint: neutron-python3

9 years agoMerge "Add Cathy Zhang as networking-sfc Lieutenant"
Jenkins [Fri, 24 Jul 2015 18:47:30 +0000 (18:47 +0000)]
Merge "Add Cathy Zhang as networking-sfc Lieutenant"

9 years agoMerge "Add error message when migrate from distributed router to centralized"
Jenkins [Fri, 24 Jul 2015 18:46:57 +0000 (18:46 +0000)]
Merge "Add error message when migrate from distributed router to centralized"

9 years agoL2 agent RPC add new RPC calls
rossella [Wed, 14 Jan 2015 14:11:36 +0000 (15:11 +0100)]
L2 agent RPC add new RPC calls

This patch introduces two new RPC calls:
* update_device_list
* get_devices_details_list_and_failed_devices

update_device_up and update_device_down are the RPC calls
used by the L2 agent to notify the plugin that
a device is up or down. These calls accept only one device.
update_device_list accepts a list of devices that will
be put up or down and returns a list of devices for which
the operation failed.

get_devices_details_list_and_failed_devices is a new RPC
call that returns a list of devices details and a list of
devices for which it was not possible to retrieve the
details.

Thanks to these new calls, the agent will be able to update
the status of several devices using one RPC call
and to retry the operation only for the devices that failed
instead of performing a full resync.
This will be implemented in another patch.

This patch introduces the new calls only for the OVS agent.
A following patch will take care of the other L2 agents.

DocImpact
Partially-Implements: blueprint restructure-l2-agent

Change-Id: Idb4e81f4399cf66025ec7edfcb78801c15e493af

9 years agoMerge "Adds garp_master_repeat and garp_master_refresh to keepalived.conf"
Jenkins [Fri, 24 Jul 2015 17:21:21 +0000 (17:21 +0000)]
Merge "Adds garp_master_repeat and garp_master_refresh to keepalived.conf"

9 years agoMerge "Avoid printing log options multiple times"
Jenkins [Fri, 24 Jul 2015 17:18:29 +0000 (17:18 +0000)]
Merge "Avoid printing log options multiple times"

9 years agoMerge "Add Pluggable IPAM Backend Part 2"
Jenkins [Fri, 24 Jul 2015 17:18:14 +0000 (17:18 +0000)]
Merge "Add Pluggable IPAM Backend Part 2"