]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
9 years agoMerge "Make models_v2 explicitly import rbac_db_models"
Jenkins [Tue, 25 Aug 2015 04:39:18 +0000 (04:39 +0000)]
Merge "Make models_v2 explicitly import rbac_db_models"

9 years agoMerge "ip_lib: support creating Linux dummy interface"
Jenkins [Tue, 25 Aug 2015 03:26:21 +0000 (03:26 +0000)]
Merge "ip_lib: support creating Linux dummy interface"

9 years agoMerge "Make NeutronDbObjectDuplicateEntry exception more verbose"
Jenkins [Mon, 24 Aug 2015 22:29:20 +0000 (22:29 +0000)]
Merge "Make NeutronDbObjectDuplicateEntry exception more verbose"

9 years agoMerge "Template for ModelMigrationTest for external repos"
Jenkins [Mon, 24 Aug 2015 22:27:42 +0000 (22:27 +0000)]
Merge "Template for ModelMigrationTest for external repos"

9 years agoMerge "Remove redundant logging statements from RootWrapDaemonHelper"
Jenkins [Mon, 24 Aug 2015 22:26:21 +0000 (22:26 +0000)]
Merge "Remove redundant logging statements from RootWrapDaemonHelper"

9 years agoMerge "Rationalize neutron logs to help in troubleshooting router issues"
Jenkins [Mon, 24 Aug 2015 20:34:01 +0000 (20:34 +0000)]
Merge "Rationalize neutron logs to help in troubleshooting router issues"

9 years agoRemove redundant logging statements from RootWrapDaemonHelper
Ryan Moats [Mon, 24 Aug 2015 13:49:09 +0000 (08:49 -0500)]
Remove redundant logging statements from RootWrapDaemonHelper

create_process and execute_rootwrap_daemon both current log
the command they are about to run.  Remove these statements as
redundant (the log message showing the command's result includes
the command itself)

Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
Change-Id: I8bdea7212f8a32a3b6b0b47c5b824ac1c561d83f

9 years agoRationalize neutron logs to help in troubleshooting router issues
Ryan Moats [Fri, 21 Aug 2015 14:16:52 +0000 (09:16 -0500)]
Rationalize neutron logs to help in troubleshooting router issues

Currently the neutron logs are not very useful for troubleshooting
router issues - this patch adds additional logging statements to
help the triage process.

Change-Id: I014e0119205d4a947a1be142aeeb29940c4de3bd
Signed-off-by: Ryan Moats <rmoats@us.ibm.com>
9 years agoMove db agent schedulers test to a more appropriate place
Oleg Bondarev [Mon, 24 Aug 2015 08:29:25 +0000 (11:29 +0300)]
Move db agent schedulers test to a more appropriate place

Current placing is confusing as in fact the tests have little to do
with ml2 and openvswitch.
This was triggered by discussion on https://review.openstack.org/199514
Next step should be to separate dhcp and l3 schedulers tests.

Change-Id: Ie05874fdc1c3070ed319e8f624c8217c5c0bb646

9 years agoMerge "Move tests for non pluggable ipam backend"
Jenkins [Mon, 24 Aug 2015 11:38:06 +0000 (11:38 +0000)]
Merge "Move tests for non pluggable ipam backend"

9 years agoMerge "Added initial devstack plugin"
Jenkins [Mon, 24 Aug 2015 11:37:52 +0000 (11:37 +0000)]
Merge "Added initial devstack plugin"

9 years agoMerge "manual add/remove router for dvr_snat agent"
Jenkins [Mon, 24 Aug 2015 10:57:03 +0000 (10:57 +0000)]
Merge "manual add/remove router for dvr_snat agent"

9 years agoMake models_v2 explicitly import rbac_db_models
Kevin Benton [Mon, 24 Aug 2015 10:13:14 +0000 (03:13 -0700)]
Make models_v2 explicitly import rbac_db_models

The Network model was implicitly relying on a core plugin to import
the db_base_plugin_v2 module which would import the rbac model module
so "NetworkRBAC" would be defined by the time something would query
the DB. However, this isn't the case for scripts or agents that are
importing models_v2 and trying to query the DB directly so they will
now break with an sqlaclhemy error about a missing model.

This patch makes models_v2 import the rbac_db_models module directly
so the model will always be defined.

This would have resulted in a circular import because the
rbac_db_models module required the HasId and HasTenant classes
in models_v2. So this patch also moves these helper classes
into model_base.

Change-Id: I338ce1c0ba55647e6410a63f937737f75a63057d
Closes-Bug: #1488032

9 years agoMerge "Graceful OVS restart for DVR"
Jenkins [Mon, 24 Aug 2015 10:04:48 +0000 (10:04 +0000)]
Merge "Graceful OVS restart for DVR"

9 years agoMake NeutronDbObjectDuplicateEntry exception more verbose
Miguel Angel Ajo [Wed, 19 Aug 2015 13:15:21 +0000 (15:15 +0200)]
Make NeutronDbObjectDuplicateEntry exception more verbose

