]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMoved l2/agent_extensions_manager into l2/extensions/manager.py
Ihar Hrachyshka [Fri, 7 Aug 2015 06:24:00 +0000 (08:24 +0200)]
Moved l2/agent_extensions_manager into l2/extensions/manager.py

This is to keep manager more close to extensions. Also made some minor
renames in ovs agent attributes that seemed more beautiful.

Change-Id: Id5a356a595a052d0cf1f57d376ad8289e710a9b3
Partial-Implements: blueprint quantum-qos-api

9 years agoMoved extensions/qos_agent.py into extensions/qos.py
Ihar Hrachyshka [Fri, 7 Aug 2015 06:15:17 +0000 (08:15 +0200)]
Moved extensions/qos_agent.py into extensions/qos.py

This file does not contain any separate QoS agent but just an extension
for existing l2 agents to reuse.

Change-Id: I0587d89b0e841e5fd19b91157602efb5aa97513e
Partially-Implements: blueprint quantum-qos-api

9 years agoIntroduce base interface for core resource extensions
Ihar Hrachyshka [Thu, 6 Aug 2015 14:59:53 +0000 (16:59 +0200)]
Introduce base interface for core resource extensions

The interface can be found in neutron.core_extensions.base.

Adopted the interface in qos core resource extension.

Alos moved qos_extension under neutron.core_extensions.qos. Partially,
this is to avoid confusion around the fact that the module does not
really contain a neutron API extension but core resource extension.

Change-Id: I6f6976aa49694f7ef17afa4e93bc769cd0069f65
Partially-Implements: blueprint quantum-qos-api

9 years agoUpdated quality_of_service devref doc to reflect reality
Ihar Hrachyshka [Thu, 6 Aug 2015 14:45:17 +0000 (16:45 +0200)]
Updated quality_of_service devref doc to reflect reality

This document will need to get more updates once we start to shuffle
code in preparation for merging back into master.

Change-Id: I69d1e4b3bab8b62c5d8e45ec6294f4195de7ef83
Partially-Implements: quantum-qos-api

9 years agoMerge "Follow up with some cleanup for agent qos_driver" into feature/qos
Jenkins [Thu, 6 Aug 2015 00:43:05 +0000 (00:43 +0000)]
Merge "Follow up with some cleanup for agent qos_driver" into feature/qos

9 years agoMerge "Gracefully handle duplicate rule creation" into feature/qos
Jenkins [Thu, 6 Aug 2015 00:42:53 +0000 (00:42 +0000)]
Merge "Gracefully handle duplicate rule creation" into feature/qos

9 years agoSR-IOV: Update eswitch manager to support rate
Moshe Levi [Sun, 2 Aug 2015 09:58:54 +0000 (12:58 +0300)]
SR-IOV: Update eswitch manager to support rate

This patch update the eswitch manager to support
max rate on VF, moreover it updates the eswitch
manager to be singleton so it can be called from the
SR-IOV qos driver.

Partially-Implements: blueprint ml2-qos
Change-Id: I3e0d0a3fe2effade4e7bcd94018313ab2beb8f28

9 years agoFollow up with some cleanup for agent qos_driver
Ihar Hrachyshka [Tue, 4 Aug 2015 13:29:37 +0000 (15:29 +0200)]
Follow up with some cleanup for agent qos_driver

Removed error handling for missing rule type handler since the rule type
is already filtered thru supported types for the backend, so in case the
handler is really not present, that's a huge bug in the qos driver
extension and should not be handled gracefully.

Also fixed some grammar in docstrings.

Change-Id: Id157bd1e105051a583fea8e5107326289c551739
Partially-Implements: quantum-qos-api

9 years agoGracefully handle duplicate rule creation
John Schwarz [Mon, 3 Aug 2015 15:33:44 +0000 (18:33 +0300)]
Gracefully handle duplicate rule creation

