]> review.fuel-infra Code Review - openstack-build/neutron-build.git/log
openstack-build/neutron-build.git
10 years agoValidate expected parameters in add/remove router interfaces
Edgar Magana [Thu, 5 Jun 2014 23:33:16 +0000 (16:33 -0700)]
Validate expected parameters in add/remove router interfaces

The add and remove router interface methods check that interface_info
is not empty but don't check if it contains any of expected parameters:
port_id and subnet_id
This patch adds a helper method to validate that interface_info contains
at least one of the expected parameters
Include a unit test for the empty port_id and subnet_id case

Closes-Bug: #1325982

Change-Id: Ia370565235a33a847704b972c875d8f1573306c0

10 years agoMerge "extensions: remove 'check_env' method"
Jenkins [Tue, 10 Jun 2014 23:05:34 +0000 (23:05 +0000)]
Merge "extensions: remove 'check_env' method"

10 years agoMerge "Imported Translations from Transifex"
Jenkins [Tue, 10 Jun 2014 23:05:11 +0000 (23:05 +0000)]
Merge "Imported Translations from Transifex"

10 years agoMerge "Use import from six.moves to import the queue module"
Jenkins [Tue, 10 Jun 2014 19:49:37 +0000 (19:49 +0000)]
Merge "Use import from six.moves to import the queue module"

10 years agoMerge "Support Subnets that are configured by external RAs"
Jenkins [Tue, 10 Jun 2014 18:49:01 +0000 (18:49 +0000)]
Merge "Support Subnets that are configured by external RAs"

10 years agoMerge "ofagent: Fix VLAN usage for TYPE_FLAT and TYPE_VLAN"
Jenkins [Tue, 10 Jun 2014 17:51:28 +0000 (17:51 +0000)]
Merge "ofagent: Fix VLAN usage for TYPE_FLAT and TYPE_VLAN"

10 years agoMerge "Fix race condition with firewall deletion"
Jenkins [Tue, 10 Jun 2014 16:31:39 +0000 (16:31 +0000)]
Merge "Fix race condition with firewall deletion"

10 years agoMerge "Improve usage of MagicMocks in ML2 and L3 tests"
Jenkins [Tue, 10 Jun 2014 14:30:45 +0000 (14:30 +0000)]
Merge "Improve usage of MagicMocks in ML2 and L3 tests"

10 years agoMerge "Changed DictModel to dict with attribute access"
Jenkins [Tue, 10 Jun 2014 14:30:36 +0000 (14:30 +0000)]
Merge "Changed DictModel to dict with attribute access"

10 years agoMerge "Refactor code in update_subnet, splitting into individual methods"
Jenkins [Tue, 10 Jun 2014 14:09:05 +0000 (14:09 +0000)]
Merge "Refactor code in update_subnet, splitting into individual methods"

10 years agoMerge "Check the validation of 'delay' and 'timeout'"
Jenkins [Tue, 10 Jun 2014 13:01:08 +0000 (13:01 +0000)]
Merge "Check the validation of 'delay' and 'timeout'"

10 years agoMerge "Ensure routing key is specified in the address for a direct producer"
Jenkins [Tue, 10 Jun 2014 12:03:52 +0000 (12:03 +0000)]
Merge "Ensure routing key is specified in the address for a direct producer"

10 years agoMerge "Monkey patch threading module as early as possible"
Jenkins [Tue, 10 Jun 2014 10:14:43 +0000 (10:14 +0000)]
Merge "Monkey patch threading module as early as possible"

10 years agoMerge "Add local type driver unittests"
Jenkins [Tue, 10 Jun 2014 06:42:33 +0000 (06:42 +0000)]
Merge "Add local type driver unittests"

10 years agoImported Translations from Transifex
OpenStack Proposal Bot [Tue, 10 Jun 2014 06:08:37 +0000 (06:08 +0000)]
Imported Translations from Transifex

Change-Id: Ib6b1eb8816862ba17c40d7fb0a510e1936503ec4

10 years agoFix race condition with firewall deletion
Eugene Nikanorov [Tue, 10 Jun 2014 03:55:40 +0000 (07:55 +0400)]
Fix race condition with firewall deletion

In some cases when firewall is created and then deleted in short
period of time, there could be a race condition of firewall status
changes. Agent may change firewall status from PENDING_DELETE to ACTIVE
because the agent has just set it up on the backend.
Delete request then is not properly served and firewall remains in ERROR
state and can't be deleted at all.

To fix this changing status from PENDING_DELETE is not allowed.
Deleting firewall in ERROR state is allowed.

Change-Id: Iec3cfcb1e03b33dda8e1f10ca51bd9b61fa8030d
Closes-Bug: #1328162