NeutronObjectDuplicateEntry is an exception derived from Conflict,
which is mapped to HTTPConflict. When such exception is thrown
during an API layer call, we will provide more detail to the caller
about what was exactly duplicated, and for which fields,
the information is extracted from the DB exception.

NeutronObjectDuplicateEntry is renamed into NeutronDbObjectDuplicate
to make clear it is for handling db duplicate exceptions, in
the future we could generalize to a base NeutronObjectDuplicate class
if we need separate handling for other object backings (mem, keystore,
etc).

Change-Id: I6ec5883b3456ebc842f3f7bffd8cc924293f5766

9 years agoMerge "Add support for unaddressed port"
Jenkins [Mon, 24 Aug 2015 04:09:13 +0000 (04:09 +0000)]
Merge "Add support for unaddressed port"

9 years agoMerge "Remove the ML2 Nuage driver code"
Jenkins [Sun, 23 Aug 2015 03:25:03 +0000 (03:25 +0000)]
Merge "Remove the ML2 Nuage driver code"

9 years agoMerge "Support dhcp metadata service for all networks"
Jenkins [Sun, 23 Aug 2015 03:12:54 +0000 (03:12 +0000)]
Merge "Support dhcp metadata service for all networks"

9 years agoMerge "Rename args for alembic 0.8.0"
Jenkins [Sun, 23 Aug 2015 00:29:26 +0000 (00:29 +0000)]
Merge "Rename args for alembic 0.8.0"

9 years agoMerge "DVR: make sure snat portion is always scheduled when needed"
Jenkins [Sat, 22 Aug 2015 22:00:09 +0000 (22:00 +0000)]
Merge "DVR: make sure snat portion is always scheduled when needed"

9 years agoMerge "Add config option to specify ovs datapath."
Jenkins [Sat, 22 Aug 2015 21:34:50 +0000 (21:34 +0000)]
Merge "Add config option to specify ovs datapath."

9 years agoSupport dhcp metadata service for all networks
Marga Millet [Wed, 12 Aug 2015 10:49:09 +0000 (03:49 -0700)]
Support dhcp metadata service for all networks

Vendors implementing Neutron L3 API in their devices may not be able to provide
metadata server access via the Neutron router. In such cases we want to allow
the metadata service as done for non-isolated networks segments.

DocImpact
Change-Id: I5f6ee9788717c3d4f1f2e2a4b9734fdd8dd92b40
Closes-Bug:#1483939

9 years agoMerge "Python 3: use __code__ instead of func_code"
Jenkins [Sat, 22 Aug 2015 19:19:04 +0000 (19:19 +0000)]
Merge "Python 3: use __code__ instead of func_code"

9 years agoMerge "Move docstring to FakeMachineBase"
Jenkins [Sat, 22 Aug 2015 18:52:33 +0000 (18:52 +0000)]
Merge "Move docstring to FakeMachineBase"

9 years agoMerge "Neutron RBAC API and network support"
Jenkins [Sat, 22 Aug 2015 17:42:36 +0000 (17:42 +0000)]
Merge "Neutron RBAC API and network support"

9 years agoMerge "Dropped release name from migration branch labels"
Jenkins [Sat, 22 Aug 2015 17:42:18 +0000 (17:42 +0000)]
Merge "Dropped release name from migration branch labels"

9 years agoMerge "neutron-db-manage: sync HEADS file with 'current' output"
Jenkins [Sat, 22 Aug 2015 17:41:53 +0000 (17:41 +0000)]
Merge "neutron-db-manage: sync HEADS file with 'current' output"

9 years agoMerge "Only validate local_ip if using tunneling"
Jenkins [Sat, 22 Aug 2015 17:38:50 +0000 (17:38 +0000)]
Merge "Only validate local_ip if using tunneling"

9 years agoMerge "Imported Translations from Transifex"
Jenkins [Sat, 22 Aug 2015 13:39:41 +0000 (13:39 +0000)]
Merge "Imported Translations from Transifex"

9 years agoMerge "Update rootwrap.conf to add /usr/local/sbin"
Jenkins [Sat, 22 Aug 2015 13:28:53 +0000 (13:28 +0000)]
Merge "Update rootwrap.conf to add /usr/local/sbin"

9 years agoMove docstring to FakeMachineBase
Cedric Brandily [Sat, 22 Aug 2015 09:49:24 +0000 (11:49 +0200)]
Move docstring to FakeMachineBase

This change moves FakeMachine docstring to FakeMachineBase because it is
valid for all FakeMachineBase subclasses.

Change-Id: Ic30098f7d84dd3a5d6c5f7ff675d3f6e7b0a4cae

9 years agoMerge "Update oslo messaging configuration section for fullstack"
Jenkins [Sat, 22 Aug 2015 04:39:59 +0000 (04:39 +0000)]
Merge "Update oslo messaging configuration section for fullstack"

