Commit Graph

42 Commits

Author SHA1 Message Date
Stephen Finucane 5cb16aebcc Use pre-commit for 'pep8' tox target, bump versions
We want to bump the versions of hacking, but doing so requires changes
in two places: '.pre-commit-config.yaml' and 'tox.ini'. This is silly:
we can simply use tox to handle pre-commit and leave all other
dependencies to pre-commit. Do this, migrating bandit to pre-commit and
bumping the other dependencies in the process.

We remove the 'fast8' target and tool, since pre-commit is plenty fast
here.

Change-Id: Ifdc582ecc3b4479ea9ed9abcb16577c6e8b2f5c1
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2023-05-10 10:51:00 +01:00
Monty Taylor 8b32b53a0f
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: Ie7c06ead39c8597ec9326f223625d1fa0d5208d1
2017-12-01 10:26:50 -06:00
Andreas Jaeger 9962403d3c Cleanup after install
Tox tests are run on developer machines and on long lived slaves. We
should not leave lots of directories like
/tmp/python-openstackclient-tox_install-sdnltRu lying around.

Instead delete the temporary directory after our run.

Remove also an obsolete comment.

Change-Id: I939eae82dba3287fd4e4086128ebf4609a0e0770
2016-08-28 08:48:23 +02:00
Andreas Jaeger ea5a8dd80b Fix post and periodic jobs
The usage of zuul-cloner in tox_install breaks post and periodic jobs.
Update the script, it does not need to handle unconstrainted installs
anymore (see tox.ini). There's no need to set ZUUL_BRANCH explicitely
- it's set via the environment and branch is passed in as well.

Note that this script is needed for the edit-constraints call, add a
comment.

Change-Id: I0077c986a17d6bb92791474e03d1e77776e9382f
Closes-Bug: #1615430
2016-08-22 12:19:39 +02:00
Steve Martinelli e2a9fd29c1 Follow upper constraints for all tox targets
With the exception of releasenotes and cover, we should follow
upper constraints. The tox_install file was copied over from
python-neutronclient [1].

[1] http://git.openstack.org/cgit/openstack/python-neutronclient/tree/tools/tox_install.sh

Change-Id: I633fa149820efafd7b2acec0388fa8bc8d06c988
2016-07-17 17:01:52 +00:00
Sheel Rana 095edbc367 Pep8 environment to run on delta code only
Currently tox -epep8 will run flake8 on whole code.
To make this fast, flake8 support is added for only
updated(delta) code.

Same can be run by "tox -efast8".

Change-Id: I9c55fed32ae3060c21ec278398e9e07fb4a0fe13
Implements: BP tox-pep8-diff-part-only
2016-05-12 00:55:10 +05:30
Steve Martinelli d6fa242818 Remove references to venv
Stick to using tox, remove the tools directory since it only
contained references to using venv. Also update a few other
locations that would have otherwise been incorrect.

Change-Id: I7d3e9067256ac0935f07904abcf584d898ac1d6f
2015-04-24 02:15:36 -04:00
Steve Martinelli a368983705 sync oslo bits
update gettextutils.py, strutils.py, install_venv_common.py
remove iniparsers.py

oslo-incubator commit 1223cf

Change-Id: I23923d580f57ab6c12622f10d9f278c44c863feb
2014-06-20 16:18:33 -04:00
Dean Troyer 99cea54741 Update oslo incubator bits
* update gettextutils.py, strutils.py, install_venv_common.py
* remove cfg.py, openstackkeyring

oslo-incubator commit 630d3959b9d001ca18bd2ed1cf757f2eb44a336f

Change-Id: I0ae9b9dc72ec88ed64a8c353b9c51734ee2cd24c
2014-02-20 14:09:01 -06:00
Terry Howe 12f31eed2f Closes-Bug: #1262321
Remove the unimplemented post_process method call

Change-Id: Iaed526cc25a651008a66ad7f0050070ab2b4c595
2013-12-19 20:06:54 -07:00
Dean Troyer fa649f4654 Sync oslo-incubator for py33 fixes
Change-Id: I261ec6bb34b29169ba3547305deab051f85a3d4d
2013-10-11 11:59:05 -05:00
Monty Taylor 4022e41c64 Sync install_venv_common from oslo
Change-Id: I0a57c658e0f89d13963862013793e12ae208c05b
2013-07-05 22:31:15 -04:00
Zhenguo Niu bac0718764 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: I903213fda94a833335abaa7ad9a90bbb688ec15a
Fixes: bug #1179008
2013-05-29 17:38:13 +08:00
Monty Taylor d49fcb726d Migrate to pbr.
Fixes bug 1179007