Previously, creating a second bandwidth limit rule for a policy raised
an uncaught exception, which eventually caused 'ServerFault' on the
client side. This patch replaces this exception with a NeutronException
which leads to a more correct 'Conflict' error instead.

Note that the code is implemented in the base object class. This means
that future versioned objects will also feature this restriction if
their database implies that no duplicate entries can be created.

Change-Id: I882d60843e1e651f3f9754746ac670f499431466
Partially-Implements: quantum-qos-api

9 years agoMerge remote-tracking branch 'origin/feature/qos' into merge-branch
Ihar Hrachyshka [Wed, 5 Aug 2015 15:15:40 +0000 (17:15 +0200)]
Merge remote-tracking branch 'origin/feature/qos' into merge-branch

Change-Id: I683102e617202e0ffc953a0d3cc179879f8faf82

9 years agoRemove VPN from API tests
Henry Gessau [Wed, 5 Aug 2015 01:29:46 +0000 (21:29 -0400)]
Remove VPN from API tests

Change Idd5524ed0b602408be5a53830981a8ab974b390c removed the
VPN service from devstack installations in the gate, so now we
can no longer test VPN APIs from neutron. The tests will be
added to the vpnaas repo's API test suite.

Change-Id: I25267bd6713cf38f7134f4f047dc550c6f4a2a78

9 years agoMerge "Update OVS driver to work with objects" into feature/qos
Jenkins [Tue, 4 Aug 2015 17:46:08 +0000 (17:46 +0000)]
Merge "Update OVS driver to work with objects" into feature/qos

9 years agoMerge "Cleaned up some TODO comments for feature/qos that do not apply anymore" into...
Jenkins [Tue, 4 Aug 2015 17:41:22 +0000 (17:41 +0000)]
Merge "Cleaned up some TODO comments for feature/qos that do not apply anymore" into feature/qos

9 years agoMerge "Python 3: fix test_ovs_tunnel"
Jenkins [Tue, 4 Aug 2015 16:52:00 +0000 (16:52 +0000)]
Merge "Python 3: fix test_ovs_tunnel"

9 years agoMerge "_get_dvr_sync_data: Return a list, rather than dict_values for python3"
Jenkins [Tue, 4 Aug 2015 16:41:37 +0000 (16:41 +0000)]
Merge "_get_dvr_sync_data: Return a list, rather than dict_values for python3"

9 years agoMerge "Update port bindings for master router"
Jenkins [Tue, 4 Aug 2015 14:08:03 +0000 (14:08 +0000)]
Merge "Update port bindings for master router"

9 years agoMerge "Gracefully handle fetching nonexistent rule" into feature/qos
Jenkins [Tue, 4 Aug 2015 13:53:35 +0000 (13:53 +0000)]
Merge "Gracefully handle fetching nonexistent rule" into feature/qos

9 years agoMerge "objects.qos.policy: forbid deletion when attached to a port or a network"...
Jenkins [Tue, 4 Aug 2015 13:53:22 +0000 (13:53 +0000)]
Merge "objects.qos.policy: forbid deletion when attached to a port or a network" into feature/qos

9 years agoMerge "Replace to_dict() calls with a function decorator" into feature/qos
Jenkins [Tue, 4 Aug 2015 13:49:56 +0000 (13:49 +0000)]
Merge "Replace to_dict() calls with a function decorator" into feature/qos

9 years agoMerge "Remove handle_network/handle_subnet from l2 agent extensions" into feature/qos
Jenkins [Tue, 4 Aug 2015 13:44:31 +0000 (13:44 +0000)]
Merge "Remove handle_network/handle_subnet from l2 agent extensions" into feature/qos

9 years agoUpdate OVS driver to work with objects
Moshe Levi [Tue, 28 Jul 2015 12:46:10 +0000 (15:46 +0300)]
Update OVS driver to work with objects

