Commit Graph

23 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
Ricardo Rocha 12052b1253 Set clustertemplate:publish to admin only
Set the clustertemplate:publish policy to be admin only by default -
currently it is admin_or_user, which means any openstack user can create
a public cluster template.

Update tests for bay model and cluster template, splitting tests
requiring admin credentials into a separate class.

Change-Id: I0bfb57c569863f1ecf7d697cd5ac161a9a710432
Closes-Bug: #1687887
2017-05-04 12:16:47 +00:00
Jaycen Grant 06f056f606 Allow keypair to be added during cluster create
Keypair can now be added during Cluster create command. This allows
Clusters to be created from the same ClusterTemplate but have
different keypair values when created. If not specified on create
then the value from the ClusterTemplate will be used. Adds keypair_id
to Cluster object and uses of keypair_id will use the value from Cluster
instead of ClusterTemplate.

Added release note for new features in magnum and magnum CLI.

Change-Id: I177a5aa06f881156944a9f74c9ccc3cd2abac492
Implements: blueprint keypair-override-on-create
2016-10-06 17:25:09 +00:00
huang.huayong 8486667538 Add test for update baymodel public
update baymodel public=True,and check the result.

Change-Id: If229a8e60557e4f7c955ef4869230fbdf248fae0
2016-08-12 16:20:16 +08: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
Jenkins 82572f77b9 Merge "Create a base class for tempest tests" 2016-08-03 05:12:23 +00:00
yatin karel 2e54b732f4 Add functional test for public baymodel
Change-Id: If19a9e81feb03e02de8c8da685daf57747134f54
Closes-Bug: #1560239
Depends-On: I664be1b00975b048e2289f5be3270b4a00520e80
2016-07-30 11:05:19 +00:00
yatinkarel 960448c212 Add functional test for image/flavor validation
Change-Id: Ibe374be91cf0844b4b1f8c3cc8512e182f17387b
Closes-Bug: #1521497
Depends-On: I664be1b00975b048e2289f5be3270b4a00520e80
2016-07-29 08:36:34 +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
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
wangqun 4d39d8cc94 Fix baymodel with invalid parameter can created.
Now, when we create baymodel with the invalid flavor_id and
master_flavor_id parameters, the baymodel can be created
successfully.

We need to validate the flavor_id and master_flavor before
creating baymodel.

Change-Id: Id6768d8246c97d56e529cbc1cab6c8c7d28ca43a
Closed-Bug: #1547345
2016-03-02 15:44:09 -05:00
wangqun f2629f288c Validates baymodel volume_driver requests
Instead of allowing any volume_driver value to be accepted by the
baymodel API. When creating baymodel, the patch can limit the
volume_driver value for the different coe.
Kubernetes <=> volume_driver = "cinder"
Swarm <=> volume_driver = "rexray"
Mesos <=> volume_driver = "rexray"

Co-Authored By: Kai Qiang Wu(Kennan)<wkqwu@cn.ibm.com>
Co-Authored By: Ton Ngo<ton@us.ibm.com>

Partially-Implements: blueprint magnum-integrate-with-cinder
Depends-On: I52c97e2b04ac636ddac611e3677c4ea3972220eb
Change-Id: I25f1cd005a39950c47f31a8b925f664909b79ee3
2016-01-28 03:15:39 +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
Jenkins 5f841f38c4 Merge "Change 404 to 400 when resource not found exception raises" 2016-01-18 08:26:34 +00:00
space 93d9f0fe9f Change 404 to 400 when resource not found exception raises
According to the new document and Hong Bin's opinion,I changed
code 404 to 400 of the classes as follows:
ImageNotFound
OSDistroFieldNotFound
FlavorNotFound
NetworkNotFound,
because they are nonexistent resources.

So these four exceptions will report code 400 in the future
and we should pay attention to it.

Change-Id: I4040340f9605e3ed03af2ec3b965bf2fc54a0d98
Closes-Bug: #1494122
2016-01-18 11:23:18 +08:00
Hongbin Lu 53a1177539 Gate: Fixed an Unauthorized error on api tests
The error is caused by an incorrect teardown order in baymodel tests.
The teardown in super class will delete the credential, so it should
be called after the baymodel is deleted.

Change-Id: I9a022122c309fe6e2e74f744f196a67beec1f884
Closes-Bug: #1534641
2016-01-15 10:51:18 -05: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
dimtruck 5dc3211b71 Swithc to using dynamic credentials in tempest tests
Switch to using DynamicCredentialProvider, which
provides a unique non-admin user per test case, making
it possible to functional test in parallel.

Change-Id: I6bb5d493bb01d0dd2b4cd092f87f111b13b1fe02
2016-01-05 16:35:20 -06:00
Eli Qiao 00b53e2637 API: use baymodel_ident to update a baymodel
Currently, we can not update a baymodel with baymodel name, this patch fixes
it by passing baymodel_ident instead of using baymodel_uuid.

Closes-Bug: #1516900
Change-Id: Ib372c06762fdb3918f391aefd25c43e6a2a5fca3
2015-11-17 21:44:38 +08:00
Dane LeBlanc ce0ed4e44d Add support for allowable network drivers configuration
Problem:
With the changes that were merged with https://review.openstack.org/230147, the
choices of container network drivers that can be selected for a given COE type
when creating a Magnum baymodel are hardcoded, and are based on network drivers
that Magnum can support for each COE.

These hard-coded selections will probably make sense in most cases. However, in
some cloud instances, a cloud provider or cloud admin may want to restrict the
choices of network drivers that a user can select for a given COE even further,
based on specific restrictions in the cloud.

Magnum should provide support for configuration of what container network
drivers are allowed, and this needs to be provided on a per-COE basis.

Proposed fix:
Add 3 configuration list options to the config in /etc/magnum/magnum.conf for
configuring allowed nework drivers for kubernetes, swarm and mesos
respectively. The keyword 'all' can be used to allow all network drivers
supported by Magnum for that COE. The new config options are:
- kubernetes_allowed_network_drivers
  (default=['all'])
- swarm_allowed_network_drivers
  (default=['all'])
- mesos_allowed_network_drivers
  (default=['all'])
Validation of the --network-driver attributes for a baymodel create will be
performed against this above configuration on a per-COE basis.

Change-Id: Ibaa21d43fd6b5c1a6acc10e56145280eeaea8534
Closes-Bug: #1504635
2015-11-06 18:25:36 -05:00
lei-zhang-99cloud cfec863458 Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is
assertEqual(expected, observed).
This patch fix the issue in the module magnum/tests/functional/.

Change-Id: Ic5151d6052780180179189cf47cc41f9215e2af5
Partial-Bug: #1259292
2015-10-10 11:34:10 +08:00
dimtruck 87db63227e Functional tests with Tempest - BayModel CRUD
This patch will add functional test coverage for
baymodels.  It sets up tempest-lib and core
framework architecture with clients, models,
and data generator abstractions.

Partially implements: blueprint magnum-tempest
Change-Id: I9f4bf4293544ef1fe2a6b8aa209df49ddaabd04b
2015-09-21 16:27:07 -05:00