9 years agoMerge "DHCP agent: clarify logic of setup_dhcp_port"
Jenkins [Sat, 22 Aug 2015 04:39:47 +0000 (04:39 +0000)]
Merge "DHCP agent: clarify logic of setup_dhcp_port"

9 years agoMerge "Python 3: do not do "assertFalse(filter(...))""
Jenkins [Sat, 22 Aug 2015 04:26:18 +0000 (04:26 +0000)]
Merge "Python 3: do not do "assertFalse(filter(...))""

9 years agoMerge "Python 3: fix test_ovs_tunnel"
Jenkins [Fri, 21 Aug 2015 23:59:59 +0000 (23:59 +0000)]
Merge "Python 3: fix test_ovs_tunnel"

9 years agoMerge "Do not query reservations table when counting resources"
Jenkins [Fri, 21 Aug 2015 23:50:33 +0000 (23:50 +0000)]
Merge "Do not query reservations table when counting resources"

9 years agoUpdate rootwrap.conf to add /usr/local/sbin
John Davidge [Fri, 21 Aug 2015 18:07:57 +0000 (19:07 +0100)]
Update rootwrap.conf to add /usr/local/sbin

This update will allow for local executables that require root
privileges, such as dibbler-client for IPv6 Prefix Delegation.

Change-Id: Id7aebb50e60b1cc64c113be63c599387be5f1765

9 years agoRemove the ML2 Nuage driver code
Vlad Gridin [Thu, 20 Aug 2015 14:15:03 +0000 (16:15 +0200)]
Remove the ML2 Nuage driver code

This changeset removes ML2 Nuage driver vendor code,
currently present in neutron core to vendor repo.

Closes-bug: #1486662
Related-Blueprint: core-vendor-decomposition

Change-Id: I6388e91ba56aa6b8f16c723f7d07234d262b6c16

9 years agoTemplate for ModelMigrationTest for external repos
Ann Kamyshnikova [Fri, 14 Aug 2015 12:25:36 +0000 (15:25 +0300)]
Template for ModelMigrationTest for external repos

This change adds tempate for ModelMigrationTest which should be
implemented in all driver/plugin repositoties that were split
out from Neutron.

Also split DRIVER_TABLES into separate lists for each driver.
This is needed for easier implementation of test.

Closes-bug:#1470678

Change-Id: I02100d15d71519014db7c8894bd2cb36c86d32a0

9 years agoPython 3: do not do "assertFalse(filter(...))"
Cyril Roelandt [Fri, 21 Aug 2015 09:56:42 +0000 (11:56 +0200)]
Python 3: do not do "assertFalse(filter(...))"

This does not work in Python 3 since filter does not return a list. Fix this by
replacing it with a list comprehension.

Blueprint: neutron-python3
Change-Id: I59a63f7adedaf2217aa8fc9aae63045b4e620361

9 years agoip_lib: support creating Linux dummy interface
Neil Jerram [Mon, 27 Jul 2015 13:43:18 +0000 (14:43 +0100)]
ip_lib: support creating Linux dummy interface

This is for use by a DHCP agent interface driver in the
networking-calico project.  networking-calico connects VMs without
using bridging, so it needs an unbridged DHCP port interface with
which it can associate the DHCP subnet prefix, and the Linux dummy
interface (in conjunction with use of Dnsmasq's --bridge-interface
feature) is suitable for that purpose.

Partial-Bug: #1486649
Change-Id: I5485c187bc44bac3c2942c4fc9e5a502912a81a2

9 years agoGraceful OVS restart for DVR
Ann Kamyshnikova [Fri, 21 Aug 2015 12:13:25 +0000 (15:13 +0300)]
Graceful OVS restart for DVR

Graceful OVS restart that was intoduced in I95070d8218859d4fff1d572c1792cdf6019dd7ea
missed that flows are also dropped in setup_dvr_flows_on_integ_br.

Related-bug: #1383674

Change-Id: I7b24a159962af7b58c096a1b2766e2169e9f8aed

9 years agoDHCP agent: clarify logic of setup_dhcp_port
Neil Jerram [Thu, 23 Jul 2015 17:17:12 +0000 (18:17 +0100)]
DHCP agent: clarify logic of setup_dhcp_port

When the DHCP port already exists, the code for finding it is
unhelpfully mixed up with the code for updating its subnet IDs and
fixed IP addresses.  Clarify that area by splitting setup_dhcp_port
into 3 subroutines, for each of the existing, reserved and new port
cases.

Related-Bug: #1486649
Change-Id: I2a537560dc7a37299f4b7b4cd508d9309bbe1209

9 years agoAdd config option to specify ovs datapath.
Sean Mooney [Fri, 26 Jun 2015 09:48:26 +0000 (10:48 +0100)]
Add config option to specify ovs datapath.

This change introduces a new datapath_type parameter
to allow specification of the ovs datapath to be used.
This change introduces new functional and unit tests.

