Commit Graph

22 Commits

Author SHA1 Message Date
Chandan Kumar 813295f8cf Remove the bundled intree neutron tempest plugin
The plugin has been split into its own repository[1] in accordance with
Queens Goal "Split Tempest Plugins into Separate Repos/Projects[2]".
This patch removes the local copy as well as the setuptools entry point.
We can also now remove the autodoc_tree_excludes pbr option since
there's no more plugin to exclude and it defaults to [setup.py].

The patch leaves still in-tree base classes and constants in order to
avoid breakage of projects depending on such code. In the future, we
will deprecate those and gradually move affected subprojects to the new
repo.

List of affected repositories:
 - neutron-vpnaas
 - openstack-ansible-os_neutron
 - tripleo-quickstart-extras
 - networking-midonet
 - networking-l2gw
 - neutron-dynamic-routing
 - networking-vsphere
 - networking-plumgrid
 - networking-zvm

[1] http://git.openstack.org/cgit/openstack/neutron-tempest-plugin
[2] https://governance.openstack.org/tc/goals/queens/split-tempest-plugins.html

Depends-On: I371aa4d5f043f695df04b98b0f485c8f0548f2b3

Change-Id: Ia21aad29d0bbf779583964db6f1665c9b3b83161
2017-11-22 12:54:33 -08:00
Ihar Hrachyshka 62c5afbd95 Switch to tempest.common.utils.requires_ext
The old (tempest.test.requires_ext) location is deprecated in Pike.

Change-Id: I79a9c3033fb38780808e02f34966280aa9591bc8
2017-09-13 16:31:14 -06:00
Kevin Benton 7f17b4759e API compare-and-swap updates based on revision_number
Allows posting revision number matching in the If-Match header
so updates/deletes will only be satisfied if the current revision
number of the object matches.

DocImpact: The Neutron API now supports conditional updates to resources
           that contain the standard 'revision_number' attribute by
           setting the revision_number in an HTTP If-Match header.
APIImpact

Partial-Bug: #1493714
Partially-Implements: blueprint push-notifications
Change-Id: I7d97d6044378eb59cb2c7bdc788dc6c174783299
2017-06-29 22:50:12 +00:00
Jakub Libosvar 814fbc0501 api-tests: Common way to define required extensions
As some tests require extensions to be enabled on the server, this patch
introduces a new class attribute to the API base class. If any extension
defined in test class is not enabled on the server, then all tests in
the test class will be skipped.

Change-Id: I0629153f973daeb3bef3a6968360cbc2d427f9ad
2017-05-30 15:37:16 +00:00
Brian Haley 52ed8468a4 Fix tempest router migration test when HA enabled, v2
When run in an HA or DVR configured environment,
the test_update_router_extra_attributes_bumps_revision
API test can fail if the release does not support
router migration from CVR-HA to DVR.

Although Ocata and later releases support any type of
router migration, older ones do not, so the test
should be explicit and test a known valid migration.

Added missing l3-ha extension requirement from v1.

Change-Id: Ic48d078542492e933f71d24df85c54c53a0b110c
Related-bug: #1679794
2017-05-05 11:32:07 -04:00
YAMAMOTO Takashi ff48a5eb38 Revert "Fix tempest router migration test when HA enabled"
This reverts commit 2e8e6b8395.

Change-Id: I43d2a58a53071a9ec48785057f8d2655a1c55255
Closes-Bug: #1688548
2017-05-05 13:01:30 +00:00
Brian Haley 2e8e6b8395 Fix tempest router migration test when HA enabled
When run in an HA or DVR configured environment,
the test_update_router_extra_attributes_bumps_revision
API test can fail if the release does not support
router migration from CVR-HA to DVR.

Although Ocata and later releases support any type of
router migration, older ones do not, so the test
should be explicit and test a known valid migration.

Change-Id: I8caf86817a5cd8e4d0cf05d7beef850756e84bab
Related-bug: #1679794
2017-05-02 16:46:36 +00:00
Prateek Arora 0e1fa9c7ee Fix Quota error while running tests
The test methods in the test class create networks and the cleanup
takes place after all tests are run. As such installation specific
default quota (that was e.g. just 10 networks till Pike) may be hit and
tests then fail.

This patch reduces the chance that the quota limit is not hit by
speeding up network resource cleanup (doing it after each test case
completed, not when the whole test class is cleaned up).

Change-Id: I6ba2704c60c77d89e00842e28bece14c64ef98a6
Closes-bug: #1671478
2017-03-27 17:25:34 +00:00
Sławek Kapłoński 04618af085 Switch to use idempotent_id decorator from tempest.lib
Decorator idempotent_id() in tempest.test is deprecated and
tempest.lib.decorators.idempotent_id() should be used instead.
This patch switch all tempest tests to use new decorator.

Change-Id: I2df9c13fbb44b8807da6805761ad30bfd010dc55
2017-02-25 14:24:15 +00:00
Itzik Brown adf97aac9e Adding cleanup of floating ips
Adding floating ips to floating_ips list in test_floating_ips
and test_revisions so they can be cleaned up when
resource_cleanup is called.

Change-Id: I80b50507a69b683dae0e003c5d881f14b8201976
2017-02-14 02:18:39 +02:00
Kevin Benton dbcdc1181a Fix ext alias in revision API test
This test wasn't ever executed because it was using
'external-network' for the external network alias when
the appropirate alias is 'external-net'.

Change-Id: I41b3c282af3f4d64af8404622a88a78f41f71ada
2016-12-28 02:06:10 -08:00
Lujin 3b610a1deb Add missing revises_on_change attribute
This patch adds revises_on_change attribute to the following models
and API tests to ensure the correct behaviour:

