Commit Graph

113 Commits

Author SHA1 Message Date
Anusha Ramineni b8b0d31392 Remove intree tempest tests
New project congress-tempest-plugin is created, so removing the intree
tempest tests repo

Implements blueprint split-tempest-plugin
Change-Id: Iab440c040453d0ec6a886bf8a0096b566c9ff10b
2018-02-05 11:27:54 +05:30
Pierre Crégut 7248108745 Fix serialization of choices and reenable congress-agent.
oslo_config uses OrderedDict for choices in
options types. This serialize it as list of tuples.
Order is  preserved and types are naturally
deserialized back from those tuples.

Congress-agent is reenabled. It can be disabled
in devstack on  the value of ENABLE_CONGRESS_AGENT
(default is True).

Driver will initialize table to empty at first poll not
waiting for an initial response from agents.

Closes-Bug: #1742833
Change-Id: If1423e824fc457bab89f4bcd12be8826c50f5f69
2018-01-26 11:58:08 +01:00
Eric Kao 734997a6ff Add attach/detach security group action to neutron driver
To modify the security groups attached to the list through congress
policy, actions to attach/detach a security group to/from port is
needed.

Because the neutron v2 API and client do not support attach/detach
of a single security group, but only the replacement of the entire
security group list, we add these custom actions which combine
a read and update action to accomplish the attach/detach.

Caveat: Another concurrent update to the list of attached ports may
be lost. Unfortunately, there is simply no better solution given the
limitations of the neutron v2 API. So we enable these actions anyway
with documented warning in the driver actions description.

Change-Id: I51ec7452a5a7a77cc8cfc57b87e671685280ea73
2018-01-04 21:55:22 +00:00
Zuul 75557cfce3 Merge "Devstack integration for configuration file validation" 2018-01-04 21:42:46 +00:00
Valentin Matton bed97f1a72 Devstack integration for configuration file validation
This last part adds the agent to the devstack deployment, a
basic tempest test of the datasource and gives an example of
its use.

Implementation of a datasource that transcribes the content
of configuration files managed by oslo-config in Congress
tables.

The datasource uses a set of agents deployed on the nodes
to access the configuration files.

Change-Id: Ibda41c44e551e6dc8e5895968018c7169c34c9c8
Implements: blueprint configuration-files-validation
Co-Authored-By: Valentin Matton <vmatt.openstack@gmail.com>
Co-Authored-By: Pierre Crégut <pierre.cregut@orange.com>
2017-12-08 13:09:36 +01:00
Anusha Ramineni ecc0ad6839 Fix py3 failures and enable py3 dsvm job
This commit makes sure congress is py35 complaint.

Closes-Bug:#1731141
Change-Id: Ie8c4a244a60a56cac5b1e1430648f51546f51d62
2017-11-23 08:22:07 +00:00
Anusha Ramineni 42afa8729b Modify to use libraries compatible with python3
This commit addresses some of the issues seen with compatibility of libraries
in 'congress-devstack-py35-api-mysql' gate job.

Partial-Bug:#1731141
Change-Id: I2cd487a712c3f5a6b113f7446d498add32eee9ab
2017-11-23 03:21:57 +00:00
Nguyen Van Trung 9ce4da82c2 Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:
* admin_manager > os_admin

Change-Id: Ia992fd686025ec1ab69a76bb3bbb9d58e0094bff
2017-11-15 04:36:35 +00:00
Anusha Ramineni b72ae35044 Remove ceilometer datasource driver from congress
This commit removes the ceilometer datasource driver support in congress, as
ceilometer API is removed in Queens release.
Reference:https://review.openstack.org/#/c/512286/

Change-Id: Ib7ade0951f8a85102d95a0f01c3d63337f6b2404
Closes-Bug: #1729761
2017-11-07 09:21:33 +05:30
Zuul 9083ca4ea6 Merge "Replace the usage of some aliases in tempest" 2017-10-31 05:20:08 +00:00
Eric Kao 8bdf2e6fa1 Fix test mocking and disable ceilometer tempest test
In response to this change:
7e185ad96b (diff-38dac991635941a0cc209c729f58298e)

And this change removal of ceilometer v2 API
https://review.openstack.org/#/c/512286/

Change-Id: Ie806b1a6bd731af656e0610372cac083c4ee82a9
2017-10-30 17:08:34 -07:00
Luong Anh Tuan a729a0926d Update tests to do not use deprecated test.services()
Function 'tempest.test.services()' has moved to
'tempest.common.utils.services()' in version 'Pike'.
This commit update tests accordingly.

