Commit Graph

6 Commits

Author SHA1 Message Date
Takashi Kajinami bff8d41370 Use importlib instead of imp
... because the imp module is deprecated since Python 3.4 .

Closes-Bug: #1937904
Change-Id: Ia3f83df336fd243c25f7471d56a44370c11bb5e1
2021-08-16 09:55:38 +09:00
Doug Hellmann 109d41e722 use stevedore to load extensions
Importing pkg_resources causes the app to scan the entire import path
for all distributions, not just those providing entry points. The
scanner in stevedore will have a cache of the entry point data, making
it significantly faster. This will be especially useful in command
line programs like python-openstackclient.

Change-Id: Ic5eb9401c8ea3bd9624b818e0ffb8dcc13f61559
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2020-07-08 08:53:07 -04:00
Takashi Natsume 7ef2c28bf3 Use unittest.mock instead of third party mock
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: I4d45ae17f6f84f945f5dd049a929216ce6b6b58e
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2020-04-26 10:12:09 +00:00
Matt Riedemann ac7c96690f Remove deprecated tenant network APIs
These were deprecated in Newton:

aaebeb05a0

Since this is the last of the deprecated contrib extensions,
we can also deprecate the 'only_contrib' parameter from the
novaclient.client.discover_extensions method.

Change-Id: Ie2e3fdc4e044f6eb304724d16a7d0f1f7ba705fd
2017-03-20 16:36:58 -04:00
kylin7-sg 02c04c5658 Make _discover_extensions public
Heat uses `novaclient.shell.OpenStackComputeShell._discover_extensions`
function, which is private currently. It's better to change this method
to public for public use.

Change-Id: I15879d56db2ec88a9bef99b6af8924ebd4ad169b
Closes-bug: #1440779
2015-05-06 14:10:59 +08:00
Joe Gordon 3561772f8b Move unit tests into unit test directory
In order to pave the way for functional testing, move existing unit
tests into a directory labeled unit. A subsequent patch will add a
directory for functional tests.

Change-Id: I0adb8b9f14451acb382c725d31f5387b4b6d82bb
2015-01-27 13:06:06 -08:00