ExternalNetwork (Network)
RouterExtraAttributes (Router)
QosPortPolicyBinding (Port)
QosNetworkPolicyBinding (Network)
PortBindingPort (Port)
SegmentHostMapping (Network Segment)

Change-Id: I8bda9fc940e99d18bab2b4229198374f1cabf84b
Closes-Bug: #1642517
2016-11-28 10:04:03 +09:00
Omer Anson 29e15f9278 Have RouterRoute object increment Router revision
When modifying RouterRoute objects on a Router (e.g. adding a route to a
router via the ExtraRoute extension), have the modification update the
Router's revision number.

Change-Id: If9bb56442375efac3043b9de0a03972552ac34bf
Closes-Bug: 1632080
2016-10-13 15:53:19 +03:00
Kevin Benton cd7d63bde9 Refetch subnet/network from DB in ML2 update ops
This ensures that any extensions run in the ML2 extension framework
that bump the revision number of the subnet or network result in the
altered revision number being returned to the API caller and passed
into the ML2 mech drivers and callback handlers.

Closes-Bug: #1627628
Change-Id: Ieb37a3833ee52c671419c6dc981cf91c2366ae94
2016-09-26 13:20:46 +00:00
Kevin Benton 971cf85034 Add missing revision number altercations
This adds revises_on_change for the following models
and API tests to ensure the correct behavior:

* port security (network and port)
* DNS domain (network and port)
* extra dhcp opts (port)
* extra routes (router)
* subnet service type (subnet)

Additionally, it configures the DNS extension to be loaded
in the gate since the extension is enabled for tempest.

Closes-Bug: #1627649
Change-Id: Ifa969c8c2582f8f41d42df07652f259781a36bb5
2016-09-25 02:18:01 -07:00
Kevin Benton cb79d09e24 Fix ML2 revision_number handling in port updates
The revision number is bumped on the flush that changes
the port or a resource that bumps the port. However, in ML2
we create the dict that is used for after_update events,
mech driver calls, and the API response before all resource
modifications are complete so the dict may not reflect
the correct revision number.

This adjusts the update_port_status to flush changes to the
DB before constructing the dictionary response to give the
event listener a chance to bump the revision.

It also adjusts ML2 to update the 'updated_port' dict with
the latest result from make_port_dict after all of the related
objects have been processed to ensure the result has the latest
info from extensions. The API test for allowed address pairs
was adjusted to stop checking for order on update since no order
is stored in the DB.

The API test for revision numbers and ports was updated to
expect the correct behavior.

Closes-Bug: #1625981
Change-Id: I49d2d79a57d484fd98b8969f511895e607b7f128
2016-09-22 17:22:24 -07:00
Jenkins 4c4a55ce6b Merge "Add common way to extend standard attribute models" 2016-09-16 16:35:06 +00:00
Kevin Benton 465d22180e Add common way to extend standard attribute models
This adds a way for standard attribute models to declare
the API resources they show up in. It then adds a utility
function to the standard_attr module to grab a map of all
API resources and their corresponding models.

This can be used by any processing code that wants to add
fields to standard attribute resources.

This also adjusts the existing extensions to leverage this
new functionality.

Partially-Implements: blueprint add-neutron-extension-resource-timestamp
Change-Id: Idc8923d0e983fcb0690f8cb5b55a5aff8690154f
2016-09-15 01:42:24 +00:00
LIU Yulong 3a42143ce9 Correct floating IP extra attributes updating issues
Updating floating IP extra attributes, for instance description,
will unexpectedly disassociate it. This behavior will interrupt the
user's service traffic. And this is because that user can submit an
empty request dict (without port_id parameter) for the floating IP
updating API, and then it will be disassociated by default.
So there is no way to update the floating IP extra attributes without
changing it's association.

This patch will make updating floating IP extra attributes API works
properly.

Closes-Bug: #1607746
Change-Id: I036e473118431856550249359a22445380ef9ece
2016-09-14 23:01:09 +08:00
Kevin Benton 5c6b83675b Change 'revision' to 'revision_number'
The DB model uses 'revision_number' so we should keep the API
consistent with that to avoid the hassle of writing translation
logic as we transition to OVO.

This is an API change, but the revision plugin didn't exist
in the last cycle so we don't need to worry about backward
compatibility or an API impact.

Change-Id: I445974b0e0dabb762807c6f318b1b44f51b3fe15
2016-09-02 17:18:06 -07:00
Nam Nguyen Hoai 5264ab966d Using revision_number to ensure no overlap in *one* network
This patch uses revision_number in database. When creating
a subnet in a network, the revision_number of the network
will be increased. That will prevent overlapping CIDR
(overlapping CIDR means some subnets' cidrs are overlapping)
on *one* network.

Basically, in case of concurrent requests creating subnets
on *one* network, only one request successes, other requests
needs retrying request.

Change-Id: Id6548535075bed87a4b36e1462db546ab9163f29
Closes-Bug: #1532695
2016-08-24 14:27:48 +00:00
Kevin Benton 4e8cc68349 Increment revision numbers on object changes
This adds the logic to increment the revision numbers
for objects whenever there are changes and it exposes
the revision number via a field in the API.

This is handled with a new default service plugin that
subscribes to DB events and bumps revision numbers for
any objects that were modified.

It also handles the logic for bumping the revision number
of a parent in a relationship where the children aren't
top-level neutron objects that would be tracked individually.
This is accomplished with a 'revises_on_change' attribute
on the child models that the service plugin will use to
find the parent and bump its revision.

API tests are included to test the revision numbers
added to each standard attribute enabled object.

Partially-Implements: bp/push-notifications
Change-Id: I476d3e03c8ee763cc4be6d679fe9f501eb3a19b5
2016-07-27 12:01:55 -07:00