Commit Graph

71 Commits

Author SHA1 Message Date
Ghanshyam Mann 952d2892e2 Fix hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

Also removing the hacking and other related dep from lower-constraints file
as theose are blacklisted requirements and does not need to be present
there.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: Icad3221eddcc5f4e3b17f7d11266d938d1ea6201
2020-05-15 10:49:51 -05:00
Sean McGinnis 2b8282bb1e
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: Ib83e626f51e6e01898bb7931c1660a1a548500f3
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 11:59:46 -05:00
Andreas Jaeger e96e99f1ec Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
2020-03-31 13:33:41 +02:00
ZhijunWei 463eab47e4 Update hacking version
1. update hacking version to latest
2. fix pep8 failed

Change-Id: I49a6d46466b06bd56bed1f15632c9c80ef539b38
2019-01-02 23:57:05 +08:00
Vu Cong Tuan 1fd406d533 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: I9bfb80f2556ca7c801dde69d1685751169e25307
2018-07-30 09:08:15 +07:00
Nguyen Hai 3c70f8f69e Follow the new PTI for document build
- Follow new PTI for docs build
- Add sphinxcontrib.apidoc to replace pbr autodoc

REF:
https://governance.openstack.org/tc/reference/project-testing-interface.html
http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html
http://lists.openstack.org/pipermail/openstack-dev/2018-March/128594.html

Change-Id: I078e2ed32da04303203d6c2a3e498f82b9a15939
2018-04-21 11:37:53 +00:00
OpenStack Proposal Bot 0e6c017c6d Updated from global requirements
Change-Id: I5428b7f4f4f57511a6f60e654811b66152119ee4
2018-03-23 01:54:33 +00:00
OpenStack Proposal Bot 8f5f328977 Updated from global requirements
Change-Id: I2d9b7ccba2d1a57f10988488f5899f2f5e6d6bae
2018-03-15 08:06:06 +00:00
OpenStack Proposal Bot 26425a6bfd Updated from global requirements
Change-Id: I3e068f6888e7be53645fea5d31e983197b212a5d
2018-01-24 01:33:38 +00:00
OpenStack Proposal Bot 3bc58e7eaf Updated from global requirements
Change-Id: Ia6b449d83d44d34f26d32a8071afa4386fd50321
I941090320ec464c2f61cae4eb80979542261bb49
2018-01-18 03:32:23 +00:00
OpenStack Proposal Bot 0552a0bec1 Updated from global requirements
Change-Id: I10be649c8683405b652067547ab39ec16e755da3
I941090320ec464c2f61cae4eb80979542261bb49
Ia6b449d83d44d34f26d32a8071afa4386fd50321
2018-01-16 13:02:57 +00:00
OpenStack Proposal Bot 51037c8037 Updated from global requirements
Change-Id: If8791552165fd5ed4985b383d7bf904e6cb4fb60
2017-11-16 11:27:04 +00:00
OpenStack Proposal Bot ec8b8991cc Updated from global requirements
Change-Id: I2759a64e0274fd7652872c8556537471c2971cf7
2017-11-03 18:08:17 +00:00
OpenStack Proposal Bot a397f72da4 Updated from global requirements
Change-Id: I66375afca6a4a016c9282dfae12b4941736f9768
2017-08-18 11:42:40 +00:00
Jenkins 13e0ed08fb Merge "Drop pycrypto from tests dependencies" 2017-07-28 04:11:42 +00:00
OpenStack Proposal Bot c959defd02 Updated from global requirements
Change-Id: I38ee16f82c75f3878afad2b96d710559883a9f03
2017-07-27 20:33:45 +00:00
Jenkins 555ba5ed69 Merge "Update the trove docs to follow the docs theme" 2017-07-18 21:38:55 +00:00
Haikel Guemar d512e4763d Drop pycrypto from tests dependencies
pycrypto is unmaintained for a while and requirements team advises using
pycryptodome or cryptography libraries instead (see openstack-dev thread
[0]).

troveclient uses pycrypto to generate random data/content in its tests
which does not require any specific cryptographic need. This commit
replaces it by os.urandom from Python standard library.

[0] http://lists.openstack.org/pipermail/openstack-dev/2017-March/113568.html

Change-Id: Ia43c5883a51e8412c4a238d127c13db39e863da1
2017-07-18 18:56:15 +02:00
OpenStack Proposal Bot e450fdb689 Updated from global requirements
Change-Id: I46fead1abc28215113351c1b888ff00c92981be8
2017-07-14 13:07:54 +00:00
Trevor McCasland b9a20edf92 Update the trove docs to follow the docs theme
We were using the old theme on trove docs.

We should update to new theme, it includes the new logo as well!

You can see the difference in the themes here,

new, https://docs.openstack.org/admin-guide/
old, https://docs.openstack.org/developer/python-troveclient/

