Commit Graph

17 Commits (db972238418f87a77b8fdf9f0b32d88b54347f0b)

Author SHA1 Message Date
Dongcan Ye 7eeec2a0c9 Add l3_agent_mode configuration in tempest
Add dvr_snat agent mode, this will works for
all types of routers.

Change-Id: I029504d53d4a6e4178c0384be9f21408f333ce20
Closes-Bug: #1731857
2018-03-12 16:41:00 +00:00
Dongcan Ye e774b88428 Tempest: Add availability-zone for agent
Change-Id: I586420488cc2db43e849132c0d2465185e4b32d0
Partial-Bug: #1684069
2017-11-14 15:59:50 +08:00
Genadi Chereshnya 314277286d [Tempest] Running Trunk test with advanced image only
1)Adding 'image_is_advanced' option to tempest config, so you can
run specific tests with images that are not cirros.
2)Adding decorator to run 'subport_connectivity' test with such
image for VLAN aware VM feature.
3)Configuring gate to run trunk test with ubuntu image only
4) Updating release notes and TESTING.rst with the change

Change-Id: Ie15b0e79c6ea320322b2815fb8afbc8ec95f853a
2017-07-25 10:21:58 -07:00
Armando Migliaccio 4a6d06550b Inherit segmentation details for trunk subports if requested
This patch introduces support for requests where the user does
not know the segmentation details of a subport and by specifying
segmentation_type=inherit will let the trunk plugin infer these
details from the network to which the subport is connected to, thus
ignoring the segmentation_id in case it were to be specified.

This type of request is currently expected to have correct results
when the network segmentation type is 'vlan', and the network has
only one segment (provider-net extension use case).

DocImpact: Extend trunk documentation to include Ironic use case.

Closes-bug: #1648129

Depends-on: Ib510aade1716e6ca92940b85245eda7d0c84a070
Change-Id: I3be2638fddf3a9723dd852a3f9ea9f64eb1d0dd6
2017-04-03 21:22:38 -07:00
Hynek Mlnarik edf3f23727 API tests: Check MTU sanity of trunk/subport
The MTU of VLAN subinterfaces must not be greater than
MTU of the trunk port. This commit adds API tests that
check that API follows theses guidelines

Change-Id: Ib40c4d44a97b6c9183d48e79383d88dbf2c952db
Partially-Implements: blueprint vlan-aware-vms
2016-09-22 15:56:52 +02:00
Ihar Hrachyshka 5e0878f476 Added API extensions to detect sorting/pagination features
Those features are available only when allow_sorting and
allow_pagination options are enabled (the current default is False).

They don't depend on plugin support, because when plugins don't
implement them natively, emulated mode is applied by API router itself.
So to make it plugin agnostic, we introduce a way to register custom
per-extension checks to override support detection for cases like that

Now that we have a way to detect support for those features via API,
there is little reason to keep tempest configuration options to enable
those features. Instead, just inspect [network-feature-enabled]
api_extensions option in tempest.conf.

used in a single place only (in allow_sorting/allow_pagination
definitions), removed them and replaced with a literal.

Added first in-tree API tests for /extensions entry point.

DocImpact Update API documentation to cover new extensions.
APIImpact Document the new extensions.
Related-Bug: #1566514
Change-Id: I0aaaa037a8ad52060a68dd75c0a1accc6add238e
2016-08-01 22:57:15 +02:00
Ihar Hrachyshka 0cf4ddc6ee tests: validate sorting and pagination for networks
These are the very first API tests in the tree to cover those features.
The test is implemented in a generic way that will hopefully ease its
adoption for other resources.

Sadly, those tests cannot pass on every neutron cloud, at least until we
enable those API features by default and remove options to disable the

There is no way to determine, via neutron API, whether cloud supports
those features. To work around that, we introduce two new tempest
options that determine whether tests that rely on sorting or pagination
should be executed. Those options are set in post-extra phase because
configure_tempest resets any configuration made during post-config.

Also bump resource quotas x10 times since default quotas are now not
enough, at least for network resource that is now under sorting and
pagination testing.

Related-Bug: #1566514
Change-Id: I5e68f471a641a34100aba31cb2c4a815c7220014
2016-05-24 09:17:25 +00:00
Assaf Muller 2397fd0d5c Fix broken Tempest conf options in API tests
Tempest commit ed6e586b9f8f0ada10af7711f297afa01b2b7754
changed configuration options defined in Tempest from
tenant to project. Currently we use Tempest from PyPI,
and since there hasn't yet been a Tempest release with
the change that breaks us, we're still safe, however the
next release will break us, so let's be ready for it.

Long term I think the correct thing to do would be to
define new options used exclusively in the Neutron tree.

Change-Id: I054b94a43d900e42872a9cb28d33a3ed45e14779
2016-04-12 16:47:21 -04:00
Assaf Muller a2fe5fd2e0 Delete Tempest fork, import from tempest and tempest_lib
A while ago we copied Tempest networking API tests in to the
Neutron repo, and along came thousands of lines of code of Tempest
testing infrastructure (neutron.tests.tempest). For a while we
periodically refreshed our fork via:

