24 Commits

Author SHA1 Message Date
Lingxian Kong
602c4d42de Improve the function tests
- Execute test groups in serial to make sure no more than 2 database
  instance are created at the same time.
- Remove some unneccesary tests
- Remove unneeded datastore, e.g. 'Test_Datastore_1'
- Remove unsupported trovestack subcommands
- Move unsupported DIB elements to the 'deprecated-elements' folder
- Decrease default value of 'agent_call_high_timeout' to 5min
- Add initial_deplay for pooling task
- Use socket file to connect with database instead of using localhost
  IP

Change-Id: Ie5030a671fbeb453eafa6cbe04e08da7b52e33c9
2020-01-28 14:27:52 +13:00
Lingxian Kong
c33fa67066 Support to create public trove instance
- The users need to specify the network to create Trove instance, but
  trove-taskmanager will create port in that network for Nova instance
  creation. Using port gives Trove more capabilities to define how the
  database service is exposed.
- Deprecate ICMP protocol for the instance.
- Restrict 'nics' parameter for creating instance.
- Add 'access' parameter for creating instance.
- Add 'public_network_id' option in order to create floating IP for the
  instance.
- Do not create records for security groups, but Trove can still delete
  existing instances for backward compatibility.
- Delete unreasonable Host, Account, Storage API.

Story: 2006500
Task: 36468
Task: 36466
Change-Id: I80827e1ad5e6b130cbf94c2bb7a909c44d5cf1e5
2019-09-11 11:28:00 +12:00
Amrith Kumar
3b0d1ea25d Adds the api-ref migrated RST + YAML files
With this email[0], you must migrate API reference docs into RST. The
conf.py and the tox environment are also cribbed from nova.

Still need to retain the install_command in tox.ini, otherwise the
api-ref job fails.

[0] http://lists.openstack.org/pipermail/openstack-dev/2016-May/093765.html

Co-Authored-By: Anne Gentle <agentle@cisco.com>
Co-Authored-By: Amrith Kumar <amrith@tesora.com>

Change-Id: I3315261aa18729fa7a6aa79d4a1d6c24de1e2c6b
2016-08-17 17:46:41 -04:00
Sonali Goyal
e6620ff00f Changes names of some quota values
Some variables which were actually per-tenant were
incorrectly named with a _user. Corrected this
confusion by making the old names deprecated
and providing new per-tenant names.

Closes Bug: #1232969

Change-Id: I541ed990c0cdd40b3805d2e2a166363d9ff2ad04
2015-10-21 12:42:22 +00:00
Peter Stachowski
16d91d9838 Add generic int-test classes
The int-tests in Trove are very MySQL specific, which makes it difficult
to reuse code for other datastores.  This changeset breaks them down
into 'groups' and 'runners.'  Runners can be over-ridden to add
datastore specific handling/tests.  This should allow most generic
code to be reused across datastores, while also providing for datastore
specific enhancements.

Runner implementations are stored in a new package
'trove.tests.scenario.runners'.  A datastore-specific implementation can
be added to the appropriate runner module file. Its name has to match
'PrefixBaseRunnerClassName' pattern, where 'BaseRunnerClassName' is the
name of the default runner and 'Prefix' is the datastore's manager
name with the first letter capitalized.

Example:
    Given the default implementation for negative cluster tests in
    'trove.tests.api.runners.NegativeClusterActionsGroup'.  One can
    provide a custom implementation for MongoDB (with manager mongodb)
    in 'trove.tests.api.runners.MongodbNegativeClusterActionsRunner'

This initial changeset adds tests for basic actions on instances
and clusters.  Some basic replication tests were also migrated.

The concept of a helper class for datastore specific activies
was also created.  This makes it easy to have tests use standard
methods of adding data and verifying that the datastore behaves
as it should.

Vertica was refactored to use the new infrastructure.

Running the tests can be accomplished by specifying one of the
new groups in int-tests (see int_tests.py for the complete list):

./redstack kick-start mongodb
./redstack int-tests --group=instance_actions --group=cluster
or
./redstack int-tests --group=mongodb_supported (to run all
tests supported by the MongoDB datastore)

As with the original int-tests, the datastore used is the one
referenced in test configuration file (test.conf) under the
key dbaas_datastore.  This key is automatically set when
kick-start is run.

Additional Notes:

Also temporarily disabled volume size check in
instances tests.
It is supposed to assert that the used space on the
Trove volume is less that the size of the volume.
It however often fails because 'used' > 'size'.
From inspection of the instance it appears that the reported
'used' space is from the root volume instead of the
attached Trove volume. Plus it sometimes returns int instead of float.

