summaryrefslogtreecommitdiff
path: root/neutron/tests
Commit message (Collapse)AuthorAgeFilesLines
* Switch to oslo.cacheFang Zhen2016-06-023-79/+165
| | | | | | | | | | Oslo incubator is about to stop for cache module. We could use oslo.cache instead. The legacy memory backend is replaced by oslo_cache.dict. Closes-Bug: #1517883 Change-Id: I108242ca9f27c9ec47959ce7615bc7d84cae014b
* Merge "fullstack: test for IPv6 east-west traffic"Jenkins2016-06-023-24/+55
|\
| * fullstack: test for IPv6 east-west trafficsridhargaddam2016-05-273-24/+55
| | | | | | | | | | | | | | This patch validates east west IPv6 traffic through legacy router. Partial-Bug: #1583028 Change-Id: Id18065340d49dfd389d88cc625f5a80be8da9a50
* | Merge "DVR: Fix check multiprefix when delete ipv4 router interface"Jenkins2016-06-011-0/+54
|\ \
| * | DVR: Fix check multiprefix when delete ipv4 router interfaceHong Hui Xiao2016-05-201-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current code will prevent from deleting router centralized snat port, when there is a ipv6 subnet attatched to DVR. This is correct when deleting a v6 router centralized snat port, because multiple v6 subnets share one router port. But it is not correct when deleteing a v4 router centralized snat port, because v4 subnet doesn't share router port with v6 subnet. Deleteing a v4 router centralized snat port should be allowed no matter if there is v6 subnet attached to DVR. Change-Id: I2d06c8c79f9ff9a9300a94bcbbae13569e4d963e Closes-bug: #1581348
* | | Merge "Pass ha_router_port flag for _snat_router_interfaces ports"Jenkins2016-06-011-2/+47
|\ \ \
| * | | Pass ha_router_port flag for _snat_router_interfaces portsAnn Kamyshnikova2016-06-011-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, router_centralized_snat port can be bound to a host were l3-agent is in standby state (L3 HA + DVR case). As a result VM without floating ip is unable to reach external network. This change passes ha_router_port flag to _ensure_host_set_on_port when called for _snat_router_interfaces ports. Note: this issue is intermittent, without changes in l3_rpc.py unit test does not fail every time. Co-Authored-By: Oleg Bondarev <obondarev@mirantis.com> Closes-bug: #1582739 Change-Id: I74bad578361ed7eac8cc6c740b06b66ab1530cd5
* | | | Merge "Use unittest2 uniformly across Neutron"Jenkins2016-06-014-7/+20
|\ \ \ \
| * | | | Use unittest2 uniformly across NeutronMartin Hickey2016-05-234-7/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unittest2 contains bug fixes to unittest for all versions of Python<3.5. Move unittest references to unittest2. Bumped hacking requirement to reflect the version in openstack/requirements that is the minimal version that supports off_by_default checks. Change-Id: I2d26534230ffe5d01aa0aab6ec902f81cfba774d Depends-On: I883223962426ed8e9cdf4e304dfed17ef0946c8a
* | | | | Merge "Fix get_free_namespace_port to actually avoid used ports"Jenkins2016-06-012-3/+24
|\ \ \ \ \
| * | | | | Fix get_free_namespace_port to actually avoid used portsIWAMOTO Toshihiro2016-06-012-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ss output is a string. It needs to be converted to int before a set operation. The function seems to have been broken from the beginning (commit e3fa0112). Change-Id: I0d10360ae8807b3688d36912b42fa2a140c45e04 Closes-Bug: #1551288
* | | | | | Merge "functional: fix OVSFW failure with native OVSDB api"Jenkins2016-06-013-3/+128
|\ \ \ \ \ \
| * | | | | | functional: fix OVSFW failure with native OVSDB apiInessa Vasilevskaya2016-05-273-3/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A bunch of functional tests fail because of non implemented x != [] operation in idlutils.condition_match() and wrong condition passed to db_find() in OVSFW test. This patch addresses the issue by implementing lists comparison in native.idlutils and fixing the call to db_find() in OVSFW test. A functional test for OVSDB API's db_find() has been added to ensure that querying a list column gives the same result both with vsctl and native ovsdb_interface; unit test for idlutils.condition_match() with corner cases has been added as well. Change-Id: Ia93fb925b8814210975904a453249f15f3646855 Closes-bug: #1578233
* | | | | | | Merge "functional: Run OVSFW tests with ovsdb native interface"Jenkins2016-06-011-15/+18
|\ \ \ \ \ \ \ | |/ / / / / /
| * | | | | | functional: Run OVSFW tests with ovsdb native interfaceJakub Libosvar2016-05-181-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch functional tests for ovs firewall with run with both vsctl and native ovsdb interface. Change-Id: I8339d7a43a449973641922a86836f0231d22bb8f
* | | | | | | Merge "ovsdb: Don't skip ovsdb test cases in py34 suite"Jenkins2016-06-012-15/+2
|\ \ \ \ \ \ \
| * | | | | | | ovsdb: Don't skip ovsdb test cases in py34 suiteJakub Libosvar2016-05-272-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Post-2.5 ovs Python library now supports Python 3 [1] and we require 2.6dev version for py34 job, so we're fine to run ovsdb tests with Python 3. [1] https://github.com/openvswitch/ovs/commit/99c8be3ee47022ce7e02070a5a0a420555c9a720 Change-Id: Id87223eea45d1343a05d8fdcde08f26fe5486a30
* | | | | | | | Merge "objects: support advanced criteria for get_objects"Jenkins2016-06-015-6/+78
|\ \ \ \ \ \ \ \
| * | | | | | | | objects: support advanced criteria for get_objectsIhar Hrachyshka2016-05-315-6/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Those are needed to accommodate to API request needs without handling sorting or pagination in Python. Instead of adding four new arguments to get_objects interface, they are consolidated using a single Pager object that is passed through the _pager argument. The name uses underscore to avoid breaking objects that want to pass 'pager' filter into SQLAlchemy. Hopefully, no objects will ever have '_pager' attribute in their models. Related-Bug: #1541928 Change-Id: I7dafc4dbd80f0ac35dbc2c2f30e56e441f5b1fc0
* | | | | | | | | Merge "Macvtap: Allow noop alias as FW driver"Jenkins2016-06-011-1/+7
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | Macvtap: Allow noop alias as FW driverAndreas Scheuring2016-05-311-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The macvtap agent only works with the NoopFWDriver. If another driver is configured it terminates. Today only the explicit configuration "neutron.agent.firewall.NoopFirewallDriver" is accepted. This patch enables the macvtap agent to also accept the alias "noop" Change-Id: I0d6f0b780a3881419243f12487e8b3d10e709f6c Closes-Bug: #1587498
* | | | | | | | | | Merge "Guard against config_dirs not defined on ConfigOpts"Jenkins2016-06-011-0/+10
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / |/| | | | | | | | |
| * | | | | | | | | Guard against config_dirs not defined on ConfigOptsIhar Hrachyshka2016-05-311-0/+10
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turned out that if the code extracts config_dirs value from ConfigOpts objects before config files are parsed, then oslo.config will raise NoSuchOptError exception. This is not a usual mode of operation for the code, since main() function of the process using it is expected to parse CLI and config files before using it, it may nevertheless happen in some test code. This patch guards against those exceptions, falling back to /etc/neutron, as we already do when --config-dir is not specified. Change-Id: I00cf824baa8580b7aa7ec4518a4741e49c998364 Closes-Bug: #1587359
* | | | | | | | | Merge "DVRHA interfaces should be created in all cases."9.0.0.0b1Jenkins2016-06-011-0/+120
|\ \ \ \ \ \ \ \ \
| * | | | | | | | | DVRHA interfaces should be created in all cases.Adolfo Duarte2016-05-311-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interfaces owned by dvrha routers need to follow the device owner naming convention of dvr routers. Otherwise interfaces will not be created appropriately. Closes-Bug: #1571113 Change-Id: I3a1fbd2d028b7caf0b2b8824c9c1d4e5eb9560f5
* | | | | | | | | | Merge "Use IPv6_LLA_PREFIX from neutron-lib"Jenkins2016-05-311-4/+4
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | |
| * | | | | | | | | Use IPv6_LLA_PREFIX from neutron-libDustin Lundquist2016-05-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace uses of IPV6_LLA_PREFIX from neutron.common.constants with IPv6_LLA_PREFIX from neutron-lib. Remove IPV6_LLA_PREFIX constant as it is no longer used in the code base: http://codesearch.openstack.org/?q=IPV6_LLA_PREFIX TrivialFix Change-Id: Ic81f63670cd51181b349c5c26cc49b2b654860f2
* | | | | | | | | | Merge "Dont use query if network_ids is empty"Jenkins2016-05-301-0/+29
|\ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | Dont use query if network_ids is emptyHong Hui Xiao2016-05-301-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A warning could be found in SQLAlchemy, if handling empty WHERE IN clauses. This is found at neutron.db.segments_db.get_networks_segments To avoid it, just return empty dict in such case. Change-Id: I3cf727dede1d5909aeefbf852332818164ad3777 Closes-bug: #1586816
* | | | | | | | | | | Merge "Remove a SGs API test following sync to Tempest"Jenkins2016-05-301-32/+0
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Remove a SGs API test following sync to TempestAssaf Muller2016-05-131-32/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dependent patch syncs the test from Neutron to Tempest so it can be removed from the Neutron tree. Tests for core resources belong to Tempest as described in the bug report. Change-Id: I1e4d07fb659851755d5ffe7dd6fbae2d9f8a63fc Related-Bug: #1552960 Depends-On: Ic77561757b5bd9ac61b1e059afdba19a98257126
* | | | | | | | | | | | Merge "oslo: remove usage of oslo.log verbose option"Jenkins2016-05-303-11/+0
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | oslo: remove usage of oslo.log verbose optionIhar Hrachyshka2016-05-263-11/+0
| | |_|_|_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The option was deprecated a long time ago, and will be removed in one of the next library releases, which will render neutron broken if we keep using the option. More details: http://lists.openstack.org/pipermail/openstack-dev/2016-May/095166.html Closes-Bug: #1586066 Change-Id: I884b4cc3ed04e4b5489e265c146666e04eb1bc27
* | | | | | | | | | | | Merge "RPC unit tests: remove UUID future warnings"Jenkins2016-05-301-3/+4
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | RPC unit tests: remove UUID future warningsGary Kotton2016-05-291-3/+4
| | |_|_|/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mkae sure that objects make use of a UUID and not a fake one. Change-Id: I6c4c51e8b5d8d5a347e9ccbef40ba04286850a41 Closes-bug: #1586776
* | | | | | | | | | | | Merge "tests: cover port with existing sorting/pagination api tests"Jenkins2016-05-303-16/+51
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | tests: cover port with existing sorting/pagination api testsIhar Hrachyshka2016-05-253-16/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on existing network api tests for the features that were implemented in an extensible way. Existing list_kwargs is decoupled from the base test class because they are network test specific. Also removed generic handling for create_method because each resource has its own signature for creation methods, so it's easier to implement it per resource than trying to come up with a generic solution. Related-Bug: #1566514 Change-Id: I648851b48d0481c97054e1280b60a119b42dfd38
* | | | | | | | | | | | Merge "Use ICMPV6_TYPE_* constants from neutron-lib"Jenkins2016-05-292-16/+8
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Use ICMPV6_TYPE_* constants from neutron-libDustin Lundquist2016-05-282-16/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace ICMPv6 type literal and Neutron constants with ICMPV6_TYPE_* constants from neutron-lib. Move ICMPV6_ALLOWED_TYPES from neutron constants, into agent/firewall.py since it defines the policy of which ICMPv6 types to permit ingress through security groups use by various firewall implementations. In addition, this patch removes the ICMPV6_TYPE_NC constant represent for ICMPv6 Neighbor Solicitation messages, it was introduced for the OVS Firewall, and reference to it was removed in I8f925afa50f36d073f52bd03954939ca14c505d7. Change-Id: I6234d0c63ee5c93900c65df743535b1c0ce00256
* | | | | | | | | | | | Merge "Make deepcopy of update body in API layer"Jenkins2016-05-281-0/+14
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | |
| * | | | | | | | | | | Make deepcopy of update body in API layerKevin Benton2016-05-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adjusts the update handler in the API layer to pass a deepcopy of the original update body to ensure that the original is used on any generated retry requests. Without this update handlers that modified the body as they processed it (e.g. the external gateway update for routers) would be missing data on a retry request. This adds a test case for the bug that was caused by this. Closes-Bug: #1584920 Change-Id: I88fb9d45eb82ef48e0d865decdcc7fad1c5fb361
* | | | | | | | | | | | Merge "ovsdb: Don't let block() wait indefinitely"Jenkins2016-05-282-8/+37
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | / / / / / | | |_|_|_|_|/ / / / / | |/| | | | | | | | |
| * | | | | | | | | | ovsdb: Don't let block() wait indefinitelyJakub Libosvar2016-05-272-8/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Poller.block() calls select() on defined file descriptors. This patch adds timeout to select() so it doesn't get stuck in case no fd is ready. Also timeout was added when reading transaction results from queue. Closes-Bug: 1567668 Change-Id: I7dbddd01409430ce93d8c23f04f02c46fb2a68c4
* | | | | | | | | | | Merge "Allow the service plugin to import the extension"Jenkins2016-05-281-9/+7
|\ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | Allow the service plugin to import the extensionJames Anziano2016-05-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I hit this circular import which made it so that I couldn't import the extension from db.py within the service plugin because the extension imports the plugin. This seems backwards to me. The extension is the interface and should pretty much stand alone shouldn't it? The service plugin is the implementation and should be free to import it at will. This patch fixes the circular import issue. Change-Id: I3b84496bf65578b02b43bbffb227db9bb9879288 Partially-implements: bp/routed-networks
* | | | | | | | | | | | Merge "OVS: compare names when checking devices both added and deleted"Jenkins2016-05-281-0/+37
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | OVS: compare names when checking devices both added and deletedOleg Bondarev2016-05-261-0/+37
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When processing events from ovsdb monitor, agent checks devices for which there are both 'added' and 'deleted' events and then looks for the device in the system to know what event could be omitted. In some cases event dicts for same port would not be equal: for example ofports may differ. Thus we should compare device names rather than dicts. Please see bug for more details. Closes-Bug: #1585623 Change-Id: I93e8796ce4a94327c1e96b19f8183c97546e193d
* | | | | | | | | | | | Merge "Do not inherit test case classes from regular Neutron classes"Jenkins2016-05-272-34/+30
|\ \ \ \ \ \ \ \ \ \ \ \
| * | | | | | | | | | | | Do not inherit test case classes from regular Neutron classesOleg Bondarev2016-05-262-34/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a bad practice itself and it may lead to errors during tests initialization. Please see bug for details. Closes-Bug: #1585149 Change-Id: I6d2bca0cf0120edabfcc185c575ca399baa4d42c
* | | | | | | | | | | | | Merge "Adopt to config_dir option being a list and not a string"Jenkins2016-05-272-0/+60
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|/ / / / / / / / / |/| | | | | | | | | | | |