10 years agoextensions: remove 'check_env' method
YAMAMOTO Takashi [Tue, 10 Jun 2014 03:28:44 +0000 (12:28 +0900)]
extensions: remove 'check_env' method

The method is not documented or used.
It was introduced for quota but unused since commit 603e3b78.

Closes-Bug: #1328362
Change-Id: Id0a4d8606f34e54468ed0de26adbf25ff273079e

10 years agoMerge "Default to setting secure mode on the integration bridge"
Jenkins [Tue, 10 Jun 2014 03:39:21 +0000 (03:39 +0000)]
Merge "Default to setting secure mode on the integration bridge"

10 years agoMerge "Make allocation_pools attribute of subnet updateable by PUT"
Jenkins [Tue, 10 Jun 2014 02:27:50 +0000 (02:27 +0000)]
Merge "Make allocation_pools attribute of subnet updateable by PUT"

10 years agoCheck the validation of 'delay' and 'timeout'
shihanzhang [Fri, 16 May 2014 07:26:57 +0000 (15:26 +0800)]
Check the validation of 'delay' and 'timeout'

In health monitor, the 'delay' should be greater or equal than 'timeout'.

Change-Id: I64972881676f2a1269aad8f9cdc77ae957c088d9
Closes-bug: #1320111

10 years agoMerge "Introduced transition RPC exception types"
Jenkins [Tue, 10 Jun 2014 01:39:26 +0000 (01:39 +0000)]
Merge "Introduced transition RPC exception types"

10 years agoMerge "Added RpcProxy class"
Jenkins [Tue, 10 Jun 2014 01:39:08 +0000 (01:39 +0000)]
Merge "Added RpcProxy class"

10 years agoMerge "Imported Translations from Transifex"
Jenkins [Tue, 10 Jun 2014 01:36:57 +0000 (01:36 +0000)]
Merge "Imported Translations from Transifex"

10 years agoEnsure routing key is specified in the address for a direct producer
Russell Bryant [Mon, 9 Jun 2014 20:53:21 +0000 (16:53 -0400)]
Ensure routing key is specified in the address for a direct producer

This change is already merged in oslo-incubator.  Original commit
message body includes:

    Porting this fix from oslo.messaging.  This fixes the impl_qpid.py
    driver to allow it to work with the latest stable upstream QPID broker
    (version 0.28).  See the Apache Qpid Jira bug
    https://issues.apache.org/jira/browse/QPID-5557

Change-Id: If71f78e50f8a9b3acfd1e9d02c8271f17c4ebee7
Related-Bug: #1300318

10 years agoSupport Subnets that are configured by external RAs
Sean M. Collins [Mon, 7 Apr 2014 18:35:58 +0000 (14:35 -0400)]
Support Subnets that are configured by external RAs

The IPv6 attributes for subnets provides support for IPv6 subnets that
are managed by non-OpenStack gateway devices, by creating a subnet that
has the ipv6_ra_mode attribute not set, and the ipv6_address_mode
attribute set to IPV6_SLAAC.

In order to support stateless IPv6, Neutron should calculate an IPv6
address based on the IPv6 prefix and MAC address via EUI-64 specification,
and assign this address to the port.

Implements blueprint ipv6-provider-nets-slaac

DocImpact

Change-Id: Ia76d76a67e0dc9f996a72e38d987a05aecc1b55f
Co-Authored-By: Xu Han Peng <xuhanp@cn.ibm.com>
Co-Authored-By: Dazhao Yu <dzyu@cn.ibm.com>
10 years agoMerge "Add an option to turn off DF for GRE and VXLAN tunnels"
Jenkins [Mon, 9 Jun 2014 17:24:20 +0000 (17:24 +0000)]
Merge "Add an option to turn off DF for GRE and VXLAN tunnels"

10 years agoMerge "Start an unstarted patch in the hyperv unit tests"
Jenkins [Mon, 9 Jun 2014 17:14:40 +0000 (17:14 +0000)]
Merge "Start an unstarted patch in the hyperv unit tests"

10 years agoRefactor code in update_subnet, splitting into individual methods
marios [Fri, 30 May 2014 13:04:18 +0000 (16:04 +0300)]
Refactor code in update_subnet, splitting into individual methods

The update_subnet was already long and complex enough and adding
more code to it was undesirable, after commit

I47a3a71d0d196b76eda46b1d960193fb60417ba9

Hence this refactor splits parts of the update_subnet code into
dedicated sub-methods.

Change-Id: I8f98938da88db287290493dc0daf7c81b8b5f542

10 years agoMake allocation_pools attribute of subnet updateable by PUT
marios [Fri, 13 Dec 2013 16:57:28 +0000 (18:57 +0200)]
Make allocation_pools attribute of subnet updateable by PUT