DocImpact
Change-Id: I929d8d15fc6cfdb799c53ef0f3722f4ed5c1096d
Partial-Bug: #1469871

9 years agoPython 3: fix test_ovs_tunnel
Cyril Roelandt [Fri, 21 Aug 2015 10:19:30 +0000 (12:19 +0200)]
Python 3: fix test_ovs_tunnel

In Python 3, __bool__ should be used instead of __nonzero__.

Change-Id: I04b688a6ac079a161bd888c53b8b98b574171ea9
Blueprint: neutron-python3

9 years agoMerge "l2pop: check port mac in pre-commit to stop change"
Jenkins [Fri, 21 Aug 2015 10:12:12 +0000 (10:12 +0000)]
Merge "l2pop: check port mac in pre-commit to stop change"

9 years agoMerge "Fixed broken link in neutron-server's documents"
Jenkins [Fri, 21 Aug 2015 09:55:12 +0000 (09:55 +0000)]
Merge "Fixed broken link in neutron-server's documents"

9 years agoMerge "qos: Delete bw limit rule when policy is deleted"
Jenkins [Fri, 21 Aug 2015 09:53:43 +0000 (09:53 +0000)]
Merge "qos: Delete bw limit rule when policy is deleted"

9 years agoPython 3: use __code__ instead of func_code
Cyril Roelandt [Fri, 21 Aug 2015 09:20:27 +0000 (11:20 +0200)]
Python 3: use __code__ instead of func_code

The former works with both Python 2 and 3.

Change-Id: Id2f6d313bf90777e02b20b7f6f4fb99e79e85aff
Blueprint: neutron-python3

9 years agoMerge "Used namedtuple for ReservationInfo"
Jenkins [Fri, 21 Aug 2015 09:49:37 +0000 (09:49 +0000)]
Merge "Used namedtuple for ReservationInfo"

9 years agoMerge "Split DRIVER_TABLES in external.py"
Jenkins [Fri, 21 Aug 2015 09:42:47 +0000 (09:42 +0000)]
Merge "Split DRIVER_TABLES in external.py"

9 years agoUpdate oslo messaging configuration section for fullstack
Miguel Angel Ajo [Fri, 21 Aug 2015 05:42:22 +0000 (07:42 +0200)]
Update oslo messaging configuration section for fullstack

rabbit_virtual_host, rabbit_hosts, rabbit_userid, and rabbit_password
for oslo_messaging are now deprecated in the DEFAULT config section.

Those settings should be provided under the oslo_messaging_rabbit section
now.

Closes-Bug: 1487322

Change-Id: I12d560aefceeadb03f7a4ee1e4e2f920b2cf57f2

9 years agoImported Translations from Transifex
OpenStack Proposal Bot [Fri, 21 Aug 2015 06:08:23 +0000 (06:08 +0000)]
Imported Translations from Transifex

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

Change-Id: Ie7eece283fcc43f872e28b72bac9b2f92913b84c

9 years agoMerge "Python 3: hmac requires bytes key/msg"
Jenkins [Fri, 21 Aug 2015 03:48:46 +0000 (03:48 +0000)]
Merge "Python 3: hmac requires bytes key/msg"

9 years agoMerge "fullstack: use migration scripts to create db schema"
Jenkins [Fri, 21 Aug 2015 03:48:33 +0000 (03:48 +0000)]
Merge "fullstack: use migration scripts to create db schema"

9 years agoMerge "Fix qos api-tests after policy changes"
Jenkins [Fri, 21 Aug 2015 03:45:36 +0000 (03:45 +0000)]
Merge "Fix qos api-tests after policy changes"

9 years agoNeutron RBAC API and network support
Kevin Benton [Wed, 17 Jun 2015 06:43:59 +0000 (23:43 -0700)]
Neutron RBAC API and network support

This adds the new API endpoint to create, update, and delete
role-based access control entries. These entries enable tenants
to grant access to other tenants to perform an action on an object
they do not own.

This was previously done using a single 'shared' flag; however, this
was too coarse because an object would either be private to a tenant
or it would be shared with every tenant.

In addition to introducing the API, this patch also adds support to
for the new entries in Neutron networks. This means tenants can now
share their networks with specific tenants as long as they know the
tenant ID.

This feature is backwards-compatible with the previous 'shared'
attribute in the API. So if a deployer doesn't want this new feature
enabled, all of the RBAC operations can be blocked in policy.json and
networks can still be globally shared in the legacy manner.

Even though this feature is referred to as role-based access control,
this first version only supports sharing networks with specific
tenant IDs because Neutron currently doesn't have integration with
Keystone to handle changes in a tenant's roles/groups/etc.

DocImpact
APIImpact

Change-Id: Ib90e2a931df068f417faf26e9c3780dc3c468867
Partially-Implements: blueprint rbac-networks

9 years agoMerge "fullstack: Skip NotFound in safe_client cleanup"
Jenkins [Fri, 21 Aug 2015 01:39:21 +0000 (01:39 +0000)]
Merge "fullstack: Skip NotFound in safe_client cleanup"