Change-Id: I34fb974a32dc1b457026f5b9d98e20d1c7219009
Authored-By: Petr Malik <pmalik@tesora.com>
Co-Authored-By: Peter Stachowski <peter@tesora.com>
2015-08-26 19:38:49 -04:00
Jared Rohe
8ad786e9be Remove rsdns directory
The rsdns service is no longer needed since trove now supports designate.
It is not being tested in the gate and is currently unsupported.

Remove other rsdns related files and references.

Change-Id: I44009dace44afb5467c51def33c794641ffa33c0
Closes-Bug: #1454028
2015-06-03 12:15:01 -07:00
Adam Gandelman
21fee8c3c5 Support string flavor IDs
This allows operating on Nova flavors with non-integer ids
by adding a new str_id field to the view that always contains the
unicode flavor id.  The current id field will now contain a value
only when the flavor's id can be cast to int, otherwise it will be
None.  Validation of flavor id when querying a flavor or creating an
instance has been updated to include non-empty strings in addition to
integers.

This will require a patch to python-troveclient to properly fallback
to str_id in absence of the integer id:

    https://review.openstack.org/#/c/123301/

Change-Id: Ie9cfefc6127bc76783cdf9668636342d7590b308
Closes-bug: #1333852
2014-12-23 12:56:19 -08:00
Tim Simpson
52fc67e51e Create example generator
This code adds a feature to the tests where all of the example
snippets are generated and then validated. Tests fail if the new
examples don't match the old ones, meaning a dev changing the API
must update the snippets, triggering a conversation about the changes
during the pull request.

Implements: blueprint example-snippet-generator
Change-Id: I5f1bfd47558a646a56e519614ae76a55759a4422
2014-11-17 13:51:24 -06:00
daniel-a-nguyen
83c7aaf178 Remove unused xml config file
Change-Id: I2b0129fcf3fb9f2e206dc0d6ac422c5bcc82d6af
Closes-Bug: #1324317
2014-05-28 17:13:01 -07:00
Tim Simpson
3cdb9ea817 Changing DNS to pass string to driver
This commit also moves the "get_ip_address" functions out of
instance.views and into the models code under the SimpleInstance class,
where it's renamed get_visible_ip_addresses().
Also, the content field (the ip address) is now passed to the driver
instead of set on the Entry object by the manager, which allows more
flexibility for dealing with various drivers and will hopefully prevent
issues in the future.
Finally, integration tests were added to keep this from breaking
in the future.

Closes-Bug: 1273446

Change-Id: I70bf37838cc5cecfe579fe6001df79d7f6f5d53e
2014-01-31 17:50:34 -06:00
Michael Basnight
d16940a1c3 Modifying tests to use the compat client
Modifies tests so they use the old style client code.
This is still exercising the actual v1.* code, it is
just accessing it via the compat module.

partially implements blueprint cli-compliance-upgrade

Change-Id: I5578525325416a28d7ab772ad0817f49ff6c6611
2013-10-08 21:07:37 -07:00
Dmitriy Ukhlov
9f55a06e09 Task manager refactoring done
Manager API class removed and rpc fake impl used now for integration
testing

Change-Id: If20004f1b69e41e8243a3f58eec184f1f457affe
Implements: blueprit trove-task-manager-client-refactoring
2013-10-08 23:36:18 +03:00
Michael Basnight
7ab80b554d Rename from reddwarf to trove.
Implements Blueprint reddwarf-trove-rename

Change-Id: Ia9ee609bbc06a1d8b9d6917642529f30347541fd
2013-06-24 14:11:15 -07:00
Steve Leon
301cdf245c Ephemeral volume support
This feature enables reddwarf to create instance and run mysql on ephemeral disk.
To enable this feature, set the flag "reddwarf_volume_support to False and specify the device_path and mount_point variables.

Also added int tests for ephemeral support

fixes LP bug# 1175719
BP: https://blueprints.launchpad.net/reddwarf/+spec/ephemeral-storage-volume

Change-Id: I869297e7da288ac42b359c8cdb731e8b7281d51b
2013-05-23 14:18:10 -07:00
Craig Vyvial
2a30e1871b fixing the flavor tests
Fixes Bug: 1157541

Change-Id: Ia77a71139fd96aadfe9618240c5c234ca552f167
2013-04-10 00:26:14 -05:00
Ed Cranford
825acf1ee3 Adds optional hostname to calls involving users
All calls that involve calling a user by name now
also allow for the host to be specified optionally.