Bug 1111572 was filed about a failed update (PUT) on
'allocation_pools' of subnet. This is currently not allowed by the
neutron API (hence DocImpact below). Following discussion on the
bug and subsequently, it seems this is a desirable feature.

This review makes the allocation_pools attribute of subnet
updateable by PUT. The semantics are that the entire allocation
pools attribute is replaced by the provided parameter (see
provided tests for details).

Unit tests added that exercise successful update of
allocation_pools with sane params and update using erroneous
allocation_pools that fall outside the subnet cidr.

DocImpact

Closes-Bug: 1111572
Change-Id: I47a3a71d0d196b76eda46b1d960193fb60417ba9
Co-Authored-By: Robert Collins <rbtcollins@hp.com>
10 years agoMerge "Check DB scheme prior to migration to Ml2"
Jenkins [Mon, 9 Jun 2014 15:11:18 +0000 (15:11 +0000)]
Merge "Check DB scheme prior to migration to Ml2"

10 years agoMonkey patch threading module as early as possible
Ihar Hrachyshka [Fri, 30 May 2014 13:53:25 +0000 (15:53 +0200)]
Monkey patch threading module as early as possible

In oslo.messaging, local thread store is used to pass RPC request
context [1]. If we try to import oslo.messaging before monkey patching
threading library, it attempts to access unpatched storage and fails
with AttributeError.

[1]: oslo/messaging/localcontext.py#L26

blueprint oslo-messaging

Change-Id: Ied7302fcb1d3e14428540e39e3db704550027890

10 years agoIntroduced transition RPC exception types
Ihar Hrachyshka [Fri, 30 May 2014 13:26:45 +0000 (15:26 +0200)]
Introduced transition RPC exception types

These exception types will ease transition from oslo-rpc to
oslo.messaging.

blueprint oslo-messaging

Change-Id: I48d214d676e863d7a60d78c49d2fa917d47c07d9

10 years agoAdded RpcProxy class
Ihar Hrachyshka [Fri, 30 May 2014 11:08:40 +0000 (13:08 +0200)]
Added RpcProxy class

This class is intended for easy and iterative migration from
oslo-incubator RPC implementation to oslo.messaging. It will adapt
oslo.messaging API to old oslo-rpc interfaces.

Migrated all affected classes to the new RpcProxy class.

blueprint oslo-messaging

Change-Id: I1563c13b470b61eebc982ee81efee47732943d48

10 years agoofagent: Fix VLAN usage for TYPE_FLAT and TYPE_VLAN
YAMAMOTO Takashi [Wed, 2 Apr 2014 06:41:38 +0000 (15:41 +0900)]
ofagent: Fix VLAN usage for TYPE_FLAT and TYPE_VLAN

while ofagent uses OF1.3, the current coding incorrectly uses
OF1.0 terms in some places.  namely, _local_vlan_for_flat uses
0xffff to mean "no VLAN".  it should use OFPVID_NONE and
pop_vlan/push_vlan appropriately.  the same problem exists for
reclaim_local_vlan.

Closes-Bug: 1301144
Change-Id: I3df821fd72471f8bd84366e3b5a1cc7e3489156c

10 years agoUse import from six.moves to import the queue module
Christian Berendt [Sun, 8 Jun 2014 16:30:43 +0000 (18:30 +0200)]
Use import from six.moves to import the queue module

The name of the synchronized queue class is queue instead of
Queue in Python3.

Change-Id: I5c5aba89b30b311bbfba2b64c61ea566d339b7c9
Closes-Bug: #1327975

10 years agoStart an unstarted patch in the hyperv unit tests
Kevin Benton [Mon, 9 Jun 2014 07:46:30 +0000 (00:46 -0700)]
Start an unstarted patch in the hyperv unit tests

This starts a patch that was setup but never started
for a loopingcall that was allowing an occasional
exception to be thrown from the agent on unrelated patches.

Closes-Bug: #1327974
Change-Id: I6cfdb128c2a78e9c087d79a6db850603f2d03fa8

10 years agoMerge "Freescale SDN Mechanism Driver for ML2 Plugin"
Jenkins [Mon, 9 Jun 2014 07:16:59 +0000 (07:16 +0000)]
Merge "Freescale SDN Mechanism Driver for ML2 Plugin"

10 years agoImported Translations from Transifex
OpenStack Proposal Bot [Mon, 9 Jun 2014 06:09:05 +0000 (06:09 +0000)]
Imported Translations from Transifex

Change-Id: I3c8e6595c12a2dabd15eb811f7d3fd5611427c6c