This patch updates the QoS OVS driver to work with policy NeutronObjects
that are passed by the agent extension manager, instead of lists of rule
dicts, as we originally expected.  It also adds validation that the
rules that are sent by the neutron-server are actually supported by the
backend.

Finally, port dict was not really enough to determine the name of the
port in ovsdb. 'name' field is not really present in all port dicts, and
does not reflect what is known to ovs anyway. So instead, we should
rely on vif_port object to determine the ovs port name. Since ovs agent
only added the vif_port value to details dict when binding was desired,
I made adding the vif_port object unconditional, and covered that fact
with unit tests.

With this patch in place, I was able to get policy rules applied to a
port in devstack installation. Functional tests will belong to a
follow-up.

Partially-Implements: blueprint quantum-qos-api
Change-Id: I8926adb0a30728e4f82e55d71ad7e76676a22086

9 years agoMerge "Check that VXLAN is not in use in LB VXLAN check"
Jenkins [Tue, 4 Aug 2015 12:28:47 +0000 (12:28 +0000)]
Merge "Check that VXLAN is not in use in LB VXLAN check"

9 years agoPython 3: fix test_ovs_tunnel
Cyril Roelandt [Tue, 4 Aug 2015 12:27:48 +0000 (14:27 +0200)]
Python 3: fix test_ovs_tunnel

In Python 3, this happens:

>>> d = {}
>>> a = d.values()
>>> b = d.values()
>>> a == b
False

And anyway we're not really willing to pass dict_values objects around; we are
expecting lists, just like in Python 2, so let's just do the conversion.

Change-Id: I62ef32d50ba5ce64a653ffc62ba18c53cab9b15c
Blueprint: neutron-python3

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 ago_get_dvr_sync_data: Return a list, rather than dict_values for python3
YAMAMOTO Takashi [Tue, 4 Aug 2015 09:47:51 +0000 (18:47 +0900)]
_get_dvr_sync_data: Return a list, rather than dict_values for python3

Align with the non-dvr case.

Blueprint: neutron-python3
Change-Id: I37d24875be530f200118374e9f8046f32a902c8e

9 years agoMerge "Add API tests for non-accessible policies" into feature/qos
Jenkins [Tue, 4 Aug 2015 06:38:57 +0000 (06:38 +0000)]
Merge "Add API tests for non-accessible policies" into feature/qos

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 "L2 agent extension manager: read extensions list from config file" into featur...
Jenkins [Mon, 3 Aug 2015 22:40:49 +0000 (22:40 +0000)]
Merge "L2 agent extension manager: read extensions list from config file" into feature/qos

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 agoAdd API tests for non-accessible policies
John Schwarz [Mon, 3 Aug 2015 12:49:13 +0000 (15:49 +0300)]
Add API tests for non-accessible policies

Tests which dealt with creating a rule for a policy that the tenant has
no access to, or for a policy which does not even exist, were missing.
This patch adds them.

Partially-Implements: quantum-qos-api
Change-Id: I0a2679fa1ccfb7bae6083df9a71c6cb5205a21d9

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 "Guarantee there is only one bandwidth limit rule per policy" into feature/qos
Jenkins [Mon, 3 Aug 2015 18:29:29 +0000 (18:29 +0000)]
Merge "Guarantee there is only one bandwidth limit rule per policy" into feature/qos

9 years agoGracefully handle fetching nonexistent rule
John Schwarz [Mon, 3 Aug 2015 13:56:27 +0000 (16:56 +0300)]
Gracefully handle fetching nonexistent rule

Currently, if we invoke the API for 'show rule' but the rule does not
exist, an exception is raised from deep within Neutron. This in turns
causes an uncaught exception and the user will see 'ServerFault'. This
patch proposes a fix for this scenario - the case where the rule does
not exist is handled and a NeutronException is caused, causing a proper
'NotFound' error on the client side instead.

