summaryrefslogtreecommitdiff
path: root/trove/tests/unittests/datastore
Commit message (Collapse)AuthorAgeFilesLines
* Support datastore version number for creating instanceLingxian Kong2020-11-182-36/+21
| | | | | | | | | | | * Support version number for datastore version flavor and volume type association commands. * Support 'version_number' parameter for creating instance. Story: 2008358 Task: 41264 Change-Id: I0e30194d65dcaa595b8927e2b9d5f8ec8c4300de
* Image tags support in datastore versionLingxian Kong2020-10-094-82/+79
| | | | Change-Id: I0e51d08515c121e3a7b0e82b6e4c4161bb4fbc4a
* Use unittest.mock instead of mockHervé Beraud2020-06-111-2/+2
| | | | | | | | The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: I7b97fab683e45118327b93c776f8c487feab7374
* Use unittest.mock instead of third party mockSean McGinnis2020-04-261-1/+1
| | | | | | | | Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I44ac9a021a0bc3249b86f252b53cee3c8059f185 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Use dedicated service credential configLingxian Kong2019-10-101-2/+2
| | | | | | The current admin credential config options are confusing Change-Id: I92c15c065edf364b955f2243b3599e0b8cae8b4f
* Replace assertRaisesRegexp with assertRaisesRegexValencia Serrao2017-12-062-9/+9
| | | | | | | | | This replaces the deprecated (in python 3.2) unittest.TestCase method assertRaisesRegexp() with assertRaisesRegex() Added hacking rule 'assert_raises_regexp' Change-Id: Ie427bfd5af8474119a9e20cc025cd28abfa42cc2
* Merge "Associate datastore, version with volume-type"Jenkins2017-04-112-3/+128
|\
| * Associate datastore, version with volume-typeMatt Van Dijk2016-12-192-3/+128
| | | | | | | | | | | | | | | | | | | | | | Cinder supports multiple volume types and volume types can be explicitly requested in create requests. This change allows users to restrict the allowed volume types for a given datastore/version in a manner similar to flavors. Co-Authored-By: amrith <amrith@tesora.com> Change-Id: I790751ade042e271ba1cc902a8ef4d3c3a8dc557 Implements: blueprint associate-volume-type-datastore
* | Fix module-instances commandPeter Stachowski2017-02-271-0/+39
|/ | | | | | | | | | | | | | | | Fixed the module-instances command to return a paginated list of instances. Also added a --count_only flag to the command to return a summary of the applied instances based on the MD5 of the module (this is most useful for live_update modules, to see which ones haven't been updated). Also cleaned up the code a bit, putting some methods into files where they made more sense (and would cause less potential collisions during import). Change-Id: I963e0f03875a1b93e2e1214bcb6580c507fa45fe Closes-Bug: #1554900
* Fixing misstyposEdu Alcaniz2016-07-061-1/+1
| | | | Change-Id: Ie047ea689fd733690e6387e0764809c88183a8fd
* Use correct message for missing default datastoreTrevor McCasland2016-06-211-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | The error message when trying to create an instance with a non-existent default datastore was misleading: ERROR: Datastore 'mysql' cannot be found. (HTTP 400) This is now more descriptive: ERROR: Please specify datastore. Default datastore 'mysql' cannot be found. (HTTP 400) If no default datastore is defined, the message is: ERROR: Please specify datastore. No default datastore is defined. (HTTP 400) If the user specified a datastore, then the regular error message is returned. A new exception DatastoreDefaultDatastoreNotDefined was created and DatastoreDefaultDatastoreNotFound modified to take 'datastore' as an argument. Change-Id: I0b7856864bfecfe3173e42cf098ad759ec8334a2 Closes-Bug: #1331408
* Corrected error message for unsupported datastore flavorsSaurabh Surana2015-10-121-7/+12
| | | | | | | | 1. Passing correct variables on raise exception 2. Updated the error message Change-Id: Ia1a302b30b1d7a269d96c41680964404128cfdc3 Closes-Bug: #1496846
* Associate flavor types with datastore versionsRiddhi Shah2015-08-112-0/+86
| | | | | | | | | | | | | This feature provides the ability to associate flavor types with datastore versions.The trove-manage util will provide the ability to add or delete this information. All nova flavors are permitted for a datastore-version unless one or more entries are found in datastore_version_metadata, in which case only those are permitted. partially implements blueprint associate-flavors-datastores Change-Id: Ib012401f89d07c502f93d5ee1cd4abb6b738953a
* Fixes hacking rulesSushil Kumar2015-05-293-6/+7
| | | | | | | | | | | | | | | | | This patchset helps reducing the ignored pep8 errors. Fixed some ignored hacking rules, as listed follows: - E111 indentation is not a multiple of four - E122 continuation line missing indentation or outdented - E123 closing bracket does not match indentation of opening bracket's line - E128 continuation line under-indented for visual indent - E251 unexpected spaces around keyword / parameter equals - E265 block comment should start with '# ' - E713 test for membership should be 'not in' - H105 Don't use author tags - H306 imports not in alphabetical order Change-Id: Iadf2af4f6ec90420153ad63b5a41650392ef2cbd
* Update modules to turn on dangling mock detectionPetr Malik2015-05-121-5/+4
| | | | | | | | | | Make all test suites in the api, configuration, instance, network, mysql, router, quota, db, and datastore modules extend 'trove_testtools.TestCase' to enable dangling mock detection. Co-Authored-By: Peter Stachowski <peter@tesora.com> Change-Id: If9326709d76972d66fb40b4984bbb5214b0c5189 Partial-Bug: 1448273
* Corrects order of parameters to assertEqualSushil Kumar2015-04-301-3/+3
| | | | | | | | | | | The correct order of parameters to assertEqual is (expected, actual). It makes the assertion message more meaningful when there is a failure. Change-Id: I1ad41bcbec30442785f4cdabb234980e336312d5 Closes-Bug: #1277104 Partial-Bug: #1445131
* Correct a test and order of parameters to assertEqualAmrith Kumar2015-02-232-4/+4
| | | | | | | | | | | | | In debugging a failing test (test_update_heartbeat) I observed that the test was asserting incorrect values and also that the order of parameters to assertEqual were inverted. It appears that the order of parameters to assertEqual is a more widespread problem. The correct order makes the assertion message more useful. Change-Id: Ide9f60f8338398ad8e61ad81f4a30058e415f8e9 Closes-Bug: #1424741 Partial-Bug: #1277104
* Adds the foundation for datastore capabilitiesKaleb Pomeroy2014-05-294-6/+183
| | | | | | | | | | | This allows for capabilities to be set in the mysql database capabilities table and associated to datastores with the datastore_capabilities table. This allows users to have datastore specific functionality that is configurable and able to be served to end users. This commit is for the groundwork for the capabilities API. Change-Id: I7153d435bf8c00dc2a874a66c7a2b64e8fbafa09 Partially-Implements: blueprint capabilities
* adding configuration group supportCraig Vyvial2014-02-062-0/+28
This allows users to make custom configurations groups and apply them to multiple instances. Configuration parameters that can be set are listed in the validation_rules.json file. implements blueprint configuration-management Change-Id: I99b0bfe51c131ace30774e75e30d620101ed2e0b