10 years agoMerge "ovs, ofagent: Remove dead code"
Jenkins [Mon, 9 Jun 2014 04:28:17 +0000 (04:28 +0000)]
Merge "ovs, ofagent: Remove dead code"

10 years agoMerge "Radware LBaaS driver is able to flip to a secondary backend node"
Jenkins [Mon, 9 Jun 2014 02:53:44 +0000 (02:53 +0000)]
Merge "Radware LBaaS driver is able to flip to a secondary backend node"

10 years agoMerge "BSN: Set hash header to empty instead of False"
Jenkins [Mon, 9 Jun 2014 02:20:52 +0000 (02:20 +0000)]
Merge "BSN: Set hash header to empty instead of False"

10 years agoMerge "Improve readability of MagicMock use in RYU test"
Jenkins [Mon, 9 Jun 2014 02:19:31 +0000 (02:19 +0000)]
Merge "Improve readability of MagicMock use in RYU test"

10 years agoMerge "Log firewall status on delete in case of status inconsistency"
Jenkins [Mon, 9 Jun 2014 01:48:43 +0000 (01:48 +0000)]
Merge "Log firewall status on delete in case of status inconsistency"

10 years agoMerge "Improve iptables_manager _modify_rules() method"
Jenkins [Sun, 8 Jun 2014 21:43:08 +0000 (21:43 +0000)]
Merge "Improve iptables_manager _modify_rules() method"

10 years agoAdd an option to turn off DF for GRE and VXLAN tunnels
Pierre Rognant [Wed, 28 May 2014 18:18:45 +0000 (14:18 -0400)]
Add an option to turn off DF for GRE and VXLAN tunnels

Modifications included allow to set a new option (dont_fragment) in
the ovs agent configuration file that can be used for (un-)setting the DF
bit on GRE or VXLAN tunnels. The default behaviour is not altered (DF on).

Change-Id: I17ecb00165990b72ab121c2688097139b3f2f157
Implements: blueprint neutron-ovs-agent-df-gre-vxlan

10 years agoMerge "Allow L3 base to handle extensions on router creation"
Jenkins [Sun, 8 Jun 2014 16:32:26 +0000 (16:32 +0000)]
Merge "Allow L3 base to handle extensions on router creation"

10 years agoMerge "Refactor some router-related methods"
Jenkins [Sun, 8 Jun 2014 16:32:22 +0000 (16:32 +0000)]
Merge "Refactor some router-related methods"

10 years agoMerge "NSX: fix tenant_id passed as security_profile_id"
Jenkins [Sun, 8 Jun 2014 15:15:57 +0000 (15:15 +0000)]
Merge "NSX: fix tenant_id passed as security_profile_id"

10 years agoMerge "NSX: bump http_timeout to 30 seconds"
Jenkins [Sun, 8 Jun 2014 15:10:47 +0000 (15:10 +0000)]
Merge "NSX: bump http_timeout to 30 seconds"

10 years agoMerge "add engine parameter for offline migrations"
Jenkins [Sun, 8 Jun 2014 04:37:35 +0000 (04:37 +0000)]
Merge "add engine parameter for offline migrations"

10 years agoMerge "Big Switch: fix capabilities retrieval code"
Jenkins [Sun, 8 Jun 2014 03:46:00 +0000 (03:46 +0000)]
Merge "Big Switch: fix capabilities retrieval code"

10 years agoMerge "Add NVP advanced service check before deleting a router"
Jenkins [Sun, 8 Jun 2014 01:46:10 +0000 (01:46 +0000)]
Merge "Add NVP advanced service check before deleting a router"

10 years agoMerge "NSX: Fix request_id in api_client to increment"
Jenkins [Sun, 8 Jun 2014 01:46:02 +0000 (01:46 +0000)]
Merge "NSX: Fix request_id in api_client to increment"

10 years agoMerge "Add flat type driver unittests"
Jenkins [Sat, 7 Jun 2014 14:20:56 +0000 (14:20 +0000)]
Merge "Add flat type driver unittests"

10 years agoMerge "remove token from notifier middleware"
Jenkins [Sat, 7 Jun 2014 14:20:47 +0000 (14:20 +0000)]
Merge "remove token from notifier middleware"

10 years agoMerge "Improve module-level mocks in midonet tests"
Jenkins [Sat, 7 Jun 2014 14:20:37 +0000 (14:20 +0000)]
Merge "Improve module-level mocks in midonet tests"

10 years agoFreescale SDN Mechanism Driver for ML2 Plugin
trinaths [Fri, 6 Jun 2014 10:12:25 +0000 (15:42 +0530)]
Freescale SDN Mechanism Driver for ML2 Plugin

- Mechanism driver specific unit testing.