Partially-Implements: blueprint quantum-qos-api
Change-Id: Ic703a0865d1cfa057ab1ad5290b793b22df06af6

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 agouse single transaction to update qos policy associatation
Ihar Hrachyshka [Sun, 2 Aug 2015 21:44:53 +0000 (23:44 +0200)]
use single transaction to update qos policy associatation

To make association changes atomic, use autonested transaction.

Change-Id: I582ff43a0ce2f17e3f9fedf7cd32dfbac1ebae28
Partially-Implements: blueprint quantum-qos-api

9 years agoMerge "Moved QOS_POLICY_ID into qos_consts.py" into feature/qos
Jenkins [Mon, 3 Aug 2015 12:19:24 +0000 (12:19 +0000)]
Merge "Moved QOS_POLICY_ID into qos_consts.py" into feature/qos

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 agoReplace to_dict() calls with a function decorator
John Schwarz [Mon, 27 Jul 2015 09:09:10 +0000 (12:09 +0300)]
Replace to_dict() calls with a function decorator

Up until now, API server functions would need to return simple iterable
objects, such as dicts and lists of dicts. This patch introduces a
decorator which allows such functions to return non-simple objects (as
long as the returned object implements the 'to_dict()' method, or is a
list of such objects) and converts them on its own, simplifying the
user's code and removing code duplication.

Change-Id: Ib30a9213b86b33826291197cf01f00bc1dd3db52

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 agoGuarantee there is only one bandwidth limit rule per policy
Ihar Hrachyshka [Wed, 29 Jul 2015 18:44:54 +0000 (20:44 +0200)]
Guarantee there is only one bandwidth limit rule per policy

Added corresponding db model constraint.

Change-Id: I5592d49909408df66e4d01cebbc45204c2be66c1
Partially-Implements: blueprint quantum-qos-api

9 years agoCleaned up some TODO comments for feature/qos that do not apply anymore
Ihar Hrachyshka [Sun, 2 Aug 2015 20:40:40 +0000 (22:40 +0200)]
Cleaned up some TODO comments for feature/qos that do not apply anymore

1. Removed comment to add tests for invalid input for attach/detach
methods for QosPolicy. Those tests are already implemented in the test
class, so the TODO became obsolete.

2. Removed TODO to use a constant for rule 'type' field. There is no
'type' field in rules anymore, so it does not apply any more.

Change-Id: I205cbc2d9a2eeee1a0a9fb5794efc063de6f326d
Partially-Implements: blueprint quantum-qos-api

9 years agoL2 agent extension manager: read extensions list from config file
Ihar Hrachyshka [Sun, 2 Aug 2015 17:17:27 +0000 (19:17 +0200)]
L2 agent extension manager: read extensions list from config file

This effectively disables qos extension in the OVS agent, but we don't
rely on it in any functional or fullstack tests so far.

To enable the extension, a user should add:

[agent]
extensions = qos

to their openvswitch_agent.ini file.

DocImpact
Partially-Implements: blueprint quantum-qos-api
Change-Id: Icfbf32c36f98cc6e203841b152c7f6fc4f48c20a

9 years agoobjects.qos.policy: forbid deletion when attached to a port or a network
Ihar Hrachyshka [Sun, 2 Aug 2015 15:27:56 +0000 (17:27 +0200)]
objects.qos.policy: forbid deletion when attached to a port or a network

Similar to security groups, we forbid removing a policy that is attached
to any port or a network.

Change-Id: I0854c8ebc3b690c9195beeca92fe37f1121b410a
Partially-Implements: blueprint quantum-qos-api

9 years agoMerge "Added missing [qos] section into neutron.conf" into feature/qos
Jenkins [Sun, 2 Aug 2015 15:57:58 +0000 (15:57 +0000)]
Merge "Added missing [qos] section into neutron.conf" into feature/qos

9 years agoMerge "Enable rule delete test" into feature/qos
Jenkins [Sun, 2 Aug 2015 15:57:41 +0000 (15:57 +0000)]
Merge "Enable rule delete test" into feature/qos