Change-Id: If5ff925d258f7b4008aff32b1677d7806395b5c9
2017-07-13 10:59:55 -05:00
OpenStack Proposal Bot 2ce6814b5f Updated from global requirements
Change-Id: Id35444edc3284d4cf296067c73db2ef232763cfb
2017-06-10 21:49:22 +00:00
OpenStack Proposal Bot 70da3725f4 Updated from global requirements
Depends-On: I2f2a12207581a94fb8561a6d65a3a79b4a29b063

Change-Id: I9eb71eab2b58b84ee60507d6d473cda883129fa3
2017-05-26 20:25:25 +00:00
OpenStack Proposal Bot b738d74738 Updated from global requirements
Change-Id: I6e79ad39b6f5e3a34ca290b82afbcb211829fdd2
2017-05-06 16:10:17 +00:00
OpenStack Proposal Bot 2779af756a Updated from global requirements
Change-Id: I1e47988eb6cd2bf156ba2391539ab4ad871cd180
2017-04-07 06:16:56 +00:00
ricolin 4139774157 [Fix gate]Update test requirement
Since pbr already landed and the old version of hacking seems not
work very well with pbr>=2, we should update it to match global
requirement.
Partial-Bug: #1668848

Change-Id: I65da7e4a99aa42f0025c1e767d0bad39412fdb33
2017-03-02 20:15:52 +08:00
Trevor McCasland 4eebd56786 Add OpenStackClient plugin and flavor list
This change adds database support to the python-openstackclient
through a plugin and tests.

The support can be demonstrated through the implementation of
the trove command flavor-list which is now:
    openstack database flavor list

Use the -v or --debug flag to see the calls being made to the correct
flavor list function.

ubuntu@ubuntu:~$ openstack database flavor list -v
START with options: [u'database', u'flavor', u'list', u'-v']
command: database flavor list -> troveclient.osc.v1.flavors.ListFlavors
Using auth plugin: password
+-----+-----------+-------+-------+------+-----------+
|  id | name      |   RAM | vCPUs | Disk | ephemeral |
+-----+-----------+-------+-------+------+-----------+
|   1 | m1.tiny   |   512 |     1 |    1 |         0 |
|   2 | m1.small  |  2048 |     1 |   20 |         0 |
|   3 | m1.medium |  4096 |     2 |   40 |         0 |
|   4 | m1.large  |  8192 |     4 |   80 |         0 |
|  42 | m1.nano   |    64 |     1 |    0 |         0 |
| 451 | m1.heat   |   512 |     1 |    0 |         0 |
|   5 | m1.xlarge | 16384 |     8 |  160 |         0 |
|  84 | m1.micro  |   128 |     1 |    0 |         0 |
|  c1 | cirros256 |   256 |     1 |    0 |         0 |
|  d1 | ds512M    |   512 |     1 |    5 |         0 |
|  d2 | ds1G      |  1024 |     1 |   10 |         0 |
|  d3 | ds2G      |  2048 |     2 |   10 |         0 |
|  d4 | ds4G      |  4096 |     4 |   20 |         0 |
+-----+-----------+-------+-------+------+-----------+
END return value: 0

Change-Id: I308a6c6f3f5ce7dbb814ec0fd8ecb1734a2f137f
Partially-Implements: trove-support-in-python-openstackclient
2017-01-11 16:07:45 -06:00
OpenStack Proposal Bot f2435453f3 Updated from global requirements
Change-Id: I3a33bbeda3086a4e5dd6e79dfc80e50052743c97
2016-11-15 00:56:03 +00:00
OpenStack Proposal Bot c4d9ebb66d Updated from global requirements
Change-Id: I1e354412fa15c6f0b8a97b6ec092b9d03002cf47
2016-11-02 03:11:08 +00:00
OpenStack Proposal Bot ad8be62ebc Updated from global requirements
Change-Id: I1fd7e0ae5333438e619f8201b0573bb4cfb0c9de
2016-09-30 20:06:28 +00:00
Tony Xu a9bfc7b409 Add fixtures to test-requirements
This module is be used

Change-Id: I0ce94d99425741b040a9f5a59cfb09329eb0a831
2016-09-22 23:18:55 +08:00
Swapnil Kulkarni (coolsvap) 419caf0248 Remove discover from test-requirements
It's only needed for python < 2.7 which is not supported

Change-Id: Idfc1677ca01853993e21f4c8aa50a9be66c32203
2016-07-21 17:04:28 +00:00
OpenStack Proposal Bot 1656eed356 Updated from global requirements
Change-Id: I519af1cbb731902beccd111632252002a820ba41
2016-06-25 20:26:46 +00:00
OpenStack Proposal Bot 8184bc6692 Updated from global requirements
Change-Id: I92f339efd6b77a229c5e9219c53dc609f7887fee
2016-06-21 18:05:59 +00:00
OpenStack Proposal Bot 8728faea48 Updated from global requirements
Change-Id: I89d5fe849ac47d59eb0c117280b7b78a9ef31519
2016-05-26 17:05:52 +00:00
OpenStack Proposal Bot a280080f7c Updated from global requirements
Change-Id: If82e40913fbc6c3a176888c169c1526a746ad7dd
2016-04-14 02:38:34 +00:00
Peter Stachowski 553e3041e8 Add reno for release notes management
Add reno to generate release notes for the Trove client.