Implements: blueprint fsl-sdn-os-mech-driver

Change-Id: If37a39119c620c6d204346a7fe66c70aaad7261e

10 years agoMerge "Pass object to policy when finding fields to strip"
Jenkins [Fri, 6 Jun 2014 22:41:32 +0000 (22:41 +0000)]
Merge "Pass object to policy when finding fields to strip"

10 years agoMerge "Neutron does not follow the RFC 3442 spec for DHCP"
Jenkins [Fri, 6 Jun 2014 20:18:22 +0000 (20:18 +0000)]
Merge "Neutron does not follow the RFC 3442 spec for DHCP"

10 years agoMerge "Allow neutron-sanity-check to check OVS patch port support"
Jenkins [Fri, 6 Jun 2014 17:01:10 +0000 (17:01 +0000)]
Merge "Allow neutron-sanity-check to check OVS patch port support"

10 years agoMerge "Remove run-time version checking for openvswitch features"
Jenkins [Fri, 6 Jun 2014 17:01:00 +0000 (17:01 +0000)]
Merge "Remove run-time version checking for openvswitch features"

10 years agoMerge "Record and log reason for dhcp agent resync"
Jenkins [Fri, 6 Jun 2014 08:45:22 +0000 (08:45 +0000)]
Merge "Record and log reason for dhcp agent resync"

10 years agoMerge "NSX: fix invalid docstring"
Jenkins [Thu, 5 Jun 2014 19:11:47 +0000 (19:11 +0000)]
Merge "NSX: fix invalid docstring"

10 years agoovs, ofagent: Remove dead code
YAMAMOTO Takashi [Thu, 5 Jun 2014 07:03:28 +0000 (16:03 +0900)]
ovs, ofagent: Remove dead code

Remove "class Port", which seems like a leftover from
the old days when agents had direct database accesses.

Change-Id: Ibc0bf5ab48f08ad620f87eb4952c7ff0f4701fda
Closes-Bug: #1326666

10 years agoDefault to setting secure mode on the integration bridge
Kyle Mestery [Fri, 30 May 2014 08:48:37 +0000 (08:48 +0000)]
Default to setting secure mode on the integration bridge

Set the fail-mode on the integration bridge to be secure. This means if the agent
is stopped or crashes, and OVS is also restarted, OVS will not program a default
NORMAL action. As soon as the agent is restarted, it will correctly program the
integration bridge.

Change-Id: Icf7e3e14ee747c8ce92c14c95a0a1bbf35986252
Closes-Bug: #1324703

10 years agoMerge "ofagent: Add a missing push_vlan action"
Jenkins [Wed, 4 Jun 2014 20:00:08 +0000 (20:00 +0000)]
Merge "ofagent: Add a missing push_vlan action"

10 years agoMerge "Add 'secret' property for 'connection' option"
Jenkins [Wed, 4 Jun 2014 17:27:36 +0000 (17:27 +0000)]
Merge "Add 'secret' property for 'connection' option"

10 years agoAllow neutron-sanity-check to check OVS patch port support
Cedric Brandily [Wed, 4 Jun 2014 11:44:18 +0000 (13:44 +0200)]
Allow neutron-sanity-check to check OVS patch port support

This patch allows to check OVS patch port support using:

  neutron-sanity-check --ovs_patch

or pass in the deployed configuration files with a non-empty
AGENT/tunnel_types (indeed patch ports are used to interconnect
br-int and br-tun):

  neutron-sanity-check --config-file ml2.conf.ini

DocImpact
Related-Bug: #1285335
Change-Id: Ic7bfabd1f4b85bfa490dd06c70eb5682ee42a681

10 years agoRemove run-time version checking for openvswitch features
Terry Wilson [Thu, 17 Apr 2014 01:48:04 +0000 (21:48 -0400)]
Remove run-time version checking for openvswitch features

The current method of checking openvswitch and kernel versions for
specific feature support is brittle, distro-specific and unsupportable.

This patch removes the runtime version checks and implements a test
script which allows testing specific neutron features or can test
that all features required by a specific configuration are available.

For example, to test VXLAN support in openvswitch, either:

  neutron-sanity-check --ovs_vxlan

or pass in the deployed configuration files with AGENT/tunnel_types
containing 'vxlan', like:

  neutron-sanity-check --config-file /etc/neutron/plugins/ml2.conf.ini

Deployment tools can then test that the required features exist without
relying on version numbers and without incurring a penalty every time
the agent is started.

Implements: blueprint remove-openvswitch-version-check
DocImpact
Change-Id: I5e822d97b9bece9242ba5ac8901aa0ca4f090cfe

