35 Commits

Author SHA1 Message Date
bhagyashris
42d2a33fb4 Fix python 2,3 compatibility issue with six
ConfigParser is available in python2 but not in python3.
ref:http://www.diveintopython3.net/porting-code-to-python-3-with-2to3.html

Change-Id: Icf47e18c31a6fabf3584aead054ebd4c669a2574
2016-06-21 20:14:26 +05:30
Eric Harney
aab94fb905 Add pylint tox env
Run pylint with
 $ tox -e pylint

(Copied from Cinder with minor changes.)

Change-Id: I9d7f03c44c6da7515b433d6c87f3a1645184d491
2016-04-07 12:57:10 -04:00
Chaozhe.Chen
9e60e4a592 Fix some flake8 violations
1. Wrong use of 'noqa'. "# flake8: noqa" option disables all checks
for the whole file.
2. Remove exclusion of 'tools' and '*openstack/common*' in flake8 and
fix the violations.

Change-Id: I153e992ffd6a80e70a99d7066c503c34326c93ab
Closes-bug: #1540254
2016-02-09 20:28:30 +08:00
yatin karel
e2afc016b2 bash_completion now shows only subcommands when subcommand is "help"
Options and subcommands are filtered. Now Only subcommands are shown
when subcommands is "help". Both subcommands and options are shown
when subcommand is other than "help"

Change-Id: Iad9def1b2909af33fd23b0c89559b8de30fa6547
Closes-Bug: #1399747
2015-03-17 14:21:48 +00:00
Jenkins
338755aa17 Merge "Add auth_plugin support to cinderclient" 2014-04-17 17:20:40 +00:00
Cory Stone
d5334aa929 Add auth_plugin support to cinderclient
With CINDER_RAX_AUTH being rightfully removed, cinderclient is no longer
compatible with Rackspace/any non-keystone auth. To fix this, I stole
auth_system/auth_plugin from novaclient's implementation.

See https://review.openstack.org/#/c/23820/.

Change-Id: If5f84003f868ef02bb7eb7da67cf62018602e8f0
Closes-Bug: 1280393
2014-02-14 15:09:44 -06:00
Jay S. Bryant
803f0f69a6 Remove vim header
Making this change for python-cinderclient to be consistent
with Cinder.  The same change was made to Cinder via
commit ff3f2e5735f0d486b72b6881b05ace94d6d34d03 .

Partial-bug 1229324
Change-Id: I69fb960f499f0c9a9c9671d46d10170477cf6695
2014-02-12 10:18:09 -06:00
Jay S. Bryant
165ba7bc5b Remove call to undefined install.post_process()
Oslo commit b5cca99e5281d9c0c5eda444137e418b31209c45 removed
the obsolete redhat-eventlet.patch.  Part of this commit
removed the post_process() method which we were still calling
in tools/install_venv.py .  The post_process function was just
there to do any distro-specific post processing.  By default,
that was nothing.  So, this is safe to remove.

This same change was made to python-novaclient with
commit 0194492059920fd8d9d91849c341b2de0b561089 .

Closes-bug: 1275025
Change-Id: I4c52e2c0d3d6553f5d33e94cd6e8622160febc37
2014-02-12 09:07:07 -06:00
Swapnil Kulkarni
c5b5646f9e Sync up with oslo-incubator
be81d6b Cleanup unused log related code
e53fe85 strutils bool_from_string, allow specified default
12bcdb7 Remove vim header
12d3bbc Add method quote_plus in module py3kcompat.urlutils
afdbc0a Fix E501 in individual openstack projects

Oslo Version:
8dee4b6 Merge "remove extra newlines that eventlet seems to add"
Thu, 23 Jan 2014 14:26:42 +0530 (08:56 +0000)

Change-Id: I7348e797a4a78ec20dff77ebdbb41bb8c6068b34
2014-01-26 16:13:11 +05:30
Chuck Short
b0b8afaf55 python3: Refactor dict for python2/python3 compat
Python3 changed the behavior of dict.keys such that it is now
returns a dict_keys object, which is iterable but not indexable.
You can get the python2 result back with an explicit call to list.

Refactor list(*.keys()) so that it just uses list().

Change-Id: Ib2e9646ac967e9bd7cc4f47e2099f5d1358808a9
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-10-11 09:04:49 -04:00
John Griffith
945b211cd0 Synch up with OSLO-Incubator
Wanted to get updates before next push to pypi.

The main thing driving this is we're now calling in
some methods from strutils and gettextutils that don't
have the py33 updates.

Change-Id: I358f08f5c5c0a9ee6729947a8f01b1e96de0a729
2013-10-02 14:53:45 -06:00
Chuck Short
7b08b98a3b Sync strutils from oslo
Sync strutils from oslo. Also import apiclient,
gettextutils, and importutils.

Change-Id: I565fd2cf40f2ea21842c6dbd581430b25d99fea6
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-08-14 11:48:34 +00:00
Monty Taylor
a26044f6d7 Sync install_venv_common from oslo
Change-Id: I1649a8e777baf288b3aa4c2c29e2fe532dfe93be
2013-07-05 23:22:30 -04:00
Chuck Short
3044671b36 python3: Fix traceback while running tests
The testsuite is full of the following:

TypeError: 'dict_keys' object does not support indexing

This is due to the fact in python3 dict methods dict.keys(),
dict.items() and dict.values() return “views” instead of lists.

