Commit Graph

32 Commits

Author SHA1 Message Date
Chandan Kumar 53fa3accea Remove intree magnum tempest plugin
* It removes magnum tempest plugin reference in favour of using
  newly magnum-tempest-plugin.
* We removed tempest tests resides under functional.api.v1.test-*
  files as they are tempest tests and keeping the rest as they are
  used by functional tests.

Depends-On: Ibdddd26da9cfb0d08c2977660320b2c052d7261b
Change-Id: Ida2fa1ef5880ebead787e3b27ac7ebf5aa498f62
2017-12-14 15:48:47 +05:30
Spyros Trigazis 4fb91cc109 tests: Use swarm-mode for api tests
* Swarm-mode is the fastest cluster to deploy since it doesn't
  require to pull anything from outside.
* Add the output nodes for swarm-mode too.
* Disable copy logs (I think a better practice is to copy logs
  on demand).
* Don't run test_create_list_sign_delete_clusters, because it is
  very unstable on the CI.

Partially-Implements: blueprint swarm-mode-support

2nd commit message:

Update to Fedora Atomic 26

This patch moves the current master to test against Fedora Atomic 26,
in addition, it switches to downloading from Fedora mirrors.

2nd-Change-Id: I9a97c0eb78b2c9d10e8be1501babb19e73ee70c1

3rd commit message:

Set default iptables FORWARD policy to ACCEPT

With the release of Docker 1.13 which is available in Fedora
Atomic 26, it no longer sets the policy of the FORWARD chain
to ACCEPT[1].  Therefore, CNI networking such as Flannel will
cease to work.

This patch sets the policy to ACCEPT so that traffic can work
once again for deployments which are based on Docker versions
which are newer than 1.13

[1]: https://github.com/moby/moby/pull/28257

3rd-Change-Id: I1457602748619f38f87542fc01a2996ee80e58b7
Closes-Bug: #1708454

Co-Authored-By: Mohammed Naser <mnaser@vexxhost.com>
Change-Id: I86d4dcc94fff622be4ee2acc8dd60ed81bc5d433
2017-08-21 05:30:09 +00:00
yatin fd3c9ef6dd Copy cluster nodes logs always whether tests pass or fail
- Use addOnCleanup instead of addOnException. This will make copy
  logs to run  whether tests pass or fail.
- Also try to copy logs if setupClass Fails.

Change-Id: I76b135ade4c1ed4987f9bcbe1d5ded09ad57deb9
2017-07-18 05:32:31 +00:00
coldmoment ba8ad5e37f Add a hacking rule for string interpolation at logging
String interpolation should be delayed to be handled
by the logging code, rather than being done at the point
of the logging call.
See the oslo i18n guideline
* https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages
and
* https://github.com/openstack-dev/hacking/blob/master/hacking/checks/other.py#L39

Change-Id: I8a4f5f896865aebbff88ee894f0081e58cfce9ef
2017-07-15 14:49:45 +08:00
Jaycen Grant eaddb942fd Rename Bay to Cluster in api
This is the first of several patches to add new Cluster commands
that will replace the Bay terminalogy in Magnum. This patch adds
the new Cluster and ClusterTemplate commands in addition to the
Bay and Baymodel commands.  Additional patches will be created
for client, docs, and additional functional tests.

Change-Id: Ie686281a6f98a1a9931158d2a79eee6ac21ed9a1
Implements: blueprint rename-bay-to-cluster
2016-08-17 22:24:45 +00:00
Jenkins c3748b7ce0 Merge "Support for async bay operations" 2016-08-12 08:52:43 +00:00
Vijendar Komalla bf30b9b4cb Support for async bay operations
Current implementation of magnum bay operations are synchronous
and as a result API requests are blocked until response from HEAT
service is received. With this change bay-create, bay-update and
bay-delete calls will be asynchronous.
Please note that with this change bay-create/bay-update api calls
will return bay uuid instead of bay object and also microversion
1.2 is added for new behavior.

Change-Id: I4ca1f9f386b6417726154c466e7a9104b6e6e5e1
Closes-Bug: #1588425
2016-08-11 09:28:34 -05:00
houming-wang 4e14a3db4e Functional: validate OpenStack resources
Add negative functional test cases to validate bay's
keypair and external network.