10 years agoAdd flat type driver unittests
Cedric Brandily [Mon, 2 Jun 2014 10:06:59 +0000 (12:06 +0200)]
Add flat type driver unittests

Partial-Bug: #1269127

Change-Id: Ib56c5823ddb927d8269cfcdaa8df8b0f78dc5a6e

10 years agoChanged DictModel to dict with attribute access
Yves-Gwenael Bourhis [Thu, 2 Jan 2014 14:19:17 +0000 (15:19 +0100)]
Changed DictModel to dict with attribute access

DictModel is a dict where keys are accessible via attribute access.
The old version was an object with attributes created from dict keys and many
attributes where accessible only via getattr because they did not have a valid
python attribute naming (i.e.: 'provider:network_type' is not a valid
python variable/attribute name)::

    >>> d.provider:network_type
      File "<stdin>", line 1
        d.provider:network_type
              ^
    SyntaxError: invalid syntax

This time we just subclass dict with attribute access to keys.

So dict keys are accessible via attribute access but remain accessible via key
access::

    >>> d = DictModel({'foo': 'bar', 'provider:network_type': 'something'})
    >>> d.foo == d['foo']
    ... True
    >>> getattr(d, 'provider:network_type') == d.get('provider:network_type')
    ... True
    >>> getattr(d, 'provider:network_type') == d['provider:network_type']
    ... True

One of the big advantages when debugging is that now in pdb, pp(d) (where d is
a DictModel instance) shows a nice dictionary structure, while with the old
version whe had to perform a "dir(d)" and introspect each attribute...

Change-Id: I05fad7cd9763f97f61680d45e1b6592a80049541
Closes-Bug: 1251653

10 years agoPass object to policy when finding fields to strip
Salvatore Orlando [Mon, 2 Jun 2014 10:14:02 +0000 (03:14 -0700)]
Pass object to policy when finding fields to strip

During the evaluation of fields to strip in responses to list
operations, pass also the first object in the list to the
policy engine.
This will avoid errors in policy evaluation if during
an upgrade from icehouse policy.json was not updated to remove
attribute-level policies dependent on resource values.

Closes-Bug: #1323715

Change-Id: Iaa6ed3bbf4a07ce0b614a4197cabdfa1cb36d427

10 years agoAllow L3 base to handle extensions on router creation
armando-migliaccio [Mon, 2 Jun 2014 14:31:33 +0000 (07:31 -0700)]
Allow L3 base to handle extensions on router creation

By changing the boolean flag, API extensions made to
the router model can be handled correctly: this means
that on router creation, the response body will
contain all the extension attributes being part of
the resource. Prior to this fix, it was only on GETs
or PUTs, leaving the user at loss as to whether
the flag was actually being processed.

Closes-bug: #1325608
Supports-blueprint: neutron-ovs-dvr

Change-Id: I6f913c8417676a789177e00f30eb5875e7aaa3ae

10 years agoRefactor some router-related methods
armando-migliaccio [Fri, 30 May 2014 21:58:30 +0000 (14:58 -0700)]
Refactor some router-related methods

This is done in preparation for the distributed
router functionality. Breaking down and factoring
out some functionality helps the DVR work to come
as a more loosely coupled addition to the L3
centralized case. This also ensures that the two
code bases are kept separately to minimize chance
of regression, and simplify code coverage effort.

Partially-implements: blueprint neutron-ovs-dvr

Change-Id: Ide1bc193666ce03a3ae26b1869bde8093ed453ef

10 years agoAdd local type driver unittests
Cedric Brandily [Mon, 2 Jun 2014 10:07:15 +0000 (12:07 +0200)]
Add local type driver unittests

Partial-Bug: #1269127

Change-Id: I5b34dc09128bcb879ea46be64cc5104eeefd4ab4

10 years agoadd engine parameter for offline migrations
Jakub Libosvar [Tue, 8 Apr 2014 10:41:11 +0000 (12:41 +0200)]
add engine parameter for offline migrations

Offline migration required config file containing connection string.
In that case only engine from URL was used. With this patch engine can be
passed from command line (or config file) along with plugins which sql
script will be generated accordingly.

DocImpact

Change-Id: Ib667a71960b833fd981f97fe7d6b1856084ef5c8
Closes-Bug: #1304326

10 years agoCheck DB scheme prior to migration to Ml2
Jakub Libosvar [Wed, 28 May 2014 16:39:47 +0000 (18:39 +0200)]
Check DB scheme prior to migration to Ml2

When using migration tool from LB/OVS plugin to Ml2, there is no
guarantee current scheme is supported by migration tool. This patch
checks version stored in DB by alembic and compares whether version
is supported.

Closes-bug: #1307720

Change-Id: I4519a0e5a0f3027675958a68d1f9e0440b177229