9 years agoRemove handle_network/handle_subnet from l2 agent extensions
Ihar Hrachyshka [Sun, 2 Aug 2015 15:40:13 +0000 (17:40 +0200)]
Remove handle_network/handle_subnet from l2 agent extensions

L2 agents do not care about networks or subnets, they only care about
ports.

Change-Id: I3b354765e0efc9fa511421e7acbb937ded1146d8
Partially-Implements: blueprint quantum-qos-api

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 agoMerge "Don't set tenant_id for rule objects" into feature/qos
Jenkins [Sun, 2 Aug 2015 12:26:34 +0000 (12:26 +0000)]
Merge "Don't set tenant_id for rule objects" into feature/qos

9 years agoMerge "objects: consolidate single transaction checks into test_base" into feature/qos
Jenkins [Sun, 2 Aug 2015 11:11:44 +0000 (11:11 +0000)]
Merge "objects: consolidate single transaction checks into test_base" into feature/qos

9 years agoMoved QOS_POLICY_ID into qos_consts.py
Ihar Hrachyshka [Mon, 27 Jul 2015 18:53:26 +0000 (20:53 +0200)]
Moved QOS_POLICY_ID into qos_consts.py

Partially-Implements: blueprint quantum-qos-api
Change-Id: If789695b4084aed467d5f773c6b6bebea073724d

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 "objects.qos.policy: provide rules field, not type specific" into feature/qos
Jenkins [Sun, 2 Aug 2015 09:54:07 +0000 (09:54 +0000)]
Merge "objects.qos.policy: provide rules field, not type specific" into feature/qos

9 years agoMerge "Unite qos_rules and qos_*_rules tables" into feature/qos
Jenkins [Sun, 2 Aug 2015 09:52:28 +0000 (09:52 +0000)]
Merge "Unite qos_rules and qos_*_rules tables" into feature/qos

9 years agoMerge "Fix accessing shared policies, add assoc tests" into feature/qos
Jenkins [Sun, 2 Aug 2015 09:29:32 +0000 (09:29 +0000)]
Merge "Fix accessing shared policies, add assoc tests" into feature/qos

9 years agoMerge "qos: forbid creating rules when there is no access to policy" into feature/qos
Jenkins [Sun, 2 Aug 2015 08:01:18 +0000 (08:01 +0000)]
Merge "qos: forbid creating rules when there is no access to policy" into feature/qos

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 agoAdded missing [qos] section into neutron.conf
Ihar Hrachyshka [Wed, 29 Jul 2015 11:39:20 +0000 (13:39 +0200)]
Added missing [qos] section into neutron.conf

Also renamed service_notification_drivers into notification_drivers
since it's clear where it belongs anyway (it's in neutron.conf meaning
it's a server side configuration value).

Change-Id: I64610e4b60112daec982a8cacded9b9b936c10bd
Partially-Implements: blueprint quantum-qos-api

9 years agoEnable rule delete test
Ihar Hrachyshka [Wed, 29 Jul 2015 18:34:49 +0000 (20:34 +0200)]
Enable rule delete test

Change-Id: Ic950db35aec66fc0f81070a0641e0473f70d765c
Partially-Implements: blueprint quantum-qos-api

9 years agoobjects: consolidate single transaction checks into test_base
Ihar Hrachyshka [Wed, 29 Jul 2015 15:47:21 +0000 (17:47 +0200)]
objects: consolidate single transaction checks into test_base

Cover all base methods with it.

Change-Id: I0a6d401f6c1d35cbed397eed79a9aa7db07d179b
Partially-Implements: blueprint quantum-qos-api

9 years agoobjects.qos.policy: provide rules field, not type specific
Ihar Hrachyshka [Wed, 29 Jul 2015 13:25:52 +0000 (15:25 +0200)]
objects.qos.policy: provide rules field, not type specific

