| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
One code change, rest are in headers
Change-Id: I73f59681358629e1ad74e49d3d3ca13fcb5c2eb1
|
|
|
|
|
|
|
|
|
| |
Using the BaseTestCase across the tests in the tree lets us put in log
fixtures and consistently handle mox and stubout.
Part of blueprint grizzly-testtools.
Change-Id: Iba7eb2c63b0c514009b2c28e5930b27726a147b0
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On the path to testr migration, we need to replace the unittest base classes
with testtools.
Replace tearDown with addCleanup, addCleanup is more resilient than tearDown.
The fixtures library has excellent support for managing and cleaning
tempfiles. Use it.
Replace skip_ with testtools.skipTest
Part of blueprint grizzly-testtools.
Change-Id: I45e11bbb1ff9b31f3278d3b016737dcb7850cd98
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a new (simple) importutils.try_import function which
can return a module name or a default (by default this is None).
This should help clean up some of our
try:
import foo
except...
blocks in modules.
This commit also drops the dependency on python-extras which is
no longer needed.
Fixes LP Bug #1099501.
Change-Id: I8591f79983bdad67a50d1aaae6dce8428dfce084
|
|
|
|
|
|
| |
also,this patch turns off pep8 E125 check.
Change-Id: I22d2a94d89530586d614af39af17ae542c5e0cbf
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To support bp:virt-driver-cleanup, there is a desire to have shorter
driver strings (i.e. libvirt.LibvirtDriver instead of
nova.virt.libvirt.LibvirtDriver). One way to support this is with
a new import_object variant that takes a namespace to load from.
If the code fails to load the driver in the prefered namespace it
will also try loading the full driver path, before throwing an
exception.
Change-Id: Ib97c92f38685ca89f29890f8015fc413acc744f8
|
|
|
|
|
|
|
| |
Add realistic tests including objects with and without args to
importutils.
Change-Id: If23db5ef80cdfa4be95e95b90e647ac2455fffc8
|
|
|
|
|
|
|
|
| |
This patch removes the usage of common.exception from
common.importutils. Instead of raising exception.NotFound() from
importutils.import_class(), just use the built-in ImportError.
Change-Id: I95e84908d1f80c5ca3bbac049eda8faa64212ae0
|
|
Fix bug 972859.
Prior to this patch, utils.import_object(foo) and
utils.import_class(foo) would return the same thing if foo was the path
to a class. This patch changes utils.import_object() to return an
instance of the class, instead, also allowing you to pass in arguments
to the constructor.
This patch also removes the odd behavior of import_object() to be able
to also import a module. Instead, a new function import_module() has
been added.
Finally, the three import helpers have been moved to a new module,
importutils.
Change-Id: Ia2ea64c965692f8c3a29adec332dd93a83980070
|