10 years agoImprove module-level mocks in midonet tests
Kevin Benton [Fri, 30 May 2014 04:08:24 +0000 (21:08 -0700)]
Improve module-level mocks in midonet tests

Remove unnecessary module-level mocks and replace
them with test-specific mocks so they don't persist
through the entire test suite.

Partial-Bug: #1316401
Change-Id: I49039749bb700ec0a88639f4772701ba3b920352

10 years agoBig Switch: fix capabilities retrieval code
Kevin Benton [Tue, 3 Jun 2014 04:39:51 +0000 (21:39 -0700)]
Big Switch: fix capabilities retrieval code

References the raw REST response in the capabilities
parsing code so json.loads doesn't get an object
that may already be decoded and fail.

Closes-Bug: #1326173
Change-Id: Ia3179b7499f35a6ab2e9ce1631ab15ed27d64647

10 years agoMerge "LBaaS add missing rootwrap filter for route"
Jenkins [Mon, 2 Jun 2014 22:51:47 +0000 (22:51 +0000)]
Merge "LBaaS add missing rootwrap filter for route"

10 years agoImprove iptables_manager _modify_rules() method
Sudhakar [Mon, 3 Mar 2014 10:05:20 +0000 (15:35 +0530)]
Improve iptables_manager _modify_rules() method

As the number of ports per default security group increases, the
number of iptables entries on the Compute Node grows.  Because of
this, there is a gradual increase in the time taken to apply chains
and rules.

Currently we are using list comprehensions to find if a new chain or
rule matches an existing one.  Instead, walk through the list in
reverse to find a matching entry.

Added a new method, _find_last_entry(), to return the entry we are
searching for.

Change-Id: I3585479ffa00be556b8b21dc9dbd6b36ad37f4de
Closes-Bug: #1302272
Related-Bug: #1253993

10 years agoNSX: bump http_timeout to 30 seconds
Aaron Rosen [Fri, 30 May 2014 18:59:36 +0000 (11:59 -0700)]
NSX: bump http_timeout to 30 seconds

We've seen that sometimes NSX takes longer then 10 seconds to return
in production setups under high bursts. Setting this value to 30 seconds
seems more appropriate and solves the issue at load.

Suggestion by: Jacob Cherkas

Change-Id: If604d5d52d15cc1165e19d20b38774dfecec275f
Closes-bug: 1325055

10 years agoLog firewall status on delete in case of status inconsistency
Eugene Nikanorov [Mon, 2 Jun 2014 10:26:09 +0000 (14:26 +0400)]
Log firewall status on delete in case of status inconsistency

This should help to troubleshoot related gate failres.

Change-Id: I92d4d886cafed5faeb2a6d0b224f4b5dc8522100
Related-Bug: #1314313

10 years agoBSN: Set hash header to empty instead of False
Kevin Benton [Mon, 2 Jun 2014 05:43:02 +0000 (22:43 -0700)]
BSN: Set hash header to empty instead of False

Sets the consistency hash header to empty instead
of False since 'False' is handled like a string on
the backend and requires special-casing to detect.

Closes-Bug: #1325771
Change-Id: Iee1651574c01a32e78167a9bbed4e0433abbdec2

10 years agoMerge "Remove function replacement with mock patch"
Jenkins [Mon, 2 Jun 2014 01:45:44 +0000 (01:45 +0000)]
Merge "Remove function replacement with mock patch"

10 years agoMerge "Remove unnecessary MagicMocks in cisco unit tests"
Jenkins [Sun, 1 Jun 2014 22:24:42 +0000 (22:24 +0000)]
Merge "Remove unnecessary MagicMocks in cisco unit tests"

10 years agoMerge "NSX: replace strong references to the plugin with weakref ones"
Jenkins [Sun, 1 Jun 2014 21:54:02 +0000 (21:54 +0000)]
Merge "NSX: replace strong references to the plugin with weakref ones"

10 years agoNeutron does not follow the RFC 3442 spec for DHCP
Christoph Arnold [Thu, 29 May 2014 14:17:30 +0000 (16:17 +0200)]
Neutron does not follow the RFC 3442 spec for DHCP

When setting a gateway and additional host routes in neutron subnet, the
gateway is only sent to clients via the router dhcp option, dhcp clients
conforming to rfc3442 will ignore router option if
classless-static-routes are available. This patch ensures setting both
the router option and the classless-static-routes including the gateway

Change-Id: Ia00b9385025020f848872309ae42ddac08528f53
Closes-Bug: #1317935

10 years agoLBaaS add missing rootwrap filter for route
Aaron Rosen [Sun, 1 Jun 2014 18:37:05 +0000 (11:37 -0700)]
LBaaS add missing rootwrap filter for route