It should be forbidden to have multiple rules of the same type attached
to a policy, so the idea of having per type lists is moot.

Instead, we should have a single list of all rules that belong to the
policy.

Also fixed a test that validated a single transaction to actually work
with multiple autonested transactions applied.

Partially-Implements: blueprint quantum-qos-api
Change-Id: Ia152b3ff385d2aa0cf40664ef039265b046b1d17

9 years agoUnite qos_rules and qos_*_rules tables
Ihar Hrachyshka [Sat, 25 Jul 2015 14:21:37 +0000 (16:21 +0200)]
Unite qos_rules and qos_*_rules tables

The only values in qos_rules table are: type, id and qos_policy_id. Both
id fields point to qos_*_rules and qos_policies objects.

Type is redundant since qos_rule and qos_*_rule objects maintain 1-to-1
relationship.

Keeping a separate table just to link qos_*_rule and qos_policy objects
has no meaning. At the same time, it complicates the code for rule
objects significantly.

So instead of copying with all those issues, we just squash the tables
into single one. It allows us to reuse all base methods from
NeutronObject for rules.

LOC stats for the patch clearly shows the point:

65 insertions(+), 267 deletions(-)

And no actual functionality is lost.

While at it, the following changes were applied:

- some base tests are reimplemented to test objects in a more explicit
  way;
- fields_no_update class attribute is now actually enforced in base
  object class.

Partially-Implements: blueprint quantum-qos-api
Change-Id: Iadabd14c3490c842608e53ceccf38c79dcdf8d85

9 years agoFix accessing shared policies, add assoc tests
John Schwarz [Sun, 26 Jul 2015 13:00:12 +0000 (16:00 +0300)]
Fix accessing shared policies, add assoc tests

This patch is two-fold:
1. Previously, policies that were created using the 'shared=True' flag
   were not accessible to other tenants, since the context used to
   search the policies was not elevated. This patch elevates the context
   prior to retrieving the policy, and if a match was found, makes sure
   that the user has permissions to access it (either the policy is
   shared or it's from the same tenant id).
2. Tests for both associations and disassociations of policies to both
   networks and ports are added in this patch, to make sure coverage is
   good and that the problem is fixed.

Change-Id: Idec13ff4ec575b6d0c0a455c1b3bd9d9700ff7fb

9 years agoqos: forbid creating rules when there is no access to policy
Ihar Hrachyshka [Thu, 30 Jul 2015 11:51:24 +0000 (13:51 +0200)]
qos: forbid creating rules when there is no access to policy

Change-Id: If06de416dfe0eb7115fd4be9feb461fae8e8358d
Partially-Implements: blueprint quantum-qos-api

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 "SR-IOV: update pci lib to support rate limit" into feature/qos
Jenkins [Fri, 31 Jul 2015 22:24:01 +0000 (22:24 +0000)]
Merge "SR-IOV: update pci lib to support rate limit" into feature/qos

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 agoCheck that VXLAN is not in use in LB VXLAN check
Kevin Benton [Wed, 29 Jul 2015 23:32:43 +0000 (16:32 -0700)]
Check that VXLAN is not in use in LB VXLAN check

The Linux bridge VXLAN supported check was only checking that the
test interface didn't exist instead of checking that both the interface
and the VXLAN didn't exist. This caused it to fail on startup if
a VXLAN interface existed under a different name using one of the
VXLANs that the agent tried to test support with.

This patch adds a check to ensure that the VXLAN ID isn't in use as well.

Closes-Bug: #1470579
Change-Id: I3a91ce54da86e319b7a4485dfae3fc99885383d4

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: update pci lib to support rate limit
Moshe Levi [Wed, 15 Jul 2015 05:25:38 +0000 (08:25 +0300)]
SR-IOV: update pci lib to support rate limit

Partially-Implements: blueprint ml2-qos
Change-Id: I3095f0e8249941f24cbf478cba142135272ebfd3