Commit Graph

65 Commits

Author SHA1 Message Date
Vu Cong Tuan 32a3244bb4 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: I55060b1d99b9a00b20c98fbb429d072568265695
2018-07-16 15:43:48 +07:00
Andreas Jaeger aede01a0a8 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I7f06c0be47f57a9c1ee3cadc7328b1b1b138b3cd
2017-12-02 16:52:17 +00:00
Stephen Finucane e77cf002f0 tools: Remove dead script
This is no longer the recommended way to do things. Just remove it.

Change-Id: I2056169955b47e08993461012edb554d3311de40
2017-08-07 12:24:55 +00:00
Matt Riedemann c7162854f7 Use upper-constraints when running tox
This is basically a copy of the template used in oslo.messaging
under change 78f113780510b741bc974c69eb9b0718cd657c1d.

Change-Id: I8be883215f27abb58d15b85e8542cbdf32000bac
2016-11-29 11:33:42 -05:00
bhagyashris 8751475a25 Removed unused 'install_venv' module
TrivialFix

Change-Id: I022ca5831e9e4d66b1cc2d6f895a1ad709fedefb
2016-08-24 11:40:31 +05:30
Ronald Bradford 7e7e5525d2 Removed unused Oslo Incubator code
This is part of graduating projects to using Oslo Libraries.
As this code is not actually used, it is simply removed.

Change-Id: Ib28a957d9a4622064ec5da2ae616ac6f0716bcbf
2016-03-22 18:31:21 -04:00
Bo Wang 0105fd1206 Use # noqa to ignore one line but not whole file
"# flake8: noqa" option disables all checks for the whole file.
To disable one line we should use "# noqa".

Closes Bug: #1540254

Change-Id: I34c8a2218f974cd7e78c60e9c1fec26751c4e82d
2016-02-02 01:03:06 +08:00
Chuck Carmack 81f8fa655c Remove python 2.6 support from python-novaclient
Since oslo is removing support for python 2.6, nova
needs to also remove support from clients and libraries.
This commit is to remove support from python-novaclient.

-- Python 2.6 compatibilty code was removed.
-- Python 2.6 was removed as a tox environment, install venv,
and from the classifiers in setup.cfg.
-- Release notes have been updated.

UpgradeImpact

Co-Authored-By: Andrey Kurilin <andr.kurilin@gmail.com>

Change-Id: I3f587ff38d478d075af5fd014e2b4b8416e185d4
Closes-bug: 1518390
2015-11-30 16:04:24 +00:00
Sean Dague 9a06348f47 add pretty_tox to nova functional tests
debugging tests is a lot easier when you can actually inject stderr
directly through even on successes. Add the pretty tox facility from
nova / tempest-lib into python-nova client as well for functional
tests.

Change-Id: I5c1f8244a5c743b590b74a8eb3eaf4a699555644
2015-02-23 17:22:10 -05:00
Andrey Kurilin f9ac34d9e8 Sync latest code
Modules from oslo-incubator already switched to use graduated
libraries (oslo.i18n, oslo.serialization and oslo.utils), so we
should sync latest code and remove outdated modules (gettextutils,
importutils, strutils).

NOTE:
 - module novaclient.openstack.common._i18n should be used only in
   common code
 - module novaclient.i18n designed for usage in novaclient

Latest commit in oslo-incubator:
  21985931a95981eabf1030ead60ae4d210bcd9c0

Synced changes for tools/install_venv_common.py:
  fe3389e Improve help strings

Other synced changes:
  55ca7c3 Split cliutils
  5d40e14 Remove code that moved to oslo.i18n
  3edbfb3 remove caching param from prettytable call
  6ff6b4b Switch oslo-incubator to use oslo.utils and remove old modules
  9eee5d0 Merge "Delete the token and endpoint on expiry of token of client"
  f76f44c Delete the token and endpoint on expiry of token of client
  ed0ffb8 Do not incur the cost of a second method call
  cf449e2 Fix response_key parameter usage in BaseManager
  d73f3b1 Remove unused/mutable default args
  e7d26a6 Merge "Centralize bash-completion in Novaclient"
  b4e098e Merge "Handle non-openstack errors gracefully"
  5e00685 Centralize bash-completion in Novaclient
  4ef0193 Handle non-openstack errors gracefully
  ac995be Fix E126 pep8 errors
  de4adbc pep8: fixed multiple violations