I think it's time we move away from that model by eliminating
the fork. We do this by deleting unused code and importing the
rest from tempest_lib. There's some Tempest code still not
moved from Tempest to tempest_lib in tempest.common. I think
it's preferable to import that code than to copy it, and Tempest
cores mostly agree. Manila and Ironic also do the same.
To be able to import from tempest I added it as a requirement:
Since Tempest is not on PyPi, I had to get it from git. Only the api
tests environment needs Tempest, so instead of adding it to
test-requirements, I added it specifically to the api and
api-constraints venvs.

neutron.tests.tempest.test and neutron.tests.tempest.common.*
still remain. These are tighly coupled with one another, and
sadly since Neutron forked Tempest code, Tempest has made significant
changes to those files that also require changes to the test files.
I aim to get rid of the Neutron fork of these files in a follow up

Also fixed import grouping in test files so that it's std libs,
3rd party libs, and then Neutron code.

* Removed neutron.tests.tempest.config:
  - We only added one option after the fork. I created a new group
    called 'neutron_plugin_options' and moved the new option to that
    group. This is in preperation for the Tempest plugin architecture,
    where you're supposed to add new config options to a new group
    and not to existing configuration groups. Note that this is
    obviously a backward incompatible change, but it's to an option
    added in the same cycle.
* Removed neutron.tests.tempest.test and neutron.tests.tempest.common.
  - This introduced an API change to the way we access Keystone,
    which required mechanical changes to a few tests (create_tenant
    calls need a different client now).
  - The way Tempest manages primary, admin and alternative tenant
    credentials was changed after we forked, which required another
    mechanical change to a few tests.
* Cut all of the Keystone clients we don't need. We only need
  to create/delete tenants, the other clients were used in Tempest by
  actual Keystone tests.
* Changed neutron.tests.api.base.BaseNetworkTest:
  - Re-implemented get_client_manager so that it returns the Neutron
    clients manager and not the one in the Tempest repo.
  - Updated it from the Tempest repo so that it uses the new way
    to manage credentials (Since it now uses the Tempest test base
    class and not our out of date forked copy).

Change-Id: I4f9193dfe26f2d36985cb480a98709ec182a2f7b
2016-01-29 11:31:27 -05:00
Jenkins bf11ed7430 Merge "Introduce an API test for specified floating ip address" 2016-01-06 20:45:05 +00:00
Assaf Muller 218b5d06f5 Fix API tests
broke the Neutron API job by unsetting Tempest configuration
values that were unused by Tempest, but used by Neutron's fork
of Tempest. This patch copies credentials from the 'auth' section
to the 'identity' section.

The longer term plan is detailed here:
TL;DR: Removed overlap of tests between the Tempest and Neutron
repos, then use Tempest's plugin architecture for the tests that
will remain in the Neutron repo.

Change-Id: Ieb396cfd17f9cb66776ead11e7f760c1c26a0b08
2016-01-05 10:41:44 +00:00
Gary Kotton 64e25d0299 Remove default=None for configuration bindings
The default value for a configuration variable is None. There is
no need to specifically set these as None.

The line where this is done is:


Change-Id: Iedf29b13d69ea9f2eb4d5aa746d7c1da8d83bafc
2015-11-05 10:29:02 +00:00
Yuuichi Fujioka 29e4bb0fbe Introduce an API test for specified floating ip address
The test case checks whether admin can set floating IP address when
creates a floating IP.
Implements: blueprint allow-specific-floating-ip-address[1]


Change-Id: I036da37402b826c1a73698e0ae21894a3ce676ab
2015-10-21 23:34:08 +00:00
Sergey Vilgelm 5ff3439df5 Use oslo.log library instead of system logging module
The constants of log levels were added in the 1.8 version of
the oslo.log library. So we can replace all usage of system
logging module with log module from oslo.log.

Change-Id: I2992df0bec6337aefa8a75d4853b132bd134fa42
Closes-Bug: 1481370
2015-08-10 15:52:26 +03:00
Maru Newby bfdece1ee0 Update api tests from tempest
This change is the result of running tools/

Change-Id: Ibcb6d11b3f7ed8b859c69d4c591bf785b0611416
2015-03-13 18:46:40 +00:00
Ihar Hrachyshka 22328baf1f Migrate to oslo.log
It's mostly a matter of changing imports to a new location.

Non-obvious changes needed:
* pass overwrite= argument to oslo_context since oslo.log reads context
  from its thread local store and not from incubator
* don't store context at now that there is no code that
  would consume it
* LOG.deprecated() -> versionutils.report_deprecated_feature()
* dropped LOG.audit check from hacking rule since now the method does
  not exist
* WritableLogger is now located in oslo_log.loggers

Dropped log module from the tree. Also dropped local module that is now
of no use (and obsolete, as per oslo team).

Added versionutils back to openstack-common.conf since now we use the
module directly from neutron code and not just as a dependency of some
other oslo-incubator module.

Note: tempest tests are expected to be broken now, so instead of fixing
all the oslo.log related issues for the subtree in this patch, I only
added TODOs with directions for later fix.

Closes-Bug: #1425013
Change-Id: I310e059a815377579de6bb2aa204de168e72571e
2015-03-12 11:22:56 +01:00
Maru Newby b649712c9d Initial copy of api tests from tempest
This change is the result of running

Change-Id: Ica02dbe1ed26f1bc9526ea9682756ebc5877cf4a
2015-03-09 21:24:55 +00:00