Change-Id: Ifa5383e6485fdbabf363fd1442877b2452346c1c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-19 20:52:22 -05:00
Chuck Short
4b1cdab2fe python3: Basic python3 compatibility.
Basic python3 compatibilty.

Change-Id: I4388f5956cf397f8e33d20085aae6c6a728dbbda
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-12 07:59:44 -05:00
Chuck Short
d12d7a73ff python3: compatibility for iteritems and iterkeys
Use six to allow python2/pyton3 for iteritems and
iterkeys.

six.iteriems() replaces dictionary.iteritems() (python2)
and dictionary.iterms() (python3)

six.iterkeys() replaces dictionary.iterkeys (python2)
and dictionary.keys() (python3)

Change-Id: I26c80b78a7dedf3aa32eedf01a83ff6d1e592ba7
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-11 13:29:13 -05:00
John Griffith
2e58e73a0c Update run_tests and bring back colorizer.
This patch adds output of tests and their results to run_tests.sh.
It also brings back colorizer to the output and updates the test-requirements.

Should align with cinder changes that are in progress
at: https://review.openstack.org/#/c/30291/

Change-Id: I3df6d861f4b4d4355464ceb2d507e69bcf682fbe
2013-05-31 13:45:13 -06:00
Monty Taylor
c82a811301 Rename requires files to standard names.
Fixes bug 1179008.

Change-Id: I6765bb82df1ae672790662a30ee3527450685036
2013-05-20 14:32:32 -04:00
Monty Taylor
aa2808337b Migrate to pbr.
Fixes bug 1179007.

Change-Id: I66b78ec4b5ba70a1bf1e375a5d1b7575a1879730
2013-05-20 14:32:22 -04:00
Monty Taylor
24b4039bae Migrate to flake8.
Fixes bug 1172444.

Change-Id: Ia063ec67de9e6061ce38b948c9eb60b5589c7bb4
2013-05-18 09:19:53 -07:00
John Griffith
c83e4a4ba9 Pin prettytable versions
pip-requires doesn't have any restrictions on prettytable.
We should match up with the pinned version in other projects.

In addition to avoid this problem in the future updated simplejson
to match openstack/requirements as well.

Change-Id: Iabf7ee8b0fd253447d1a65bc1b12906d26176286
2013-04-03 09:17:11 -06:00
Mark McLoughlin
d290b92753 Remove unused tools/rfc.sh
This has been deprecated in favour of git-review for quite a while now
and was removed from Nova 10 months ago.

Change-Id: Ic4bfa1aee3a4b6a7588be3678ac033a1b13e2b18
2013-03-25 21:59:37 +00:00
Chuck Short
8d43cd9c01 Allow requests 0.8 and greater
Bump up version requirements for requests to standardize
on version >= 0.8 so it doesnt create conflict with other
openstack projects.

Change-Id: I1ed9b3bd6bdbbbb451298a3c397e6e7a06c0cabd
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-02-11 13:00:48 -06:00
Monty Taylor
02eb985124 Move from nose to testr.
Granted - this takes the test suite from 3 seconds to 1 second... but there
are a bunch of other ways (correctness) that testr is better than nose.

Removed tests/v1/utils - it was not being used anywhere.

Part of blueprint grizzly-testtools.

Change-Id: I54d9a0b7dc22305ec60d779d6f19025a0b5dc785
2013-01-17 14:42:52 -05:00
Monty Taylor
06acb0c009 Move from unittest2 to testtools
Part of blueprint grizzly-testtools

Change-Id: I13e068ca156f12114eaa3a65bdb557e4eb2c988d
2012-12-24 23:39:32 -06:00
Dean Troyer
82e47d0866 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: I71066ff7297f3b70c08b7ae1c8ae8b6a1b82bbae
2012-12-18 13:58:05 -06:00
Chuck Short
62eb92a1f2 Pin pep8 to 1.3.3
Apart of making pep8 version standard across all openstack
projects.

Change-Id: If5ef6be394e557b3554a80f1ad9b44d472c273b6
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-11-20 09:42:14 -06:00
Jenkins
08aa9659c9 Merge "Add nosehtmloutput as a test dependency." 2012-08-30 14:47:04 +00:00
Vincent Hou
f885e8bade Add the test environment for the virtualenv.
Resolve Bug1037422.

Change-Id: Ib36ff6eff6e84af25a8d799173524ced9e6d5d06
2012-08-22 16:21:29 +08:00
Clark Boylan
d92d0b06a4 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: I439fc9742762e626610a7b0774ed1274cf38ceb7
2012-08-21 14:32:58 -07:00
Chmouel Boudjnah
ac7d98b84f Rename bash completion file from nova to cinder.
Change-Id: I4bcdb482149271253e12f43fb85a663b5c938a14
2012-08-09 14:18:49 +00:00
Chuck Short
1a32f024ce Bump pep8 to 1.2
Align it with outher openstack projects.

Change-Id: I71a4b3303a354c0483c5da6a786ee6ae39388c77
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2012-07-20 12:24:25 +00:00
John Griffith
93f9fa75fa Set pep8 version to 1.1 in test_requires
* Fixes bug 1007520
* Changes in pep8 cause new failures

Change-Id: Ie678f01a5008b0df6ef43a360b599890cab40776
2012-06-15 13:56:39 -06:00
Monty Taylor
1711f1f9bb Align setup.py and tox with standards.
Change-Id: Ic63c6fd4d770303ae5f295c58e43213e88e34b57
2012-05-21 16:44:06 -04:00
Jenkins
471704df64 Initial split from python-novaclient. 2012-05-21 16:32:35 -04:00