Change-Id: I5f3015ebcbc665a2089ec88629e15ba336aee504
2014-10-16 01:26:48 +03:00
Victor Morales 0194492059 Removed undefined method in install_env.py file
There was a call from install_venv.py file to post_process method
of InstallVenv class, but this method is not defined in this class
as result it was raising an error. Even when this error doesn't
affect dependencies installation, it is not allowing to display user
information.

Change-Id: I499c0399eb961588d7e1491e1481412ffdda38b8
Closes-Bug: #1275025
2014-01-31 11:33:54 -06:00
Sahid Orentino Ferdjaoui a5195c5033 Updates nova client to use the latest oslo files
This patchset updates modules based on the config file:
openstack-common.conf

Notes: Some corrections has been added to work with
new files.
  + utils.py: The method safe_decode from strutils.py
    was updated and it is now not necessary to check for
    decode string with py33.
  + base.py: base64 needs a 8-bit string for py33
  + test_shell.py: stdin.encoding is needed for strutils

Change-Id: Iebe474f1226f8b5faa7fb5722e65f41b80d1973c
Related to blueprint common-client-library-2
Closes-Bug: #1265473
2014-01-23 18:08:03 +00:00
Jenkins 51a37b157a Merge "Fix tab-completion of --flags under OS X" 2014-01-12 06:11:22 +00:00
Sahid Orentino Ferdjaoui 0ddcf11732 Removes vim configuration headers
- Removes vim headers: It's not needed to set tabstop tons of times,
   this can be done by setting vimrc.
 - I did not update files in common/* and install_venv_common.py because
   these files are sync with oslo.

Note:
  http://lists.openstack.org/pipermail/openstack-dev/2013-October/017353.html

Closes-Bug: #1265474
Change-Id: Ia09dc2c908187a756bf55eaba74655484304517d
2014-01-08 08:13:46 +00:00
Rick Harris f196ed0176 Fix tab-completion of --flags under OS X
--flags were not tab-completing under OS X. This was due to the whitespace
collapsing regular expression using the '+' token (meaning one-or-more), which
isn't supported in OS X's version of sed.

Using the more portable '  *' instead of '[  ]+' fixes this.

Additional cleanups

* Remove unecessary embedding of tabs in the file (nova bash-complete doesn't
  emit tabs, so the regular expressions don't have to handle them)

* Restore logic to exclude -h from tab-completion (was lost in last
  tab-completion cleanup)

* Add similar exclude logic for -i

Fixes bug 1266667

Change-Id: I7e1fe8382d9b5295d0bbc1cde2b89550d5a4e21c
2014-01-07 01:51:58 -06:00
Chuck Short 626c480559 Update oslo
Update gettext, striutils, timeutils and install_venv_common
from oslo.

Change-Id: Ibd9067e3e2be335ef75f0e4a5e4000d143030ab7
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-08-15 09:17:08 -04:00
Jenkins da711d56d2 Merge "Adds zsh completion" 2013-07-16 20:05:49 +00:00
Monty Taylor a5558f8780 Sync install_venv_common from oslo
The current version of install_venv_common uses the --distribute flag
in its creation of the virtualenv. This causes some upgrade problems
with the new versions of distribute and setuptools. The solution to
those problems is to get off of the distribute bandwagon.

Change-Id: I5efe196c46b12d88c853f8362ebcbf0cc6f1573d
2013-07-08 15:22:39 -04:00
Daniel Wallace 2770e059e9 Adds zsh completion
Use nova bash-completion to add native zsh completion using built in
parameter expansion.  Nothing spectacular or new, this is mostly so that
zsh users do not need to autoload bashcompinit just to use nova.

Change-Id: I56f62f036e0c85e79197f4c7dfd25abf7eb4110a
Implements: zsh completion
2013-06-28 20:39:28 -05:00
Dirk Mueller 67c80558b1 Start using Hacking and PyFlakes
Only blacklisting those warnings that are numerous,
so that in principle Hacking and PyFlakes warnings
are tested. Fix the easy ones alongway.

Change-Id: I571f51ebf570ac114509f2dcd71cdce281e7c70a
2013-06-01 15:49:51 +02:00
Monty Taylor 3bbdcda9d2 Rename requires files to standard names.
The python community groks requirements.txt and test-requirements.txt as
reasonably standard files. We should use those filenames to make our
information more discoverable.

Fixes bug 1179008

Change-Id: I50a7c46f880e4257fa31d7d322d7bf70b0f5d3a6
2013-05-25 08:23:12 +02:00
Monty Taylor 9d4db6f740 Migrate to flake8.
Fixes bug 1172444.

Change-Id: I0d8faa0819738456a28aaf5cc859f510a2b3ed68
2013-05-25 08:22:39 +02:00
Roman Podolyaka f08ac04a27 Migrate to pbr.
openstack.common.setup and openstack.common.version are now in the
standalone library pbr, so all projects using those two should
migrate.

Fixes bug 1179007.

Change-Id: I7ac1c37f0bf148619dffff8f454db05fc192e471
2013-05-19 10:00:38 +03:00
Chris Krelle 54d4b1d355 Update tools/pip-requires for prettytable
changes pip-requires from:
    prettytable>=0.6,<0.7
to:
    prettytable>=0.6,<0.8

Change-Id: Ic04d38078ad06e43947b5e98b26576a4c51dbbb0
Authored-by: Chris Krelle <nobodycam@gmail.com>
2013-03-22 12:48:14 -07:00
Davanum Srinivas c5b579926f Fix Copyright Headers from LLC to Foundation
follow the lead from nova and oslo projects

Change-Id: I270c5f1e4eefa4b72e292bfb4a4c60de0c3f6e4a
2013-03-13 20:12:23 -04:00
Alessio Ababilov efafde0c4c Use keyring for testing
Mention keyring in test-requires as in python-keystoneclient.
So, keyring support is enabled in shell.py and tested.

Change-Id: Icb712a07b995b47b286ed0528e04ae1d5ec195d2
2013-03-11 21:33:41 +02:00
Thomas Schreiber 68e6af73ba A minimum of Python3 fixes so that installation works without errors/warnings.
Fixes bug: 1130937
Change-Id: I740652fcd5804fc1c120fc409afdf4693c8e5781
2013-02-20 23:17:49 +01:00
Sascha Peilicke c73afa9fd1 Update to requests >= 0.8
The requests module dropped all configuration with the 1.0.0 release.
There's no danger_mode and no 'verbose'' mode. The former
shouldn't be necessary anymore and the latter can be done by setting
a different log handler for the request.logging root logger.

Change-Id: Iec169ef6e39097814cdbf1b777bc0590236692ba
2013-02-11 12:49:28 +01:00
Joe Gordon 96630b8248 Upgrade to pep8 1.3.3
Also expand scope of what is covered by pep8 test

Change-Id: Ifc8924914b5a0d625bc8df6442ee85eb21459cde
2013-02-01 12:24:19 -08:00
Jenkins 1e1d95d559 Merge "Fix bash completion on osx" 2013-01-30 23:45:32 +00:00
Monty Taylor 7b2097e706 Migrate from nose to testr.
Run tests with testr for parallel execution.

Part of blueprint grizzly-testtools.

Change-Id: I38e8a2df12678002e19264a53bad26e80265c6e4
2013-01-29 14:22:42 -06:00
Vishvananda Ishaya 364ef418b4 Fix bash completion on osx
The osx version of sed does not support \s so replace uses of it
with [ 	] and clean up the regex a bit.

Change-Id: Ic6fd2e4234352ddb8ec70d42b44ad00a3906db0e
2013-01-25 15:46:01 -08:00
Monty Taylor 53aee5cf4b Move from untitest2 to testtools.
Use testtools as the base testclass. Use fixtures library for managing
fixtures.

Part of blueprint grizzly-testtools

Change-Id: Iac5af286b988787acf7049344641aadf140b9398
2013-01-03 11:58:13 -08:00
Dean Troyer aa1df04bad Use requests module for HTTP/HTTPS
* Implement correct certificate verification
* Add --os-cacert
* Rework tests for requests

Pinned requests module to < 1.0 as 1.0.2 is now current in pipi
as of 17Dec2012.

Blueprint: tls-verify

Change-Id: I9a25a94c8dfcaf483c4c8328439809d65cf10b38
2012-12-20 13:04:46 -06:00
Akihiro MOTOKI b6e14300ca Fix a wrong substition for '-h' in bash completion
Fix bug #1087808

Change-Id: I4b90e892997105027076428c5f3dd8c42b682cb2
2012-12-08 03:28:23 +09:00
Jenkins 66ea8f9bfb Merge "Fix usage-list date range to use UTC time" 2012-09-05 21:58:31 +00:00
Mark McLoughlin f2d2e4cb06 Fix usage-list date range to use UTC time
Fixes bug #1045456

The date range in Nova's os-simple-tenant-usage is expected to be in UTC
time since launch/termination dates are stored in the DB in UTC time and
we use the client supplied parameters to query DB without conversion.

Switch from using datetime.today() to datetime.utcnow() to fix the issue.

Add a test for the default date range.

Import timeutils from openstack-common so we can control the return value
of utcnow() in the tests.

Change-Id: Iac77e3a4cc9561714d1492c54cef931f9764531e
2012-09-03 20:13:31 +01:00
Clark Boylan bad092f350 Add nosehtmloutput as a test dependency.
Adding nosehtmloutput as a test dependency allows nose to output its
results to an html file. This will be used by Jenkins to save logs on
a different server.

Change-Id: Iab55c018b0f41d9ffabd931329ab487df8ab9cae
2012-08-21 14:36:36 -07:00
Monty Taylor 41ce1b839a Relex prettytable depend to match glanceclient.
Change-Id: Ic820a3cef791455a78e2aaa9e20c7ee42bed33a8
2012-07-26 12:08:04 -05:00
Sascha Peilicke c3f295729e Install test-requires in development venv.
Otherwise ./run_tests.sh may fail

Change-Id: Id37117a2dfd53144b8f062767afcf17825fd5d6e
2012-07-09 17:31:34 +02:00
Dominik Heidler 44038f3397 don't bash-complete the '-h' option
Change-Id: Iafd424355167883a10048a0fc0ed13515186a047
2012-06-27 11:53:57 +02:00
Monty Taylor 24ad114d3b Cleanup of setup.py usage of openstack-common.
Change-Id: Id74cd3aec982b84851ce84bbb5207d86da04bc63
2012-06-26 11:04:48 -05:00
Jenkins d263f1f7b8 Merge "Lock prettytable dep at v0.6" 2012-06-11 18:00:11 +00:00
Brian Waldon 7745b35b69 Lock prettytable dep at v0.6
Specifically set the prettytable dependency so we can reliably
align data in table cells.

Change-Id: I1787c4100248b2a75405df690931110c76803413
2012-06-11 09:57:03 -07:00
Josh Kearney 051aa3d7dd Removed generate_authors.sh since it's no longer used.
Change-Id: I2ad9b4c77323baa0f4aef444e84fb93781cf7886
2012-06-11 11:44:46 -05:00
Brian Waldon af634abb1e Lock pep8 at v1.1
We can't depend on pep8 not to add new rules and break our tests.

Change-Id: Iac5c79f7c00fcaeff3ef957d138754d63425a256
2012-05-24 07:13:16 -07:00
Jenkins d15f216b2d Merge "make nova bash-complete faster and more accurate" 2012-05-23 14:52:05 +00:00
Monty Taylor cb8eea4875 Align tox.ini with standards.
Change-Id: Iab112bae0187d025b9b0b6c88208d6706093a184
2012-05-16 13:55:04 -04:00
Dominik Heidler c949513469 make nova bash-complete faster and more accurate
- cache output of "nova bash-complete"
- distinguish between flags and commands (based on already typed text)

Change-Id: I85bd1c2198eef222540cf12063a3b233b0d6db12
2012-05-16 09:54:43 +02:00
Brian Lamar d6d7386fad Update unittests to be Python 2.6 compatible.
Fixes bug 980504 by introducing unittest2 module into novaclient.

Change-Id: I613665eb174598a162795cec737078f960adc4cf
2012-04-13 01:23:14 -04:00