9 years agoMerge "quota: synchronize resync and count with other dirty_tenants code"
Jenkins [Fri, 21 Aug 2015 01:39:07 +0000 (01:39 +0000)]
Merge "quota: synchronize resync and count with other dirty_tenants code"

9 years agoFixed broken link in neutron-server's documents
Liang Bo [Thu, 20 Aug 2015 06:24:46 +0000 (14:24 +0800)]
Fixed broken link in neutron-server's documents

The neutron-server document contains a link (http://neutron.openstack.org)
which is not exist anymore. This patch updates the link to neutron's doc site
and wiki page.

Change-Id: I9d137ed9c877fc1a12590bd743fac67d06711f7f
Closes-Bug: #1486848

9 years agoMerge "Add high-level functional/integration DVR tests"
Jenkins [Fri, 21 Aug 2015 00:48:49 +0000 (00:48 +0000)]
Merge "Add high-level functional/integration DVR tests"

9 years agoMerge "Add missing tenant_id validation in RESOURCE_ATTRIBUTE_MAP"
Jenkins [Fri, 21 Aug 2015 00:48:30 +0000 (00:48 +0000)]
Merge "Add missing tenant_id validation in RESOURCE_ATTRIBUTE_MAP"

9 years agoMerge "Sync FK constraints in db models with migration scripts"
Jenkins [Fri, 21 Aug 2015 00:48:17 +0000 (00:48 +0000)]
Merge "Sync FK constraints in db models with migration scripts"

9 years agoMerge "Graceful ovs-agent restart"
Jenkins [Fri, 21 Aug 2015 00:47:55 +0000 (00:47 +0000)]
Merge "Graceful ovs-agent restart"

9 years agoMerge "Setup firewall filters only for required ports"
Jenkins [Fri, 21 Aug 2015 00:36:42 +0000 (00:36 +0000)]
Merge "Setup firewall filters only for required ports"

9 years agoUsed namedtuple for ReservationInfo
Salvatore Orlando [Thu, 20 Aug 2015 22:33:27 +0000 (15:33 -0700)]
Used namedtuple for ReservationInfo

The code already uses a namedtuple for ResourceUsageInfo
and it is a nonsense to not use it for ReservationInfo.

Related-Blueprint: bp/better-quotas

Change-Id: I99666ac865fbdeef2d84353eff49d60b6d87fddc

9 years agoMerge "Add EnvironmentDescription, pass it down"
Jenkins [Thu, 20 Aug 2015 21:34:42 +0000 (21:34 +0000)]
Merge "Add EnvironmentDescription, pass it down"

9 years agoMerge "Python 3: encode or decode i/o data of Popen.communicate()"
Jenkins [Thu, 20 Aug 2015 21:34:27 +0000 (21:34 +0000)]
Merge "Python 3: encode or decode i/o data of Popen.communicate()"

9 years agoMerge "Unskip firewall test"
Jenkins [Thu, 20 Aug 2015 18:21:34 +0000 (18:21 +0000)]
Merge "Unskip firewall test"

9 years agoMerge "Fix _ensure_default_security_group logic"
Jenkins [Thu, 20 Aug 2015 18:21:19 +0000 (18:21 +0000)]
Merge "Fix _ensure_default_security_group logic"

9 years agoMerge "Add a fullstack fake VM, basic connectivity test"
Jenkins [Thu, 20 Aug 2015 16:47:23 +0000 (16:47 +0000)]
Merge "Add a fullstack fake VM, basic connectivity test"

9 years agoAdded initial devstack plugin
Ihar Hrachyshka [Tue, 18 Aug 2015 14:57:44 +0000 (16:57 +0200)]
Added initial devstack plugin

For now it only supports q-qos service that is used to configure QoS service
plugin. It also adds ability to enable l2 agent extensions.

To check that it works, I am enabling QoS tests back for API job.

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

9 years agoFix qos api-tests after policy changes
Miguel Angel Ajo [Thu, 20 Aug 2015 13:57:19 +0000 (15:57 +0200)]
Fix qos api-tests after policy changes

The policy.json update in change
Ide1cd30979f99612fe89dddf3dc0e029d3f4d34a breaks the qos api-tests
due to actions which the default policy won't allow, like qos
rules or policies creation by non-admins.

We removed test_rule_association_nonshared_policy which
is not possible with the default policy.json in favor of
test_policy_create_forbidden_for_regular_tenants.

This commit unblocks the qos api-test re-enablement.

Partially-Implements: blueprint quantum-qos-api

Change-Id: Ib77412bd95ad5b65ad0f6964d9809b5f707847f5

9 years agofullstack: use migration scripts to create db schema
Jakub Libosvar [Thu, 20 Aug 2015 16:02:11 +0000 (16:02 +0000)]
fullstack: use migration scripts to create db schema

Previously, we used create_all() based on models. We don't use
create_all() in production code and there is no guarantee models and
scripts are in sync even though we have a good functional test that
validates that. There are still pieces that can't be compared by
alembic.

Change-Id: I72fa67811f0763298416e6e084a8b9b86619795b
Closes-Bug: 1486528

9 years agoMerge "Add logging to debug oslo.messaging failure"
Jenkins [Thu, 20 Aug 2015 15:48:29 +0000 (15:48 +0000)]
Merge "Add logging to debug oslo.messaging failure"

9 years agoOnly validate local_ip if using tunneling
John Schwarz [Thu, 20 Aug 2015 14:05:02 +0000 (17:05 +0300)]
Only validate local_ip if using tunneling

Change I4b4527c28d0738890e33b343c9e17941e780bc24 introduced a new
validation to make sure that local_ip holds a valid IP that is present
in one of the interfaces on the machine. However, this test is not
relevant if tunneling is not enabled, since the value is ignored anyway.

This patch changes validate_local_ip to not check local_ip in case
tunneling is not enabled (if no value was put in the 'tunnel_types'
option).

Change-Id: I07119341076573a4226b5ad998bdff09c021ae30
Closes-Bug: #1487053
Related-Bug: #1408603

9 years agoqos: Delete bw limit rule when policy is deleted
Jakub Libosvar [Tue, 18 Aug 2015 13:42:37 +0000 (13:42 +0000)]
qos: Delete bw limit rule when policy is deleted

We need to add ON DELETE CASCADE to qos_policy_id on bw limit rule table
in order to delete policy successfully. There is a migration script that
creates db scheme with correct foreign key constraint but we miss this in
models. Currently, we have a functional test that guarantees parity
between migration scripts and models but we don't have guaranteed foreign
keys parity due to alembic bug [1].

https://bitbucket.org/zzzeek/alembic/issues/317

Change-Id: I06fa32dd11a5a52a80ae5a7952f8b32511c3f39d
Closes-Bug: 1485926

9 years agoDo not query reservations table when counting resources
Salvatore Orlando [Wed, 19 Aug 2015 13:10:08 +0000 (06:10 -0700)]
Do not query reservations table when counting resources

Reservations are temporarily disabled, and therefore querying them
is pointless, and potentially harmful.

Change-Id: Iab1d0ffdc54cb5bd06a0d4fbd4eb095ac4b754b8
Related-Bug: #1486134

9 years agoAdd support for unaddressed port
Yalei Wang [Fri, 7 Aug 2015 14:43:30 +0000 (22:43 +0800)]
Add support for unaddressed port

Neutron could create a port without the IP address when the network doesn't
have a subnet. In this case, neutron will have no L3 knowledgee and we need
remove the L3 filter on it but reserve the L2 filter if there is.
This patch will make L2 agent verify the fixed_ips before converting the
security-group-rules into firewall rules, L3 rules in it will be removed.
And filter like arp-spoofing will be disabled for this port.

Partially Implements: blueprint vm-without-l3-address
Change-Id: I5cd1fdfa13a7e57258be7251768eaa8ba64d486e

9 years agoSync FK constraints in db models with migration scripts
Jakub Libosvar [Thu, 20 Aug 2015 12:33:59 +0000 (12:33 +0000)]
Sync FK constraints in db models with migration scripts

We do have a functional test that compares Neutron's db models with
migration scripts. The comparison is based on alembic library that had a
bug which is gonna be solved in the next release [1]. Once we start
using newer alembic, functional test mentioned above will start failing
due to models and scripts are not in sync.

This patch adds needed constraints discovered by running functional test
locally with dev version of alembic.

Note: There is already a patch [2] that fixes QoS.

[1] https://bitbucket.org/zzzeek/alembic/issues/317
[2] https://review.openstack.org/#/c/214215/

Change-Id: I0d0bddb05f543365d09e592bd81759534de49367
Closes-Bug: 1486936

9 years agoAdd EnvironmentDescription, pass it down
John Schwarz [Sun, 9 Aug 2015 14:00:57 +0000 (17:00 +0300)]
Add EnvironmentDescription, pass it down

* The EnvironmentDescription class describes an entire fullstack
  environment (as opposed to the currently implemented host-only
  descriptions). This will allow future patches to signify that a test
  should set up an environment that supports tunneling, l2pop, QoS and
  more.
* Now, most fullstack fixtures (config and process ones, at least),
  expect both the EnvironmentDescription for the current test and the
  HostDescription for the 'host' the config/process is on. This allows
  for easier and most robust future changes, as now adding a new
  parameter to one of the description objects doesn't mean adding that
  argument to a number of other objects which are using it.
* Changed HostDescription's default argument of l3_agent to False, since
  adding new configurations and defualting them to True forces the
  author to go through ALL the tests and explicitly turn them on/off.
  However, defaulting new configurations to False only requires
  explicitly turning them on, which we ought to do anyway.

Change-Id: Ib2f12016ba4371bfda76c82e11d0794acc759955

9 years agoDropped release name from migration branch labels
Ihar Hrachyshka [Thu, 20 Aug 2015 11:01:46 +0000 (13:01 +0200)]
Dropped release name from migration branch labels

Since the plan is to attach first Mitaka scripts to Liberty branches
with down_revision, and since labels are inherited from all other
revisions in the chain, using release names in branch labels would mean
that the following commands would be valid:

neutron-db-manage upgrade liberty_expand@<some_revision_from_mitaka>
neutron-db-manage upgrade mitaka_expand@<some_revision_from_liberty>

which may be confusing to users.

So let's drop release names from branch labels and use expand@head and
contract@head to access latest migrations.

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

9 years agoSplit DRIVER_TABLES in external.py
Ann Kamyshnikova [Thu, 20 Aug 2015 08:27:39 +0000 (11:27 +0300)]
Split DRIVER_TABLES in external.py

Split DRIVER_TABLES into separate lists for each driver.
This is needed for easier implementation of ModelMigrationSyncTest
in driver/plugin repositoties that were split out from Neutron.

Related-bug: #1470678

Change-Id: Id4558f2230f42377be1dd4f319a2c97122d1fa9d

9 years agoMerge "Minor typo fix"
Jenkins [Thu, 20 Aug 2015 11:03:33 +0000 (11:03 +0000)]
Merge "Minor typo fix"

9 years agoDVR: make sure snat portion is always scheduled when needed
Oleg Bondarev [Thu, 20 Aug 2015 09:02:55 +0000 (12:02 +0300)]
DVR: make sure snat portion is always scheduled when needed

commit 236e408272bcb9b8e957524864e571b5afdc4623 introduced
a regression where if router without external gateway was already
scheduled to all dvr_snat agents, then when adding external gateway
to the router, snat portion scheduling was skipped.
The patch fixes regression and adds corresponding unit (functional
in fact) test.

Closes-Bug: #1486627
Change-Id: Iad7e53bd57836f257d7110bc054d58029484ab99

9 years agoneutron-db-manage: sync HEADS file with 'current' output
Ihar Hrachyshka [Thu, 20 Aug 2015 09:50:09 +0000 (11:50 +0200)]
neutron-db-manage: sync HEADS file with 'current' output

alembic.get_heads() returns all heads for all branches it can find in
scripts dir, while in alembic_version table, it does not store any heads
that were overridden by other branches, even if those depends_on it
instead of having it as down_revision.

To keep 'current' output in sync with what is in HEADS file, we can
attach liberty_* branches explicitly to kilo revision.

It's also a good idea to have a separate 'heads' command that would show
the latest alembic heads based on scripts dir state. See [1] for more
details.

While at it, since different subprojects can link their expand/contract
branches to kilo in different way (some using depends_on the previous
release branch, while others, as suggested in this patch, thru
down_revision to kilo), we kill the check on the number of heads
returned by script.get_heads() since it may differ. If we want to
validate that we don't branch more than twice from kilo, we may add a
separate validation just for that.

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

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

9 years agoFix _ensure_default_security_group logic
Eugene Nikanorov [Sat, 18 Jul 2015 23:17:43 +0000 (03:17 +0400)]
Fix _ensure_default_security_group logic

In a case when first attempt to fetch default security group
fails and attempt to add it fails too due to a concurrent insertion,
later attempt to fetch the same default sg may fail due to
REPEATABLE READ transaction isolation level.
For this case RetryRequest should be issued to restart the
whole transaction and be able to see default group.

The patch also removes 'while True' logic as it's unsafe

Closes-Bug: #1475938
Change-Id: I20f65d3eae9421429aced1f4586cb6988ab577ff

9 years agoAdd missing tenant_id validation in RESOURCE_ATTRIBUTE_MAP
Yalei Wang [Wed, 19 Aug 2015 16:09:04 +0000 (00:09 +0800)]
Add missing tenant_id validation in RESOURCE_ATTRIBUTE_MAP

This patch will add the validation for tenant_id of 255 bytes string.

Change-Id: Iaa8f78d2b70693d3365a41834d29e0f12ad3dd36
Closes-Bug: #1486314

9 years agoGraceful ovs-agent restart
Eugene Nikanorov [Sun, 10 May 2015 23:10:29 +0000 (03:10 +0400)]
Graceful ovs-agent restart

When agent is restarted it drops all existing flows. This
breaks all networking until the flows are re-created.

This change adds an ability to drop only old flows.
Agent_uuid_stamp is added for agents. This agent_uuid_stamp is set as
cookie for flows and then flows with stale cookies are deleted during
cleanup.

Co-Authored-By: Ann Kamyshnikova<akamyshnikova@mirantis.com>
Closes-bug: #1383674

DocImpact

Change-Id: I95070d8218859d4fff1d572c1792cdf6019dd7ea

9 years agol2pop: check port mac in pre-commit to stop change
Kevin Benton [Wed, 19 Aug 2015 06:35:46 +0000 (23:35 -0700)]
l2pop: check port mac in pre-commit to stop change

Check that a port mac address hasn't changed during the precommit
phase of the port update rather than the post commit so the resulting
exception actually stops it from happening.

Change-Id: I62f120b3c954fa4251a7d676cf2c623e6da5a98b
Closes-Bug: #1486379

9 years agoMerge "Final decomposition of ML2 Cisco UCSM driver"
Jenkins [Thu, 20 Aug 2015 04:42:41 +0000 (04:42 +0000)]
Merge "Final decomposition of ML2 Cisco UCSM driver"

9 years agoMerge "Fix tenant access to qos policies"
Jenkins [Thu, 20 Aug 2015 02:16:57 +0000 (02:16 +0000)]
Merge "Fix tenant access to qos policies"

9 years agoMerge "DVR: fix router rescheduling on agent side"
Jenkins [Thu, 20 Aug 2015 00:03:33 +0000 (00:03 +0000)]
Merge "DVR: fix router rescheduling on agent side"

9 years agoAdd high-level functional/integration DVR tests
Assaf Muller [Tue, 28 Apr 2015 14:47:13 +0000 (10:47 -0400)]
Add high-level functional/integration DVR tests

* A note from the legal team: These tests in no way replace
  any existing tests. I would never dream of such a thing. Nor
  would anyone ever consider calling these 'unit' tests. That
  would be mad!

Change-Id: I73c2b2096e767575a196bf08e7d4cc7ec52fdfa3
Co-Authored-By: Lynn Li <lynn.li@hp.com>
9 years agoMerge "Fix query in get_reservations_for_resources"
Jenkins [Wed, 19 Aug 2015 20:14:48 +0000 (20:14 +0000)]
Merge "Fix query in get_reservations_for_resources"

9 years agoAdd a fullstack fake VM, basic connectivity test
Assaf Muller [Fri, 12 Jun 2015 19:07:17 +0000 (15:07 -0400)]
Add a fullstack fake VM, basic connectivity test

* Full stack tests' fake VMs are represented via a namespace,
  MAC, IP address and default gateway. They're plugged to an OVS
  bridge via an OVS internal port. As opposed to the current
  fake machine class used in functional testing, this new fake
  machine also creates a Neutron port via the API and sets the
  IP and MAC according to it. It also sets additional attributes
  on the OVS port to allow the OVS agent to do its magic.
* The functional fake machine and the full stack fake machine
  should continue to share commonalities.
* The fullstack fake machine currently takes the IP address
  from the port and statically assigns it to the namespace
  device. Later when I'll add support for the DHCP agent
  in full stack testing this assignment will look for the dhcp
  attribute of the subnet and either assign the IP address
  via 'ip' or call a dhcp client.
* Added a basic L2 connectivity test between two such machines
  on the same Neutron network.
* OVSPortFixture now uses OVSInterfaceDriver to plug the port
  instead of replicate a lot of the code. I had to make a
  small change to _setup_arp_spoof_for_port since all OVS ports
  are now created with their external-ids set.

Change-Id: Ib985b7e742f58f1a6eb6fc598df3cbac31046951

9 years agoFinal decomposition of ML2 Cisco UCSM driver
Sandhya Dasu [Mon, 17 Aug 2015 10:26:53 +0000 (06:26 -0400)]
Final decomposition of ML2 Cisco UCSM driver

The ML2 Cisco UCSM driver's entry point is being switched to the
networking-cisco vendor repo. The definition of the driver's db
file and all references to it in the neutron branch are removed.

Change-Id: I75eb165f3bb78d31bece26762ca0ff47cab2b79b
Implements: blueprint: core-vendor-decomposition
Closes-bug: #1484165

9 years agoMerge "Support delegation of bind_port to networking-odl backend driver."
Jenkins [Wed, 19 Aug 2015 15:28:01 +0000 (15:28 +0000)]
Merge "Support delegation of bind_port to networking-odl backend driver."

9 years agoFix query in get_reservations_for_resources
Ann Kamyshnikova [Wed, 19 Aug 2015 11:19:11 +0000 (14:19 +0300)]
Fix query in get_reservations_for_resources

For PostgreSQL if you're using GROUP BY everything in the SELECT
list must be an aggregate SUM(...) or used in the GROUP BY.
For reference:
http://www.postgresql.org/message-id/200402271700.28133.dev@archonet.com
Closes-bug: #1486467

Change-Id: Ieb4ead5c785ff17f580bfbc58f370a491733d96d

9 years agoMove tests for non pluggable ipam backend
Pavel Bondar [Tue, 11 Aug 2015 10:13:28 +0000 (13:13 +0300)]
Move tests for non pluggable ipam backend

Tests specific for non pluggable ipam backend were located in
test_db_base_plugin_v2.
Create appropriate test file and move tests there.
Updated test class name and doc string to match tested class.
Fix contains only tests moving without changes inside tests itself.

Change-Id: Ia40fa3626e073e61e61463c9adab0b6d9a966ca1