Change-Id: Ief74b121dcad28bb1c2b6044ef72e0cbd51e8f65
2013-05-16 10:36:08 -07:00
Monty Taylor 967d929207 Migrate to flake8.
Fixes bug 1172444

Change-Id: Ieca721663aea2fd31753df4abfb5b01a7145b26a
2013-05-16 10:36:02 -07:00
Josh Kearney 6da61e03f0 Adds image `create` and `delete` functionality.
We use the V1 API for `create` since it does not
yet exist in the V2 API in glanceclient.

For blueprint glance-client.

Change-Id: Ifa819c14f6a013f4530d16247a671e5a1c740a28
2013-04-23 14:09:20 -05:00
Steve Martinelli 7072b4f802 Add Cinder API V1 Support
made the changes suggested by dtroyer
added client
modified setup.py entry points
updated pip required
added support for create/delete/list volume types
openstack list type
openstack create type typeName
openstack delete type typeNameOrId

Change-Id: I43655de151582e37f14dc9550151a66db7a009ab
2013-02-08 10:22:01 -06:00
Jenkins 50ceef8fb7 Merge "Sync latest openstack-common." 2013-02-06 17:41:17 +00:00
Josh Kearney b675ca4f7f Sync latest openstack-common.
This fixes an issue when trying to run install_venv from within
the source directory.

Change-Id: Id4dcb070319ec52d0a1b466e911fbfdf805db613
2013-01-31 17:35:47 -06:00
Josh Kearney b26cb5bf68 Upgraded to PEP8 1.3.3 to stay aligned with Nova, etc.
Made all the necessary changes to pass new PEP8 standards.

Also cleaned up docstrings to conform to the HACKING stanards.

Change-Id: Ib8df3030da7a7885655689ab5da0717748c9edbe
2013-01-31 13:31:41 -06:00
Josh Kearney 67bba28ed1 Use install_venv_common.py from oslo.
This syncs install_venv_common.py from oslo and reworks the
tools/install_venv.py script to use the new library.

Change-Id: I3426a7f51b0018e074cc6f4b1d70b38e52464a38
2013-01-29 16:12:21 -06:00
Josh Kearney 63c8bb5306 Migrate from nose to testr.
Run tests with testr for parallel execution.

Part of blueprint grizzly-testtools.

Change-Id: I560592186f2f440049a451a32e58067262ab62d0
2013-01-22 12:16:09 -06:00
Josh Kearney c1ea298904 Clean up test environment and remove unused imports.
First round of adding more complete unit test coverage.

Change-Id: Ic1979c499ca6fcb784892a95954a3527539c4e53
2013-01-22 11:44:18 -06:00
Jenkins 6037133f44 Merge "Move from unittest2 to testtools" 2013-01-15 23:54:20 +00:00
Dean Troyer fe3123b802 Move from unittest2 to testtools
Change-Id: I475a082af0660e0ee0e86ca4cd1bf0e2d711e3ed
2013-01-15 15:59:59 -06:00
Jenkins c6755d5c2a Merge "bug 1091029" 2012-12-27 17:39:52 +00:00
Henry Nash e7585624ac Increment minimum required keystoneclient version number
The movement of auth_token from keystone to keystoneclient is part
of the updated 0.2 version of keystoneclient.  The server still
maintains an import back from the client for backward compatibility.
However, in order to support this, installations must upgrade to
the latest 0.2 version of the client.

Change-Id: I1ed1ebebbd56b2ed9c035c9e7d83783c8b2ae5fc
2012-12-27 11:33:27 -06:00
Jenkins 541895994f Merge "Remove upper bounds on openstack dependencies." 2012-12-27 17:24:16 +00:00
Ben Andrews 0fe3efaacb bug 1091029
sets version that pip can use for pyparser to one that is for python 2.X. 2.0.0 is only for python 3

Change-Id: Ief16981b5e2c7d8716fdf77e15998cc9ffae9779
Fixes: bug #1091029
2012-12-16 20:48:36 -05:00
James E. Blair 2fad9aa0f6 Remove upper bounds on openstack dependencies.
Change-Id: Ib2980bc219aba66cfdbc67b7fc4eafbf6501ef23
2012-11-16 16:38:03 -08:00
Dean Troyer c49b049af8 Add cliff prereqs
The real issue is cmd2 not pulling in pyparsing properly on a fresh system.

Change-Id: I9bae29f9a664431d0145ebc5a0cc4caec638d739
2012-09-06 11:26:11 -05:00
Jenkins a5aa06c92f Merge "Keyring support for openstackclient." 2012-08-22 20:49:54 +00:00
Clark Boylan 5bf17126b9 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: I9f7bdf848aeb0fee727da9cd3b651b3a3ce53182
2012-08-21 14:37:29 -07:00
Bhuvan Arumugam f0cefcc77d Keyring support for openstackclient.
Bug: 1030440