If one runs the lbaas agent from packages and does not have the l3-agent
installed on the same box as the lbaas agent it will fail to add the
default gw route. This is because it's missing the rootwrap filter for
route which is only present in l3.filters.

Change-Id: I59cd0a549a1f1d1564d139d42daf55d02898bf76
Closes-bug: 1325406

10 years agoRadware LBaaS driver is able to flip to a secondary backend node
Avishay Balderman [Thu, 29 May 2014 11:22:21 +0000 (14:22 +0300)]
Radware LBaaS driver is able to flip to a secondary backend node

Change-Id: Ifbfef493d5339f61dcf58dddcc8e3830aaf06bf1
Closes-Bug: #1324131

10 years agoNSX: fix invalid docstring
Gary Kotton [Sat, 31 May 2014 06:54:58 +0000 (23:54 -0700)]
NSX: fix invalid docstring

Updated the text of docstring.

Change-Id: Ic82fe4719c8b04d01cfb5ebb69411f2f35e7f646

10 years agoMerge "Make linux.utils.execute log error on return codes"
Jenkins [Fri, 30 May 2014 23:31:12 +0000 (23:31 +0000)]
Merge "Make linux.utils.execute log error on return codes"

10 years agoNSX: fix tenant_id passed as security_profile_id
Aaron Rosen [Fri, 30 May 2014 22:24:06 +0000 (15:24 -0700)]
NSX: fix tenant_id passed as security_profile_id

Previously we were passing the tenant_id as the security_profile_id
to NSX so these ids would be switched around in the system backend.
This does not affect any operations as this is just extra metadata
in nsx to help an operator debug.

Change-Id: I1afdcc3621fef8fdd7d4eb3c57bff749a71d0d33
Closes-bug: 1325118

10 years agoNSX: Fix request_id in api_client to increment
Aaron Rosen [Fri, 30 May 2014 22:11:27 +0000 (15:11 -0700)]
NSX: Fix request_id in api_client to increment

Previously, the NSX request_id in the api_client would always be
0 because the current request id was stored in the class which is
always initialized on each request. This patch fixes that by storing
the request_id as a class variable.

Change-Id: I9ff4d3eb09899fe6d14b462dddf9daddbf77873b
Closes-bug: 1325100

10 years agoMerge "Handle errors from run_ofctl() when dumping flows"
Jenkins [Fri, 30 May 2014 18:42:46 +0000 (18:42 +0000)]
Merge "Handle errors from run_ofctl() when dumping flows"

10 years agoMerge "Sync periodic_task from oslo-incubator"
Jenkins [Fri, 30 May 2014 16:22:50 +0000 (16:22 +0000)]
Merge "Sync periodic_task from oslo-incubator"

10 years agoImprove usage of MagicMocks in ML2 and L3 tests
Kevin Benton [Tue, 6 May 2014 04:19:08 +0000 (04:19 +0000)]
Improve usage of MagicMocks in ML2 and L3 tests

Removes usage of a MagicMock in a case where it's not needed.
Replaces a manual function replacement with a mock.patch call
so it's correctly cleaned up by mock.patch.stopall.

Partial-Bug: #1316401
Change-Id: I8f2f7e9eca2aeaa3b65be1b451e96ed2146950f4

10 years agoImprove readability of MagicMock use in RYU test
Kevin Benton [Fri, 30 May 2014 04:15:22 +0000 (21:15 -0700)]
Improve readability of MagicMock use in RYU test

Replaces an unnecessarily complex setup of a magicmock
in an RYU test module.

Change-Id: If2e99ff76114d896a6480a884a531f901198caa5

10 years agoRemove function replacement with mock patch
Kevin Benton [Fri, 30 May 2014 03:59:00 +0000 (20:59 -0700)]
Remove function replacement with mock patch

In the hyperv unit tests, an rpc method is
manually replaced with a MagicMock using setattr.
This prevents it from being cleaned up by mock.patch.stopall.
This patch replaces it with a short-lived patch call
in a with statement.

Change-Id: I7b10a8115c474977e3acd16dc49d6f3ae67b0c3b
Partial-Bug: #1316401

10 years agoRemove unnecessary MagicMocks in cisco unit tests
Kevin Benton [Fri, 30 May 2014 03:49:48 +0000 (20:49 -0700)]
Remove unnecessary MagicMocks in cisco unit tests

Two patches that just return static data never have
assertions made on the MagicMocks generated. This
replaces the magicmocks with lambdas to make the code
easier to read and to get a minor performance gain.

Change-Id: I064c57a66a0f7a8e3080f39cf48bd4b67cf304e3
Partial-Bug: #1316401