summaryrefslogtreecommitdiff
path: root/nova/tests/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* docs - Prevent eventlet exception during docs generationDavanum Srinivas2014-08-011-1/+7
| | | | | | | build_sphinx has a lot of spurious tracebacks, We don't really need this check for document generation Change-Id: Id9442c5902918592c4c242cc66975062cf9f2461
* Remove vi modelinesliu-sheng2014-02-031-2/+0
| | | | | | | | | | We don't need to have the vi modelines in each source file, it can be set in a user's vimrc if required. Also a check is added to hacking to detect if they are re-added. Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6 Closes-Bug: #1229324
* Remove the monkey patching of _ into the builtinsAlex Gaynor2013-07-261-5/+0
| | | | | | | | Previous _ was monkey patched into builtins whenever certain modules were imported. This removes that and simply imports it when it is needed. Change-Id: I0af2c6d8a230e94440d655d13cab9107ac20d13c
* Fix and gate on E125Joe Gordon2013-07-041-1/+1
| | | | | | | | | | | | | E125 continuation line does not distinguish itself from next logical line. E125 makes code more readable, and fixing all the existing issues allows us to gate on this, making this one less thing reviewers have to check for. Fix was made using https://github.com/hhatto/autopep8 Change-Id: Ie569fd74fb84d220ceb87e37b1b1f39143bba80f
* Import eventlet in __init__.pyMichael Still2013-04-091-0/+20
| | | | | | | | | | | All of this is because if dnspython is present in your environment then eventlet monkeypatches socket.getaddrinfo() with an implementation which doesn't work for IPv6. To turn this off you need to set an environment variable before you do the import. Resolves bug 1164822. Change-Id: I2382db7b3ac4a2d940e0c45dfe3d48f499de2f16
* Move global fixture setup into nova/test.pyMonty Taylor2012-11-221-83/+0
| | | | | | | | | | | | | There are global fixtures that get set up for testing in nova/tests/__init__.py, even though there is a base test class. As we move towards parallel testing, we want to convert all of these into proper fixtures. As a step towards that, move them into nova/test.py so that it's clear that they are part of the global test setup. From there we'll move them into proper fixture classes. Part of blueprint grizzly-testtools Change-Id: Ia0b0ae380069a212bc20e009d1088c2bad7d9177
* Move sql options to nova.db.sqlalchemy.sessionMark McLoughlin2012-11-211-2/+2
| | | | | | | | With a few minor exceptions, the sql config options are used solely within the nova.db.sqlalchemy.session module so it makes sense to move their declaration into that module. Change-Id: Iea9c2bb000cd713b01750ab3e796132ebeaa4ca8
* Use CONF.import_opt() for nova.config optsMark McLoughlin2012-11-201-1/+3
| | | | | | | | | | | | | The only reason for importing nova.config now is where one of the options defined in that file is needed. Rather than importing nova.config using an import statement, use CONF.import_opt() so that it is clear which option we actually require. In future, we will move many options out of nova.config so many of these import_opt() calls will either go away or cause a module other than nova.config to be imported. Change-Id: I0646efddecdf2530903afd50c1f4364cb1d5dce1
* Remove nova.config.CONFMark McLoughlin2012-11-201-1/+2
| | | | | | | | | | | | | | | Modules import nova.config for two reasons right now - firstly, to reference nova.config.CONF and, secondly, if they use one of the options defined in nova.config. Often modules import nova.openstack.common.cfg and nova.config which is a bit pointless since they could just use cfg.CONF if they just want to nova.config in order to reference CONF. Let's just use cfg.CONF everywhere and we can explicitly state where we actually require options defined in nova.config. Change-Id: Ie4184a74e3e78c99658becb18dce1c2087e450bb
* Remove nova.flagsMark McLoughlin2012-11-171-1/+0
| | | | | | | | Now that options have all moved from nova.flags to nova.config, we can safely remove the nova.flags imports and replace them with nova.config imports. Change-Id: Ic077a72dd6419bbf1e1babe71acfa43c4e8b55c8
* Switch from FLAGS to CONF in testsMark McLoughlin2012-11-101-22/+23
| | | | | | | | | | | Use the global CONF variable instead of FLAGS. This is purely a cleanup since FLAGS is already just another reference to CONF. We leave the nova.flags imports until a later cleanup commit since removing them may cause unpredictable problems due to config options not being registered. Change-Id: Ic0168188dfe214fc81af04c8a9644d2d9f31600d
* Remove outdated moduleauthor tagsJoe Gordon2012-10-011-6/+0
| | | | | | | | | The moduelauthor tags are used by the docs to see who wrote what. But many of them are outdated and wrong. fixes bug 1044578 Change-Id: I9cc27430c906d1418faf28e1b53f6306c62e8f98
* Update reset_db to call setup if _DB is None.Dan Prince2012-08-031-0/+2
| | | | | | | | | | | | | | This resolves issues when running individual tests that require a database. With this fix I can once again run individual test modules that make use of the database. For example: ./run_tests.sh test_libvirt Previously this would fail with database errors. Fixes LP Bug #1032738. Change-Id: Icce7ac9414f0e19eece44819a217634947de7f73
* Switch to common logging.Andrew Bogott2012-07-021-2/+2
| | | | | | I only just moved logging from nova to common, so behavior should remain the same. Change-Id: I1d7304ca200f9d024bb7244d25be2f9a670318fb
* Add multi-process support for API servicesJohannes Erdfelt2012-06-281-1/+1
| | | | | | | | | | | | | | | | | Implements blueprint multi-process-api-service This is based on Huang Zhiteng's patch. This patch adds support for running services as multiple processes. This is primarily intended to be used with the API service as a way to provide more concurrency than eventlet can sometimes provide. A SIGTERM or SIGINT signal will cause the parent process to gracefully terminate the child processes, allowing them to finish processing the requests currently being processed. The parent will wait for the children to finish before exiting. Change-Id: Ie6d6802626eb42d5e64c4167be363fbf6cea2a1b
* Imports cleanupZhongyue Luo2012-06-191-0/+1
| | | | | | | | | Fixes bug #1013770 1. Reorder imports by full module path 2. Insert two blank lines after the last import Change-Id: I294ac3ab528f17a72811392d1732158e9487f3bf
* Finalize tox config.Monty Taylor2012-06-071-0/+8
| | | | | | | | | | | | | Shrink tox.ini to the new short version. Fix the test cases to be able to be run in nosetets plus the openstack.nose_plugin, which finally removes the need for nova/testing/runner.py Also, now we'll just output directly to stdout, which will make nose collect the trace logging directly and either output it at the end of the run, or inject it into the xunit output appropriately. Change-Id: I1456e18a11a840145492038108bdfe812c8230d1
* Use openstack.common.cfg.CONF.Russell Bryant2012-06-041-4/+0
| | | | | | | | | | | | Part of blueprint common-rpc. This patch makes the rpc code use the global config object from openstack-common. Based on some recent discussions on the mailing list, this may not be the final way configuration handling is done here, but it is certainly better than the register_opts() hack that is removed by this patch. Change-Id: Id128126e0bc064a2a1c710c6bd32fb3d137dc7f6
* Use cfg's new behavior of reset() clearing overridesMark McLoughlin2012-05-211-0/+1
| | | | Change-Id: Ia363ab3c3c16d4988c2e7f3a73302134698a9b79
* Register fake flags with rpc init function.Dan Prince2012-05-041-0/+1
| | | | | | Fixes LP Bug #994775. Change-Id: I60b6d9b500a9a1dd801919a3b63dc3ddfa291c13
* Compact pre-Folsom database migrations.Dan Prince2012-05-021-2/+3
| | | | | | | | | | | | | | | | Compacts the pre-Folsom database migrations into a single migration (082_essex.py). Pre-Folsom users will need to upgrade to Essex before running any Folsom migrations. Implements blueprint db-migration-cleanup. Testing notes available at: http://wiki.openstack.org/database_migration_testing Change-Id: I64c06a3adcf83d6d723c4c11001544ba97668413
* Refactor nova.rpc config handling.Russell Bryant2012-04-251-0/+3
| | | | | | | | | | | | | | | | | | | | This patch does a couple of things: 1) Remove the dependency of nova.rpc on nova.flags. This is a step toward decoupling nova.rpc from the rest of nova so that it can be moved to openstack-common. 2) Refactor nova.rpc so that a configuration object is passed around as needed instead of depending on nova.flags.FLAGS. This was done by avoiding changing the nova.rpc API as much as possible so that existing usage of nova.rpc would not have to be touched. So, instead, a config object gets registered, cached, and then passed into the rpc implementations as needed. Getting rid of this global config reference in nova.rpc will require changing the public API and I wanted to avoid doing that until there was a better reason than this. Change-Id: I9a7fa67bd12ced877c83e48e31f5ef7263be6815
* Make sqlite in-memory-db usable to unittestHengqing Hu2012-03-171-10/+35
| | | | | | | Move migrate monkey patch from nova.tests.test_migrations to nova.db.sqlalchemy.migration Change-Id: I018e44903558cad6311fd368787583322f962d0c
* Avoid weird test error when mox is missingThierry Carrez2012-02-021-0/+1
| | | | | | | Fail early if you can't import mox, rather than return a cryptic and undecipherable error. Fixes bug 810424. Change-Id: Ie56d3e7447bbba841fdc882cb1f8f70e234812ef
* Separate metadata api into its own serviceVishvananda Ishaya2011-11-151-1/+1
| | | | | | | | | | | | part 1 of blueprint separate-nova-metadata * adds api/metadata/ and moves code from ec2 * moves metadata into separate binary * changes metadata forward to use metadata host and port * moves the metadata accept rule to the metadata api * adds nova-api-* to setup.py Change-Id: I7f5d8e6cafc55b5c383cd88991f29c6059fb8d82
* Add DHCP support to the QuantumManager and break apart dhcp/gatewayBrad Hall2011-11-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This introduces a new flag "quantum_use_dhcp=<boolean>" which indicates whether or not to enable dhcp for all of the networks. If it is set then we start dnsmasq (and provide it with the IP/MACs from Melange) similar to how this was done in linux_net before. Prior to this if you enabled dhcp then you would also get a gateway device.. some people may not want that so we now require that you specify the gateway when creating the network in order to end up with a device that will act as a gateway. If you're using Melange IPAM and you don't specify the gateway you still end up with one because it doesn't allow you to not have one. This lays the groundwork for the option of not having one in the future, at least :) Also, fix quantum/melange ipam interaction We now query for the subnets by net_id/vif_id instead of searching through all the blocks to find the right one. Both of the allocate and deallocate for instance calls are now using the vif_id -> network_id mapping instead of searching the quantum networks. get_port_by_attachment was also changed to take a net_id so that we don't have to search through all of the quantum networks to find the corresponding port. Change-Id: I6a84da35237b6c5f5cdee91ada92642103439a97
* pass in the right argumentJason Koelker2011-07-221-1/+1
|
* allow 2 dns servers to be specified on network createJason Koelker2011-07-211-1/+2
|
* fix testsVishvananda Ishaya2011-07-081-1/+1
|
* update testsVishvananda Ishaya2011-07-051-0/+1
|
* merged trunk, fixed the floating_ip fixed_ip exception stupidityTrey Morris2011-06-291-1/+1
|\
| * only create the db if it doesn't exist, add an option -r to run_tests.py to ↵Vishvananda Ishaya2011-06-251-1/+1
| | | | | | | | delete it
* | forgot a commaTrey Morris2011-06-101-1/+1
| |
* | misc argument alterationsTrey Morris2011-06-101-2/+4
| |
* | pep8 fixesJason Kölker2011-05-311-1/+1
| |
* | Virt tests passing while assuming the old style single nicsCerberus2011-05-261-0/+4
| |
* | port the current create_networks over to the new network schemeJason Kölker2011-05-231-9/+11
|/
* move the deletion of the db into fixturesVishvananda Ishaya2011-02-231-2/+6
|
* use flags for sqlite db names and fix flags in dhcpbridgeVishvananda Ishaya2011-02-231-1/+6
|
* speed up network testsVishvananda Ishaya2011-02-231-1/+2
|
* move db creation into fixtures and clean db for each testVishvananda Ishaya2011-02-231-0/+15
|
* move db sync into nosetests package-level fixtures so that the existing ↵Andy Smith2011-01-181-0/+5
| | | | nosetests attempt in hudson will pass
* Initial i18n commit for endpoints. All endpoints must installjaypipes@gmail.com2010-12-111-0/+5
| | | | gettext, which injects the _ function into the builtins.
* update copyrightsTodd Willey2010-07-151-3/+1
|
* Removed trailing whitespace from headerVishvananda Ishaya2010-06-231-1/+1
|
* Updated licensesDevin Carlen2010-06-231-12/+18
|
* initial commitJesse Andrews2010-05-271-0/+27