If password is defined in keyring, use it; otherwise, prompt for the
password. Keying is configured using command line switch,
--os-use-keyring or env(OS_USE_KEYRING).

* openstackclient/common/openstackkeyring.py
  The abstract class for keyring, specifically for openstack. The
  class is used to store encrypted password in keyring, without
  prompting for keyring password. The encrypted password is
  stored in ~/.openstack-keyring.cfg file.

* openstack-common.py
  Update openstackkeyring library from openstack.common.

* openstackclient/shell.py
  OpenStackClient.build_option_parser(): New boolean argument,
   --os-use-keyring, default to env(OS_USE_KEYRING).
  OpenStackClient.authenticate_user(): Get password from keyring,
  if it is defined; otherwise, prompt for the password. If user
  enter a password and keyring is enabled, store it in keyring.
  OpenStackClient.init_keyring_backend(): New method to define
  openstack backend for keyring.
  OpenStackClient.get_password_from_keyring(): New method to
  get password from keyring.
  OpenStackClient.set_password_in_keyring(): New method go set
  password in keyring.

* toos/pip-requires
  Define keyring and pycrypto as one of dependent.

Change-Id: I36d3a63054658c0ef0553d68b38fefbc236930ef
2012-08-15 12:13:36 -07:00
Monty Taylor b04d7a988c Use PyPI for client libs.
Change-Id: I1a77f2a5973053de0e45b815359ff2fa42318682
2012-07-02 18:27:24 -04:00
Monty Taylor 99586e05d7 Add post-tag versioning.
Change-Id: I98e5f7aa788b1ab1a866b21e0a17a63b8d5efae3
2012-06-25 11:31:49 -05:00
Dean Troyer f9aa3f3c84 Create tests for shell interface
* use unittest2
* shell: command-line options

Change-Id: I558fb10b8607e4f6e5c44d5fcac902546a8748a4
2012-06-22 10:20:04 -05:00
Lorin Hochstein c4d00b1798 Moved test related packages to test-requires
Change-Id: Ib4a4394b279188aa969c504b52b19c26746a97e1
2012-05-16 11:56:28 -04:00
Dean Troyer 70b3246a19 Add Identity to ClientManager
* Make the Identity client in identity.client.make_client()
* Auth via ClientManager.identity
* Skip extra auth roundtrip in compute client

Change-Id: I0190639e38f83997c233195f6cc27ff3afdfba10
2012-05-04 16:37:18 -05:00
Doug Hellmann 5e4032150d Fix "help" command and implement "list server" and "show server"
blueprint client-manager
blueprint nova-client
bug 992841

Move the authentication logic into a new ClientManager class so that only commands that need to authenticate will trigger that code.
Implement "list server" and "show server" commands as examples of using the ClientManager, Lister, and ShowOne classes.

Change-Id: I9845b70b33bae4b193dbe41871bf0ca8e286a727
2012-05-04 09:35:40 -04:00
James E. Blair 95c2f27fa4 Add openstack-common and test infrastructure.
Fix pep8 errors (project is pep8 clean now).

Update setup.py to use openstack-common style dependencies.

Remove the unused novaclient dependency.

Change the keystoneclient dependency to a git URL.

Add test-requires, and move some pip-requires dependencies
into it.

Remove the test_utils unit test which wasn't testing anything
that is actually present in the project.

Add the test_authors unit test.

Use tox for running tests locally.

See: http://wiki.openstack.org/ProjectTestingInterface

Tox can manage virtualenvs, and is currently doing so for running
tests in Jenkins. It's just as, or more, useful for running tests
locally, so this starts the migration from the run_tests system to
tox. The goal is to reduce duplicate testing infrastructure, and
get what's running locally on developer workstations as close to
what is run by Jenkins as possible.

Run_tests.sh will now call tox to facilitate the transition for
developers used to typing "run_tests.sh".

Developers will need tox installed on their workstations. It can
be installed from PyPI with "pip install tox". run_tests.sh outputs
those instructions if tox is not present.

New facilities are available using tox directly, including:

tox -e py26 # run tests under python 2.6
tox -e py27 # run tests under python 2.7
tox -e pep8 # run pep8 tests
tox # run all of the above
tox -e venv foo # run the command "foo" inside a virtualenv

The OpenStack nose plugin is used when running tox from the
command line, so the enhanced, colorized output is visible to
developers running the test suite locally. However, when Jenkins
runs tox, xunit output will be used instead, which is natively
understood by jenkins and much more readable in that context.

Change-Id: Ib627be3b37b5a09d3795006d412ddcc35f8c6c1e
2012-04-28 22:27:34 +00:00
Dean Troyer f4b5ef39f6 First commit 2012-04-18 13:16:39 -05:00