Similarly, all calls that respond with a user also include
the host, defaulting to '%', MySQL's shorthand for 'anywhere'.

There are also a few fixes to get all real, fake, and tox tests
to work. Those will probably be rebased away if other reviews are
merged first.

Change-Id: I6df821ef2ad7d0602a060c853f0ef9bdc5c11c26
2013-03-26 14:27:16 -05:00
daniel-a-nguyen
a076b182c7 Addresses failing quota int-tests
Refactored tests following comments
Needed to update tearDown method

Change-Id: I2ae65a01f32b7a7afe779d8b54c019c033ac4889
Fixes: bug #1155317
2013-03-20 20:58:07 -07:00
daniel-a-nguyen
c27fd2447a Adds absolute limits to limit API call
Addresses XML issues

Change-Id: I96df93c36c06baf309f881fc1f21b5acbd7fa953
Fixes: bug #1154298
2013-03-12 20:52:04 -07:00
Tim Simpson
0fc4600e01 Tests the API in XML mode.
This form of testing has been nearly available for awhile but was not
turned on because it will increase the time of a full tox test run by
eight seconds. However there has recently been new features which do
not work at all with XML, so the time loss seems like a silly reason
to not gate on this.

implements blueprint test-with-xml

Change-Id: I98d892bb5c1a0c16425f80a28a296c70120318c8
2013-03-06 18:24:17 -06:00
daniel-a-nguyen
0a71ef9e88 Rate limits implementation
added unittest for limits
    reverted changes to openstack/common
    removed commented code
    cleaned up unittest
    added int-tests
    updated reference to XMLNS
    removed 1.1 XMLMS in wsgi

Implements: blueprint rate-limits
Change-Id: I842de3a6cae1859cc246264a5836abfd97fb8074
2013-03-05 14:17:36 -08:00
Steve Leon
c4848cd472 Quota feature
Quota check for create/delete/resize volume
Quota is implemented as a decorator, which can be easy enabled and disabled if wanted.
The quota feature uses a reservation system that reserves resources prior to usage.

BP https://blueprints.launchpad.net/reddwarf/+spec/quotas

Change-Id: I5df82c8f1d7b40311b5d5d7301992607f98e9b2a
2013-03-05 09:44:47 -08:00
Tim Simpson
bec9bc586a Updates tests to run in other configurations.
* Changes the reddwarf.conf.test flag so "use_nova_server_volume"
  is turned off, as it should be, and fixes a resulting fake mode bug.
* Fixes tests to not check for volume when
  "reddwarf_main_instance_has_volume" is specified in the test config.
* Changes poll_until to reuse Reddwarf implementation instead of
  rewriting it just for the tests.
* Adds tests to confirm its possible to log into a real MySQL instance.
  These are only run for "real mode" in a VM or other environment, but
  it's necessary that they live here.
* Changes the "get_address" method of the InstanceTestInfo object to
  get pulled from the test config (necessary when hitting other
  environments).
* Fixes some bugs in guest agent models.
* Deleted the pagination test. It can't run very quickly in the tox
  fake mode, so there's no point in keeping it here (it still exists
  in Reddwarf-Integration).

Change-Id: I2835762c4180e1ca594b27194564b8f993aa4066
Fixes: bug #1085188
2012-11-30 18:07:41 -06:00
Aaron Crickenberger
186cf0647f Use reddwarf instead of reddwarf_lite
This codebase used to be reddwarf_lite, it is now stackforge/reddwarf,
let's make sure naming conventions follow suit

Fixes bug 1081321

Change-Id: I9d56a1ec5274f49285992a2264b0e6d7a2a6c27f
2012-11-20 16:48:06 -05:00
Tim Simpson
c007356a78 Adding tests to Reddwarf.
The tests come from the Reddwarf Integration repository. wsgi_intercept
is used to allow the test code to hit the server code directly. It also
properly sets up the SqlLite database before each run.

* Adds an "event simulator" which queues up functions that would
  normally be spawned with eventlet. The various sleep functions are
  then swapped with a method that runs these faux-events.

* Adds many of the Reddwarf Integration tests. The idea is these
  could still run in a richer, real environment, but are running here
  enables us to quickly check feature breaks for each commit and
  lowers the learning curve necessary to test the API. The downside
  is some of these tests still have artifacts of their origins, such
  as (unused) classes to connect to MySQL databases. Some more work
  will be necessary to separate the "real mode" functionality of these
  tests further.

Implements: blueprint tox-tests
Change-Id: I9857f265c1cb46832906ef5e6a0c7bb4a092e637
2012-11-19 12:33:40 -06:00