Change-Id: I844baf570eb8fc361afb8781e45a20399aa2c573
Co-Authored-By: yatin karel <yatin.karel@nectechnologies.in>
Closes-Bug: #1521495
Closes-Bug: #1521493
Related-Bug: #1520353
2016-08-11 10:57:26 +05:30
Hongbin Lu b3de59206d Create a base class for tempest tests
The tempest tests (gate-functional-dsvm-magnum-api) requires
importing modules that other tests don't require. Right now, we
import tempest modules in the common base class, which is
undesirable. This commit splitted tempest codes out so that other
tests don't need to import tempest modules.

Change-Id: I4871acdc27d66e098e2321809d7d31d4e8416abf
Related-Bug: #1596778
Closes-Bug: #1553035
2016-07-28 17:59:03 -05:00
Madhuri Kumari e31ef64e6e Delete certs when deleting bay
Currently Magnum fails to delete certificates when barbican
cert manager is used. The code was copied from neutron-lbaas and
they have different usecase. In our case, certificate is managed by
Magnum not users, so we should delete certificates when deleting bay.
So this patch deletes all the certs related to a bay.

Change-Id: I5aab01641b9447153911680c5f68e5fe2c5a1409
Closes-bug: #1587033
2016-06-30 12:40:16 +05:30
Hongbin Lu 3961e3cb86 Gate: fix the credential object type error
Tempest changed its interface of credential [1] which caused Magnum
tests to fail. This commit updated the usage of credential in
Tempest tests. Also, added a check to avoid deleting baymodel if
None.

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

Closes-Bug: #1592187
Change-Id: Ie81c360106d4f7725a2ffbc44ea635979774b55b
2016-06-13 17:59:18 -05:00
Wenzhi Yu f92111267e Correct parameter order for assertEqual() method
Per 'TestCase.assertEqual' method definition[1], the parameter
sequence should be assertEqual(self, expected, observed, message='').

This commit fix the wrong parameter order(observed, expected) of
assertEqual method in magnum/tests/functional/api/v1/test_bay.py[2]

[1]https://github.com/testing-cabal/testtools/blob/master/testtools/testcase.py#L398
[2]https://github.com/openstack/magnum/blob/master/magnum/tests/functional/api/v1/test_bay.py#L95

Change-Id: Iece9606ff16b1620149d4dda1022554287ec150c
Closes-Bug: #1581008
2016-05-12 20:38:53 +08:00
Jenkins ee9472c88d Merge "Functional: Add prefix when copy logs on failure" 2016-05-04 07:49:11 +00:00
Eli Qiao d560cbddff Replace tempest-lib with tempest.lib
tempest-lib is deprecated for future bug-fixes and code changes
in favor of tempest.

On gate testing, we installed tempest from source code so remove
it from test-requirements.txt.
Closes-Bug: #1553047
Change-Id: I405ad31e1c218868c6dbffb967a755163674fc80
2016-05-03 02:12:30 +00:00
Eli Qiao 114c18a9f7 Functional: Add prefix when copy logs on failure
It's hard to indentify which node is master and which is slave now, add
prefix `master` or `node` to logs directory on functional testing
failure.

Change-Id: Ida739845d5276d53b037ac32dcb1b72bc717936f
2016-04-25 12:59:26 +00:00
Jenkins ea7660ba9f Merge "Remove minion dependency on master" 2016-03-28 20:43:21 +00:00
wangqun b927d03cf7 Fix baymodel with invalid parameter can updated.
Now, when we update baymodel with the invalid flavor_id or
master_flavor_id parameters, the baymodel can be updated
successfully.

We need to validate the flavor_id, master_flavor, keypair and so on
before patching baymodel.

Closes-Bug: #1555490
Change-Id: I4ae3cd7c0be1161dacb6f0a80c5ee1b53d06d03d
2016-03-11 09:21:42 +00:00
Jenkins 3be6f8ee63 Merge "Bay status returns None initially after create" 2016-03-09 05:46:27 +00:00
Hua Wang 5de12d9ea8 Bay status returns None initially after create
When creating a bay using heat resources, OS::Magnum::Bay, the first
bay status returns None, then the following bay status returns the
correct CREATE_IN_PROGRESS.

Change-Id: I6e3802b1321de5d300e167c5b0f1a9ebf291fe13
Closes-Bug: #1507598
2016-03-09 09:47:21 +08:00
houming-wang eeb28dc9ec Functional test for flavor validation in bay creation
Add a negative functional test case to validate bay's flavor.

Change-Id: I5d59f32f76e974054f69f46ffeabea5cd280288c
Closes-Bug: #1520353
2016-03-08 16:01:30 +08:00
Corey O'Brien 08ac9a6cba Remove minion dependency on master
Make thhe minions work correctly without depending on the master.
Removing this dependency decreases provisioning time by provisioning
nodes in parallel.