Change-Id: I427a28e4483a7ac4733f3682f6983f974e60c849
2017-10-17 07:49:00 +07:00
Vu Cong Tuan b5db8656ad Replace the usage of some aliases in tempest
In tempest, following aliases have been moved in version Pike
and will be removed in version Queens:
* manager > os_primary [1]
* admin_manager > os_admin [2]
* os_adm > os_admin [3]
* os > os_primary [4]
* alt_manager > os_alt [5]

[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/467852/
[3] https://review.openstack.org/#/c/467605/
[4] https://review.openstack.org/#/c/466991/
[5] https://review.openstack.org/#/c/457555/

Change-Id: I864d59a2e72a1d690f055bebc1e123f38b28f205
2017-10-16 04:32:52 +00:00
Jenkins 6f52bcc79b Merge "Add diagnostic output for replica test instability" 2017-10-14 00:22:46 +00:00
Jenkins 91bbfa2494 Merge "add tempest test to activate library policies" 2017-10-13 23:44:32 +00:00
Eric Kao 77efd73a11 Add diagnostic output for replica test instability
Possible cause of replica test instability is devstack plugin
script exposing key file executes before key files are created.
The theory is consistent with the observation that failures
are much more prevalent under high infra load.

This patch adds output to confirm those situations.

Change-Id: Ib5d4e29109f86a627eb4ab48296eae773053949d
2017-10-13 14:01:13 -07:00
Eric Kao 136315c7ed add tempest test to activate library policies
Test activating library policies in dsvm job.
Helpful for testing contributions to policy library.
Ideally the test would be done in local unit tests,
but with the way policy creation works right now,
a functioning datasource (eg. nova) is required.

It may be helpful in the future to add a new way of
validating library policies without the running datasource.

Change-Id: I36d78a7f2764386a1fc251dedd4ecfa696000ec1
2017-10-13 17:57:16 +00:00
Songming Yan 242f127f5a Add Qos translator in neutron datasource drive.
Parts that require QoS extension placed in a separate driver.
So that the standard neutronv2_driver continues to work
for environments without the QoS extension.

Implements: blueprint add-qos-in-neutron-datasource-driver.

Change-Id: I3554f3c31f419b85ec27e734147fcb6eb2a81bde
2017-10-13 17:56:11 +00:00
Eric Kao 1d55e9322b Fixed confusing cls param in instance methods
Replaced with self as is conventional.

Change-Id: I0f6aed2d820e70833d7f7a3e98c3c0bd08b17956
2017-08-22 16:49:06 -07:00
Eric Kao 5e5a02418f Final changes for pike RC1
Because of temporarily very unstable gate so close to RC1 deadline,
aggregating several RC1 targeted changes into one patch to make
deadline.

Included changes:
Temporarily disabled replica tempest test because of instability.

Update URL home-page in documents according to document migration
Author: Luong Anh Tuan <tuanla@vn.fujitsu.com>

Policy library loads only .yaml, .yml
Also skip-continue rather than exit congress on loading failure
(for example because of incorrect format or file system error)

Update auth_url in manual testing script
To work with latest keystone/devstack.

Add sample outputs from manual testing scripts

Add documentation and update release notes for policy library

Add auto-generated config reference
Part of doc-migration work

Closes-Bug: 1706158

Change-Id: If2606739f02418d14251dccc4d3a5f9fe10ca48f
2017-08-10 08:32:51 -07:00
Eric Kao f328e2f3ee Show replica error in replica HA test
release-team: testing-only change

Change-Id: Ie6ad31e2d3835de613f158f9e6458a9592da35bb
2017-08-07 18:08:10 +00:00
Eric Kao 758d8599de fix and re-enable replica HA test
added devstack option $CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST
which sets congress encryption keys to be readable by all
so that the replica instances launched from a different user
(tempest test user) can access the keys and operate correctly.

release-team: testing-only change

Change-Id: I014a750ae0d39fcc8cc78ca44bd5f59d87bf2226
2017-07-29 11:10:51 -07:00
Jenkins 3bab6bf44f Merge "add encryption to secret datasource config fields" 2017-07-27 04:16:08 +00:00
Eric Kao 315339a96e add encryption to secret datasource config fields
A new congress/encryption.py module handles all aspects of
encryption.

The datasource DB interface class encapsulates all the
encryption (on write) and decryption (on read).

A new config option `encryption_key_path` has been added to the
DEFAULT section
to specify the path to the directory containing encryption keys for
encrypting secret fields in datasource config. The default value
works for most deployments.
A new key is automatically generated and placed in the
`key_path` directory if none exists.

Temporarily disabled an HA test which fails because the test
set up needs to be updated (the way popen starts the replicas,
they do not have permission to access the encryption keys set
up by the original congress instance. See this output for more
detail:
http://logs.openstack.org/35/487235/3/check/gate-congress-dsvm-api-mysql-ubuntu-xenial/f53656f/testr_results.html.gz
(OSError: [Errno 13] Permission denied: '/etc/congress/keys/aes_key')

Change-Id: I49a71bb398383f93cd2ea93e054a9a27a45c4660
2017-07-26 14:02:37 -07:00
ghanshyam 8a5c56e870 Replace deprecated test.attr with decorators.attr
Tempest has deprecated decorator 'tempest.test.attr' and
moved the same as stable interface to 'tempest.lib.decorators
.attr' in version 16.1.0.

Let's use the stable interface for attr decorator.
This will help Tempest to remove the deprecated decorator.

Change-Id: I292e1837ff781694cfb48049b544582ae9820390
2017-07-25 04:34:13 +03:00
Jenkins 8509657bb9 Merge "Automatically load library policy files at start" 2017-07-12 09:28:17 +00:00
Jenkins 99bbc3b431 Merge "Replace the usage of 'admin_manager' with 'os_admin'" 2017-07-11 20:17:36 +00:00
deepakmourya 8c40295b14 Replace the usage of 'admin_manager' with 'os_admin'
In tempest, alias 'admin_manager' has been moved to 'os_admin'
in version Pike, and it will be removed in version Queens [1].

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

Change-Id: I73be6d843c0bfb760a60ff00659b42a3e96a18fd
2017-07-11 10:30:25 +05:30
Eric Kao cd9aa33451 Automatically load library policy files at start
harness.py loads library policy from disk files to DB

uniqueness constraint added on library policy name.

devstack plugin updated to install library policy files
to default location

updated congress stand-alone install instruction

Partially implements: blueprint policy-library
Closes-Bug: 1693619
Closes-Bug: 1693672

Change-Id: I51097081f6576755751231feb5ed2b0be642d91e
2017-07-06 17:45:19 -07:00
Jenkins a724dfb59c Merge "policy library DB interface, DSE service, API" 2017-06-29 04:34:01 +00:00
Jenkins 3dbdd5774b Merge "Replace assertEqual([], items) with assertEmpty(items)" 2017-06-28 05:42:23 +00:00
Eric Kao 7d0bbc3df6 policy library DB interface, DSE service, API
DB interface for adding, getting, and deleting library policies
A DSE service for adding, getting, and deleting library policies
Alembic migration script for adding the new DB table
policy library API model
Tempest smoke test

Closes-Bug: 1693617
Partially implements: blueprint policy-library

Change-Id: I15dda797e6e29ff5155f5758d93d68499539f8fc
2017-06-25 21:57:20 -07:00
Vu Cong Tuan b23c20eb44 Replace the usage of 'manager' with 'os_primary'
In tempest, alias 'manager' has been moved to 'os_primary'
in version Pike, and it will be removed in version Queens.
This patch is to replace the usage of 'manager' with 'os_primary'.

For other details, please check [1] and [2]
[1] https://review.openstack.org/#/c/468036/
[2] https://review.openstack.org/#/c/463484/

Change-Id: I524695532290c9a87783958a860e5d570328c11b
2017-06-25 22:50:16 +00:00
Vu Cong Tuan 0aba00d693 Replace assertEqual([], items) with assertEmpty(items)
Since assertEmpty() function has already been implemented in tempest,
let's use this function instead of generic assertEqual() function.
This change makes the code and the error messages to be more readable.
Therefore it improves maintainability a little bit.

Change-Id: I20879ed2e662040e2d5c843634f9f90f396c33b8
2017-06-13 09:56:19 +07:00
Jenkins 0662827d41 Merge "Add tempest tests for keystonev3 driver" 2017-06-02 05:15:52 +00:00
Anusha Ramineni 19edf0488c Enable HA test
Closes-Bug:#1689220
Change-Id: I8c67843b563ec43491cb1adb90122420ee7fc072
2017-05-24 09:15:44 +05:30
Anusha Ramineni cb9399177f Add tempest tests for keystonev3 driver
This commit adds tempest tests for keystonev3 driver

Also removes/fixes broken columns in the `users` table.

Closes-Bug:#1689471
Change-Id: I8ca8d2121b167f884ac2282a30a6214ba29cb56e
2017-05-22 09:52:50 +05:30
Anusha Ramineni 5a431a5c23 Remove deprecated attrs usage in tempest plugin
Closes-Bug:#1689479
Change-Id: I94c92d4498f2259a0ac4e32d21cc553d045788d9
2017-05-09 14:50:43 +05:30
Anusha Ramineni 8babdb5dc9 Fix gate failures
This commit fixes the issue with gate.
Still issues pending with usage of v2. It comments the following
tests to unblock the gate.

TODO(ramineni): Fix keystonev2 auth, and replace keystone v2 tests with v3
                Fix HA tests to use v3 clients (bug:1689220)

Closes-Bug:#1689221
Change-Id: I66e9ddb4ae6d3819f0b47fab220607cfe8446171
2017-05-08 09:30:18 +05:30
Eric Kao e000a86ed5 check update error on tempest datasoure tests
add to each polling driver test a check that poll succeeded at least once
without error.

The purpose is to catch polling errors (usually due to service client changes)
quickly.

Closes-Bug: 1669164

Change-Id: I2df2b813e0eb187cfd795a3fbd72240c127f61a4
2017-04-06 00:12:07 +00:00
Ken'ichi Ohmichi bca02634ac Remove _hotplug_server() from test manager
Since I650c859850fb91d75b1cf27488c374a2a1c7f25d _hotplug_server() has
been added, but the method is never used on Tempest-plugin tests.
In addition, the method is using unstable Tempest internal methods.
Then this patch removes _hotplug_server() for the cleanup.

Needed-By: Ie03d54f876b10b2546a1406ac944b4d09f82b510
Change-Id: Ie527ca8f163faa69792c78791878feee9f1e3956
2017-03-17 13:11:02 -07:00
Ken'ichi Ohmichi a9c23d6410 Switch to use stable data_utils
Tempest provides stable library interfaces under tempest.lib.
This patch switches to use it for data_utils.

NOTE: Maybe reviewers will feel deja-vu because the similar patch is
      merged before. But ater that, the another copying tempest patch
      has been merged and we need this patch again. Sorry for this mess.
      Iba05bc604f447f2acaf4cd81e05443b366b821a1 will be merged after
      all projects are ready.

Change-Id: I1dd56c95c0bf69d4f52402399631bb01d5ee5702
2017-03-10 11:18:11 -08:00
Jenkins 50188025f8 Merge "Keep local copy of tempest/scenario/manager.py" 2017-03-10 06:10:25 +00:00
Jenkins 9c229bd1d7 Merge "Pass network_mask_bits in assign_static_ip()" 2017-03-10 02:56:22 +00:00
Eric K 21bb9680be Keep local copy of tempest/scenario/manager.py
From tempest team:
if today you import manager,py from tempest.scenario please maintain
a copy of [0] in tree until further notice.
https://www.mail-archive.com/openstack-dev@lists.openstack.org/msg101531.html

Removed unused scenarios. Removed unused public methods.

Change-Id: Ibdcd0bb0be46eb0b1f766a48faf527e2b1d74146
2017-03-08 18:10:49 -08:00
Jenkins 5660488f7b Merge "delete "id" field in DoctorDriver" 2017-03-07 06:31:28 +00:00
ghanshyam 125b4a71d1 Pass network_mask_bits in assign_static_ip()
Tempest patch (I430424cc776cb12906c7890cf584797ebea1cd41)
removing the dependency of config value of network_mask_bits
in remote_client assign_static_ip() method.

User of this method needs to pass the network_mask_bits explicitly as arg.

Change-Id: I87f420af25e30f31be34495e1a859802b53cceea
Depends-On: I430424cc776cb12906c7890cf584797ebea1cd41
2017-03-06 08:26:08 +00:00
Jenkins 9fd05d102b Merge "Remove logging import unused" 2017-03-06 03:34:11 +00:00
Ken'ichi Ohmichi 02002bfdce Switch using exec_command() directly
get_ip_list() is a private method in Tempest and it will be removed
soon with Iadddf283dc7bed502285cb2fc9e87110787d87a0 .
This patch switches using exec_command() instead.

Change-Id: If7423b610ff25127725046df3a44195c03d46b9a
2017-03-02 10:19:39 -08:00
dongwenjuan 0c9ecb9109 delete "id" field in DoctorDriver
There is no "id" field in the Doctor SB_API.

Change-Id: I8ad7d8d4bdd35d3c16963c0961d7912fa4fb001e
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
2017-03-01 13:49:07 +08:00