Change-Id: I8e475e1148ec32f9beb3398ecbb5effccd7ea4fb
2016-04-08 00:45:49 +00:00
OpenStack Proposal Bot 1324cf2085 Updated from global requirements
Change-Id: Idc6db3319f660138c74297d59d464a9cd83162da
2016-03-16 13:33:06 +00:00
Peter Stachowski 457360c69f Client support for instance module feature
This adds support in the python API and Trove CLI
for instance module commands.  These commands include:

    - module-apply
    - module-remove
    - module-query
    - module-retrieve
    - module-list-instance

The parsing of --instance was modified to allow multiple
modules to be specified.  This was extended to 'nics' as well.

Partially Implements: blueprint module-management
Change-Id: If62f5e51d4628cc6a8b10303d5c3893b3bd5057e
2016-03-11 18:10:50 -05:00
Jenkins fd3d348ada Merge "Updated from global requirements" 2016-01-27 19:22:33 +00:00
OpenStack Proposal Bot 2be08006b3 Updated from global requirements
Change-Id: I0fa56501666064fe865b51b0d79c7a0449da6fff
2016-01-26 23:29:18 +00:00
ting.wang e9e4c142b4 use oslotest to break into the debugger when running test cases
Once we add debug testenv, we can use "tox -e debug" to debug test cases
when tox is running. Then tox will use oslotest which really debug our
test cases.

Only we should do is insert pdb into code.It's easy to use.

The same in trove:
https://review.openstack.org/#/c/265524/

usage link:
http://docs.openstack.org/developer/oslotest/features.html

Change-Id: I93709451af9a14fc9c71e1c3306a1a025aee8b44
2016-01-21 12:57:03 +00:00
OpenStack Proposal Bot c488961e9d Updated from global requirements
Change-Id: I4ab4b7f31227701b664db348c50fa01a305c1cfe
2015-12-01 06:10:23 +00:00
OpenStack Proposal Bot fd81067589 Updated from global requirements
Change-Id: Ia03d0d5f1812ee66e0f08fc416d9c599a60478fd
2015-07-22 04:59:56 +00:00
OpenStack Proposal Bot 2598641234 Updated from global requirements
Change-Id: I025ac552e2a6d48aeaff1de8a0e6979f978d6232
2015-07-12 15:22:33 +00:00
OpenStack Proposal Bot 0702365088 Updated from global requirements
Change-Id: I43505ec0ecf807e48726e8bd94b414bba93999b5
2015-06-22 20:00:41 +00:00
Sushil Kumar 61a756a014 Added more unit-tests to improve code coverage
Following files were too low on code coverage,
so the coverage has been enhanced with addition of more unit-tests.
- troveclient/client.py
- troveclient/v1/shell.py

The methodology to test shell.py has been motivated from the
one used by python-novaclient to test novaclient/v2/shell.py

Also, found an unmocked entry in test_secgroups.py,
which was causing intermittent failure while
writing the tests for shell.py.

Closes-Bug: #1455856
Change-Id: I6a148fb5caad6a83b6ac23411b6458f231064ead
2015-06-08 10:51:40 +00:00
Sushil Kumar 025191af50 Fixes new hacking rules
Updated the hacking version as per global-requirements.

Fixed some of new appearing hacking rules, as listed follows:
- E128 continuation line under-indented for visual indent
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H238  old style class declaration, use new style (inherit from `object`)

Rules which are not yet fixed have been incorporated to ignorelist
- H405 Multi line docstrings should start with a one line summary
       followed by an empty line
- H501 Do not use locals() or self.__dict__ for formatting strings

Change-Id: I885c6fa8ad0e6a98f7a8479f3441ed08ed2cbaa6
2015-05-26 08:58:51 +00:00
Doug Hellmann 738479e6e1 Uncap library requirements for liberty
Change-Id: I6a8a07f07aac313f23ab50c930718b9bb4cd89f2
Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
2015-04-16 18:13:46 +00:00
OpenStack Proposal Bot de77518186 Updated from global requirements
Change-Id: Id7f2a4b7fe8ae4c7401ad0227e4341dc7a2152b8
2015-03-21 00:18:07 +00:00
OTSUKA, Yuanying 6991168726 Add coverage library
`tox -ecover` is failed because of lack of necessary library. This adds it.

Change-Id: I7dc6b5e46335b770e31aaa9f02522a5eeb401114
2015-03-10 10:22:52 +09:00