Change-Id: I025dbf54ef0cdafc4fe26acc33a9faed8cacd1ca
Partial-Bug: 1536739
Partial-Bug: 1551824
2016-03-04 07:41:12 -05:00
Jenkins 32be5b1ee6 Merge "Copy logs on test failure" 2016-02-29 22:47:54 +00:00
dimtruck 7d524491c8 Copy logs on test failure
This patch will copy logs from nova servers to local environment
on test failures.
Don't delete bays until teardown so log gathering will work.
Give functional test types a common base.

Added timeout to docker ps; else, the command would time out,
failing to run the rest of the tests.

Closes-Bug: 1542390
Change-Id: I016ed8fe311bede407f57b7982126c4b77749bec
Co-Authored-By: Corey O'Brien <coreypobrien@gmail.com>
2016-02-29 10:25:10 -06:00
Jenkins 4b5088c800 Merge "certificate sign with a non-existing cert should throw HTTP 400" 2016-02-27 19:12:51 +00:00
space d8cf838dd3 certificate sign with a non-existing cert should throw HTTP 400
Add throw exception for the validate code of CSR. Then it
 will throw HTTP 400 when the CSR validation is not passed.

Change-Id: I6603a2a243097687fef8666343b993c0a18946a9
Closes-Bug: #1543643
2016-02-27 03:54:10 +08:00
dimtruck 8f5952fa6b Add tempest logging to bay_client and test_bay helper methods
This patch will add tempest logs to bay_client and
test_bay helper methods to provide ability in debugging
gate issues as well as ability to run analysis on logs

Closes-Bug: 1545124
Change-Id: Id5bda1a8776c29ec7cbe2366b3139358811b57c7
2016-02-19 10:53:53 -06:00
dimtruck 6ccda1ad10 Add magnum certificate api tests
This patch will add cert API test for signing and showing
certificates.

The tests for certificates are integrated into test_bay
tests in order to reuse an already existing bay for
cert testing.  As a side effect, this patch also
combines update bay test with create, list, and delete
to minimize the time spent waiting on bay create.

Implements: blueprint magnum-tempest

Change-Id: Ifbb4c779376fa401ca2538aba5097f7af8b4973e
2016-02-12 09:47:41 -06:00
Corey O'Brien 1a9806b17f Fix gate issues with functional-api job
Prevents etcdctl from hanging when etcd has not started by explictly
specifying connection timeouts.
Reduce swarm build time by removing the unneccessary dependency
between masters and nodes.
Only create 1 node instead of 2 nodes
Remove test_update_bay_name_for_existing_bay

Change-Id: If6724497b47247d2858b6da90309949f92314cfb
Closes-Bug: 1541105
2016-02-05 15:43:45 -05:00
wangqun 2911427ace Add func test to validate baymodel-update referenced by bay
This patch https://review.openstack.org/#/c/266420/ disallowed
baymodel-update when it is referenced by bay(s).
For regression, add to have func test coverage for that.

Change-Id: I4db767da900e48af0234bded3aaf371557c0bfcd
Closes-Bug: #1533746
2016-02-01 02:21:54 +00:00
Corey O'Brien d52965d2d0 Improve Tempest credential provider usage
Instead of getting a DynamicCredentialProvider directly, use the
get_credentials_provider function. This allows for configuration via
TEMPEST_ variables, but the default will still be dynamic credentials.
Only create the default keypair for tests if it doesn't already exist.
Ensure that credentials are freed by calling clear_creds in all cases.

Change-Id: I62ad5ed9fe7c9f6675989df459f92194bb8d67a8
Implements: blueprint magnum-tempest
2016-01-22 15:13:42 -05:00
houming-wang c8e4fd8d6c Delete negative case of create bay without name
After this patch Ic35c411914d81f1521f4b6051497efaf13772b37 is merged.
We can successfully create a bay without name. So we can delete this
unnecessary negative test case.

Change-Id: I98b412727eac6e0ca64a7b9d44f370545e498bf0
Related-Bug: #1532918
2016-01-13 13:21:26 +08:00
dimtruck a66a532c99 Add magnum bay api tempest tests
This will add magnum bay CRUD tempest tests

The timeout to create bays is set to 10 minutes,
which may need to be tweaked based on how long it
takes to spin up a bay.

Implements: blueprint magnum-tempest

Change-Id: If4a34d7fd317e10b55d5f07bd51ffe37e6d4bc20
2016-01-11 14:28:13 -06:00