summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | to_primitive imposes what seems to be an arbitary data structurePhil Day2013-02-122-3/+36
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | depth of 3, but there is at least on case in Nova (Security group Rules) which requires a depth beyond this. https://bugs.launchpad.net/nova/+bug/1118608 Specifically security_group_rule_get_by_security_group returns a set of rules which have the structure: rule -> grantee_group -> Instance -> Instance_type Rather than just bumping the depth limit, which might break some other user of to_primitive we make it a specific parameter that defaults to the current value but can be over-ridden when required and log a warning when the depth is exceeded Change-Id: I1eaebd484e20cb2eae09a693289709973de9943c
* | Merge "Allow running test in uninstalled source tree."Jenkins2013-02-112-7/+7
|\ \
| * | Allow running test in uninstalled source tree.Monty Taylor2013-02-102-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | It was pointed out that we missed the use-case that running tests in a fresh tree checkout should work - and we missed that by reaching too far into the setup module interface. Shame on us. Change-Id: Ic0056a3113b308f063d927484e1e4a44c9316a2d
* | | Merge "Support testing args for LocalhostMatchMaker."Jenkins2013-02-113-9/+12
|\ \ \
| * | | Support testing args for LocalhostMatchMaker.Eric Windisch2013-02-103-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The matchmaker should return the correct direct topics used by the RPC driver. The LocalhostMatchMaker was always returning 'localhost', even though our tests might use '127.0.0.1' instead. Now, the LocalhostMatchmaker will use whatever value it is told should be considered local. MatchMakerLocalhost and LocalhostExchange now take an optional host parameter. impl_zmq._get_matchmaker now passes arguments to the selected matchmaker module. The test_zmq now initializes the matchmaker, using the host '127.0.0.1' Change-Id: I8daa2c0668f1d717eb95ab56009612b8b60f0a15
* | | | Merge "Add a fixture for dealing with mock patching."Jenkins2013-02-111-0/+51
|\ \ \ \
| * | | | Add a fixture for dealing with mock patching.Monty Taylor2013-02-071-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quantum uses a pattern all over their test base, which can be collapsed down into a simple re-usable fixture. Change-Id: I5944505ce44ce8b79a685c3ea392f001307b5319
* | | | | Merge "Update .coveragerc"Jenkins2013-02-111-0/+6
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Update .coveragercAlessio Ababilov2013-02-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set up proper source and omit options. Change-Id: Ib14ff98218d23db694c1614aa3b4225a8d5dd847 Implements: blueprint update-coveragerc
* | | | | Merge "Implements import_group"Jenkins2013-02-093-0/+56
|\ \ \ \ \
| * | | | | Implements import_groupZhongyue Luo2013-01-313-0/+56
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Created import_group method in cfg.py Added testcases Fixes bug #1107843 Change-Id: I427d4069dacbb6e586687370adbb08b5d50f7b63
* | | | | Merge "Update HACKING.rst per recent changes"Jenkins2013-02-092-4/+11
|\ \ \ \ \
| * | | | | Update HACKING.rst per recent changesZhongyue Luo2013-02-042-4/+11
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added "is not" usage with examples Fixed "not in" usage description https://review.openstack.org/#/c/20576/ and https://review.openstack.org/#/c/20879/ Fixes a previous "not X in Y" grep corner case Change-Id: I92ae642887de734a8562a528003d8092f5ff27d4
* | | | | Merge "Exchanges should return directed topics."Jenkins2013-02-082-4/+24
|\ \ \ \ \
| * | | | | Exchanges should return directed topics.Eric Windisch2013-02-012-4/+24
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exchanges in the matchmaker are supposed to return a directed topic as the first element in returned tuples. Adds a test to ensure this is so. Change-Id: I6c62f325914faa19216d5362c6d8ed0288942110
* | | | | Merge "Allow to_primitive to ignore datetimes"Jenkins2013-02-082-21/+17
|\ \ \ \ \
| * | | | | Allow to_primitive to ignore datetimesJoe Gordon2013-02-072-21/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparation for having nova.db.api not return any sqlalchemy objects. nova.db.api will return only primitives, except for datetime.datetime objects. Uses functools.partial to make code DRYING Partially implements bp db-api-cleanup Change-Id: I9980d8c4e20b05bbe734cf90ac209e4e7e89befb
* | | | | | Use importutils.try_import() for MySQLdbMark McLoughlin2013-02-072-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a common pattern we've adopted elsewhere, so use it here too. Change-Id: I2e0947b4857005b478e796e9c9a7c05ea1f0d926
* | | | | | Fix sorting in test-requiresMark McLoughlin2013-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic45ac7c85dbe2834d7b325ba8babf71429b277b0
* | | | | | Minor tweak to make update.py happyMark McLoughlin2013-02-072-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fairly lame to do this instead of just fixing update.py, but we seem to do it this way everywhere else, so ... Change-Id: Ie1cebcfec57c6138b9b726d7d3bc6e0ea456f146
* | | | | | Remove pointless use of OpenStackExceptionMark McLoughlin2013-02-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of the base exception does nothing for the test but means the "dead module walking" exception module. Change-Id: Ibd7bb8aa526be366f005ab5e12fd4da89a976c57
* | | | | | Remove unused context from test_sqlalchemyMark McLoughlin2013-02-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0b3c7341e91cfc57aed625754bc9bf009ef70b14
* | | | | | Remove openstack.common.db.commonMark McLoughlin2013-02-074-61/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this only contains exceptions that are either used in session.py or utils.py (not both), it seems sensible to move them into the modules where they are used. Also, remove the use of the Invalid base exception class since we don't seem to be making use of the base class anywhere by catching it rather than the more specialized exceptions. Change-Id: Ib05bb2e0a9494e1dc60c60b8eee0e76b5d2ee555
* | | | | | Provide creating real unique constraints for columnsBoris Pavlovic2013-02-072-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Main issue is that we can't create unique constraint for columns, because we are using soft deletion of entries (set `deleted` column to True). The main idea is to use `deleted` columns to create unique constraint for columns. For example (`col1`, `deleted`). To make (`col1`, `deleted`) unique after entry deletion, we should assign the value of `id` to `deleted` column. Change type of `deleted` column from Boolean to table.id.type for all tables. Change models.soft_delete() method to assign table.id instead of True to `deleted` column. Change query.soft_delete() method to assign literal_column("id") instead of True blueprint db-unique-keys Change-Id: Ie1f67f49a5d085e6371efb63fc23a1c8b25d9464
* | | | | | Fix missing wrap_db_error for Session.execute() methodBoris Pavlovic2013-02-072-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should add wrap_db_error for Session.execute() method, because Query.update() method will call Session.execute() and it is not inside Session.flush(), so exceptions from Query.update() wouldn't be wrapped. Add test for Session.flush() wrapper Add test for Session.execute() wrapper Fixes bug 1107890 Change-Id: I96894e502f9f279999b61a1e66469e34a07a022d
* | | | | | Fix eventlet/mysql db pooling codeBrian Elliott2013-02-071-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eventlet versions >= 0.10 return a tuple from db_pool.ConnectionPool().create(), not a scalar. Also, set the FOUND_ROWS client flag, which sqlalchemy appears to require to sanity check the number of rows touch. bug 1097992 Change-Id: I64e798660c506fcd13947a232cb7832db0318360
* | | | | | Add missing DBDuplicateEntryMark McLoughlin2013-02-071-0/+7
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The session.py part of nova's 8835866 was imported, but not the newly added exception. Change-Id: I0d79a8536f0c8f14cb062dc61c5fce100b63fd64
* | | | | Add support for directly stringifying VersionInfo.Monty Taylor2013-02-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | glanceclient, and others, want to have a __version__ member in their top-level __init__.py. This leads to attempting to process the version information to realize the string at import time, rather than at request time. If we make VersionInfo a thing which can behave like a string, then, we should get the things we want without the operational weirdness. Change-Id: I3eb15006f50ed1155c85977aaae842677c5ec4bc
* | | | | Merge "timeutils: considers that now is soon"Jenkins2013-02-062-7/+12
|\ \ \ \ \
| * | | | | timeutils: considers that now is soonJulien Danjou2013-01-312-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to Doug suggestion at https://review.openstack.org/#/c/20323/2/openstack/common/timeutils.py Change-Id: Ic318202234202e56054df1b5cc7f82a404c307bc Signed-off-by: Julien Danjou <julien@danjou.info>
* | | | | | Merge "Emit a warning if RPC calls made with lock."Jenkins2013-02-064-59/+130
|\ \ \ \ \ \
| * | | | | | Emit a warning if RPC calls made with lock.Michael Still2013-02-064-59/+130
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch will log a warning every time a RPC call is made while a lock is held if the caller has requested it. This should help us track down performance problems such as the security group refresh problem recently found in nova. RPC calls can emit a warning if called with check_for_lock=True and debugging is turned on. Sneaks up on bug 1063222. Change-Id: Ice94093efb3cb95dd58b31d6ba817c7d505c15af
* | | | | | Merge "Be explicit about set_default() parameters"Jenkins2013-02-061-2/+4
|\ \ \ \ \ \
| * | | | | | Be explicit about set_default() parametersMark McLoughlin2013-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We probably only want to support people using set_defaults() for a limited set of config options, so explicitly list those as parameters to the method. This is what we do for rpc and log options too. Change-Id: I3bfc5355e82eec17480b9547662e847dc0d74138
* | | | | | | Merge "Remove duplicate DB options"Jenkins2013-02-061-6/+0
|\| | | | | |
| * | | | | | Remove duplicate DB optionsMark McLoughlin2013-02-051-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql_dbpool_enable and sql_connection_trace are declared twice. Looks like this was a merge conflict when sql_dbpool_enable changed from int to bool. Change-Id: I553c5beea916e0ee296648342324fd53167c073a
* | | | | | | Merge "Eliminate gratuitous DB difference vs Nova"Jenkins2013-02-061-3/+2
|\| | | | | |
| * | | | | | Eliminate gratuitous DB difference vs NovaMark McLoughlin2013-02-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like this was an abritrary cleanup done as part of the import. It conflicts with a more recent change in Nova. We can move to using try_import() once we've killed the Nova copy of this code. Change-Id: I5c67d3fbd846a262feb724e26b14447a76561ae6
* | | | | | | Merge "Import sqlalchemy session/models/utils"Jenkins2013-02-0612-0/+1122
|\| | | | | | | |/ / / / / |/| | | | |
| * | | | | Import sqlalchemy session/models/utilsEric Windisch2013-02-0512-0/+1122
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring in session, base model, utilities, and tests for sqlalchemy from Nova. Add sqlalchemy to pip-requires and and python-mysql to test-requires. Partially implements blueprint common-db Change-Id: I3e0065cdac87e10c4e0742d66c293c72bb3acbb2
* | | | | Merge "Allow tools/install_venv_common.py to be run from within the source ↵Jenkins2013-02-052-0/+11
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | directory."
| * | | | Allow tools/install_venv_common.py to be run from within theJosh Kearney2013-02-052-0/+11
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source directory. Not doing this raised exceptions when it tried importing modules that didn't exist in the path. Change-Id: I10e02cd9ce6beb8fdf822dd397688450ac6981a1
* | | | Merge "Mark password config options with secret"Jenkins2013-02-052-2/+4
|\ \ \ \
| * | | | Mark password config options with secretMichael J Fork2013-02-042-2/+4
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Config object supports masking values when writing out if the secret flag is set on the option definition. This change flags all oslo-incubator options containing a password. Change-Id: I78451c4fdfdb3d6e28a7bd5f35d1c4c9a1b2be99
* | | | Merge "Only unpack replies on caller."Jenkins2013-02-051-22/+18
|\ \ \ \
| * | | | Only unpack replies on caller.Eric Windisch2013-01-311-22/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Opening the messages is unnecessary in ZmqProxy, given that the msg_id is already in the (zmq-specific) message envelope. Additionally, by not opening the messages, we save a bit of complexity. This avoids having to deserialize and reserialize messages in ZmqProxy, a necessary improvement for trusted-messaging and should also have a markable performance benefit. Also cleans up msg_id handling a bit. Change-Id: I31f365b9e1040503206b1d8320a0266a8121c821
* | | | | Merge "Use bytes instead of str"Jenkins2013-02-051-4/+3
|\| | | | | |/ / / |/| | |
| * | | Use bytes instead of strEric Windisch2013-01-311-4/+3
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarifies that str is the wrong datatype for passing messages over ZeroMQ. This distinction will be more important with the eventual migration to Python 3.0, but (I hope) this also helps clarify WHY typecasting is performed before sending messages. Change-Id: I4dd4661a5730a24ba7b514520b0429b721b05e9c
* | | Support for ipv6 in wsgi.ServiceDavanum Srinivas2013-02-032-4/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable wsgi.Service to listen on ipv6 address by checking if the host specified is ipv6. Based on that set the appropriate family in the eventlet.listen api More tests for just the ipv6, ipv6 with app, ipv6+ssl with app to make sure everything is working fine Change-Id: I2772905128bdbc69dd0fafe4ced848f5c477d7c8
* | | Merge "Support for SSL in wsgi.Service"Jenkins2013-02-026-5/+324
|\ \ \