687 Commits

Author SHA1 Message Date
Steve Martinelli
eed19c835f move old apiclient code out of openstack/common
As part of the first community-wide goal [1], teams were asked
to remove the openstack/common package of their projects
if one existed. This was a byproduct of the old oslo-incubator
form of syncing common functionality.

The package, apiclient, was moved to a top level location
and cliutils was moved to the common module. There are no oslo
specific libraries, the recommended solution is to move it
in tree and maintain it there.

Specifically in this patch, I also rearranged some of the
imports to make them match up with the hacking guidelines
while I was re-ordering them for the refactor anyway.

Lastly, the apiclient/fake_client.py was deleted since it
was not used.

[1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html

Change-Id: Ib7b691240b819c9c91b100ca47ffaba75b281c78
2016-11-10 10:02:08 -05:00
OpenStack Proposal Bot
c4d9ebb66d Updated from global requirements
Change-Id: I1e354412fa15c6f0b8a97b6ec092b9d03002cf47
2016-11-02 03:11:08 +00:00
Jenkins
ea93edaf83 Merge "Avoid use xx=[] for parameter in function" 2016-11-01 23:05:44 +00:00
Jenkins
47705cadec Merge "Add i18n to v1/shell.py" 2016-11-01 23:05:36 +00:00
jiansong
91e098e0ea Avoid use xx=[] for parameter in function
Use xx = [] for the parameter for function, this parameter will
only be initialized at the first call, this is should be avoided.
Better choice is to set the initial value to None, then the initialization
time use xx= xx or []

more information:http://effbot.org/zone/default-values.htm

Change-Id: Icbade7dd4c7d231ae65fd4f8de673b484bab721c
2016-10-19 02:08:46 +00:00
Trevor McCasland
cd61fe3b37 Add i18n to v1/shell.py
Help, print, and exception messages will now all be translated. I
did not find any logging messages.

Motivation for this change:
    1. A patch for shell.py recently added i18n, we should be
       consistent with the additions from v1.
    2. I noticed a patch on v1/shell.py that had reviewers suggesting
       to use i18n, instead of applying it to one message lets do it
       for the whole file.

Change-Id: Ifd1bf25020c5f180a074165e2634a105bcbd4ed8
2016-10-18 15:56:36 +00:00
Jenkins
a06ad17715 Merge "Enable release notes translation" 2016-10-17 12:04:06 +00:00
OpenStack Proposal Bot
ab7a0833fe Updated from global requirements
Change-Id: I8a265234e918b612bc55f11384135599590dc011
2016-10-15 00:12:48 +00:00
OpenStack Proposal Bot
1a5dc625a3 Updated from global requirements
Change-Id: I9528beab8f113b198bb1c2377625299033dbb253
2016-10-14 05:44:25 +00:00
Andreas Jaeger
43a88e440f Enable release notes translation
Releasenote translation publishing is being prepared. 'locale_dirs'
needs to be defined in conf.py to generate translated version of the
release notes.

Note that this repository might not get translated release notes - or
no translations at all - but we add the entry here nevertheless to
prepare for it.

Change-Id: I6af6b4e92f0953f673ea1a5c0f2162662cb14584
2016-10-06 20:52:24 +02:00
Jenkins
ac88477948 Merge "Avoid use xx=[] for parameter initial value" 2016-10-05 19:47:59 +00:00
Jenkins
d6aa19ca56 Merge "Replace assertTrue(a in b) with assertIn(a, b)" 2016-10-04 16:26:21 +00:00
Jenkins
4ac8124801 Merge "Throw correct error on creation of size 0" 2016-10-04 16:25:55 +00:00
Jenkins
fb3b74e580 Merge "Add tests to fake" 2016-10-04 16:25:12 +00:00
Jenkins
ebdd854438 Merge "Using assertIsNotNone() instead of assertNotEqual(None)" 2016-10-04 15:13:01 +00:00
Anh Tran
9372355173 Replace assertTrue(a in b) with assertIn(a, b)
Change-Id: Ic2338f549a660ddd0af70e2a1918fe6b29b2d0a2
2016-10-03 09:43:12 +07:00
Cao Xuan Hoang
71b0ff69fa Using assertIsNotNone() instead of assertNotEqual(None)
Following OpenStack Style Guidelines[1]:
[H203] Unit test assertions tend to give better messages for more
specific assertions. As a result, assertIsNotNone(...) is preferred
over assertNotEqual(None, ...) and assertIsNot(None, ...)

[1] http://docs.openstack.org/developer/hacking/#unit-tests-and-assertraises

Change-Id: Ie2631ce6d5f1756fe520850be0e0d304f41ba760
2016-10-03 09:33:04 +07:00
OpenStack Proposal Bot
ad8be62ebc Updated from global requirements
Change-Id: I1fd7e0ae5333438e619f8201b0573bb4cfb0c9de
2016-09-30 20:06:28 +00:00
Trevor McCasland
ca9be53870 Throw correct error on creation of size 0
When trying to create an instance of size 0 an error is thrown
stating that the size was not specified, this is not correct
because I did specify it. The problem is that args.size evaluates
to False because size is 0.

This patch checks for size being zero instead and throws the correct
error message.

Change-Id: If00e83ccd919429dcfac7621dbbd9daa49f8b416
2016-09-30 09:08:04 -05:00
jiansong
12be3210eb Avoid use xx=[] for parameter initial value
Use xx = [] for the parameter initial value, this parameter will
only be initialized at the first call, this is should be avoided.
Better choice is to set the initial value to None, then the initialization
time use xx= xx or []

more information:http://effbot.org/zone/default-values.htm

Change-Id: Ia89b9741731c07d8bf08691a1c6544742625cad6
2016-09-30 09:34:01 +00:00
jiansong
cbcb6880e5 Add tests to fake
I see us at the time of testing flavor without the "m1.medium" and
"eph.rd-smaller", I think we can add these two get test, to ensure
that the complete test.

Change-Id: Idc119e51b8dab5efb0da5dea3d0238430585e413
2016-09-29 21:32:39 -07:00
Jenkins
c22d37b51c Merge "Add a new command in the readme" 2016-09-29 20:15:12 +00:00
Jenkins
e8b4f6c15b Merge "Use i18n for shell.py" 2016-09-28 17:05:55 +00:00
Jenkins
a87493823a Merge "Delete unnessary as e" 2016-09-28 16:45:43 +00:00
Jenkins
d74145fd4e Merge "Add fixtures to test-requirements" 2016-09-28 16:45:36 +00:00
jiansong
8b27e7f1c6 Add a new command in the readme
With https://review.openstack.org/#/c/343927/  merge,
We have two new commands are reset-status and the force-delete, but
the existing readme and there is not have this two commands,Look this
readme shows that some out of date, so need to be updated

Change-Id: Idde08fd0ae2e42dab209d38bc0225683c5fa1922
2016-09-28 01:52:37 -07:00
jiansong
18bf918086 Use i18n for shell.py
Help msg and output should support,This can be beneficial to
the string type

Partial-Bug: #1379001
Change-Id: I7d12aead49f5771f0762533ce9f53e477367101c
2016-09-23 08:45:44 +00:00
Jenkins
010cf7b93f Merge "Display flavor-ephemeral in trove flavor-list command" 2016-09-23 06:50:55 +00:00
jiansong
4dc495e948 Delete unnessary as e
It seems that this as e is not used,so we can delete it

Change-Id: Ia1ff3854943478d502ebae1daf3af84f43c6cd79
2016-09-22 21:54:44 -07:00
Jenkins
c519fb4ed1 Merge "Use strutils.to_slug() instead of utils.slugify()" 2016-09-22 21:11:09 +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
jiansong
7a70882fc3 Display flavor-ephemeral in trove flavor-list command
This commit adds ephemeral column to flavor-list

Depends-On:I537bc2f3578e1e99b22f701f70ab8d96fec8908e

Closes-Bug:1617980

Change-Id: Ie322378215aa933b16ea2fd8ae0762f0b4bd0ace
2016-09-11 23:59:17 -07:00
Doug Hellmann
e403659799 Update reno for stable/newton
In order to support automatically updating the release notes when we
create stable branches, we want the pages to be in a standard order.
This patch updates the order to be reverse chronological, so the most
recent notes appear at the top.

Change-Id: Id5b7f4216a9a55249601827896703a6c87991eba
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2016-09-07 17:00:22 -04:00
Christian Berendt
b592b42aa1 Use strutils.to_slug() instead of utils.slugify()
Oslo provides a function, to_slug() in strutils that is substantially
similar to slugify() provided in utils by python-troveclient. Remove
slugify() and use to_slug() instead.

Change-Id: I97bc7cfc2c0e7d14e7617037bff431cdc1eee50f
Closes-Bug: #1266127
Author: Christian Berendt <berendt@b1-systems.de>
2016-09-06 10:17:51 +09:00
Morgan Jones
599171ade4 Implement scheduled backups
Implements Trove client APIs to implement scheduled backups
via Mistral workflow.

Change-Id: I012eb88359e063adbb86979a8fbd2e2a1e83f816
Implements: blueprint scheduled-backups
2016-08-25 16:57:54 -04:00
Morgan Jones
f5616b7d52 Expose Quota.update API
There exists a method in the management API to change the quota
for a given resource.  This change exposes that API via a new
"trove quota-update" command.  Also, adds v1.Quotas to the python
client.

Note that this command requires admin privileges.

Partial implements: blueprint bp/quota-management
Change-Id: I6ca1a87fbc46781f83bc9b7bd33745783b8aaab1
2016-08-25 13:49:08 +00:00
Jenkins
8c1fee10cd Merge "Add --incremental flag to backup-create" 2016-08-25 08:35:27 +00:00
Ali Adil
2844f453cc Add --incremental flag to backup-create
Added --incremental flag to backup-create and set the default
value to False. When the flag is passed it will create a
backup based on the last good known full/incremental backup.
If there is no previous backup a full backup will be created.

Change-Id: I96498180890b8b1692b1bac3b19988532f6eb077
Partial-Bug: #1607429
2016-08-25 05:31:48 +00:00
Peter Stachowski
8607ca8358 Add support for module ordering on apply
Client side of being able to specify 'priority' modules plus a
way to rank the order in which modules are applied.  Two new
attributes 'priority_apply' and 'apply_order' have been added
to the python API and are supported in the CLI by means of the
module-create and module-update commands.

Partially Implements: blueprint module-management-ordering

Change-Id: I2b871c7d1eab634174396bd0905329f3a66755f6
2016-08-25 04:10:18 +00:00
Jenkins
2b8a3dc1c2 Merge "module-update with --all_datastores doesn't work" 2016-08-24 23:37:17 +00:00
Jenkins
cbf9d92d82 Merge "Add command to delete BUILD instances and clusters" 2016-08-24 23:37:17 +00:00
Jenkins
0affaf80cb Merge "Display more flavor information in trove flavor-list command" 2.4.0 2016-08-24 22:17:09 +00:00
Ali Adil
39daba1e9d Add command to delete BUILD instances and clusters
Sometimes an instance/cluster can be stuck in BUILD state forever.
Attempting to delete the instance in this state is currently not
allowed. Add force-delete and reset-status command. Reset-status
will reset the status to ERROR, letting the instance/cluster be
deleted. Force-delete will combine functionality of reset-status
and delete.

Change-Id: I957b4be5030e493e0eb8c6b6855d41b942b2823c
Partial-Bug: #1579141
2016-08-17 19:05:07 +00:00
Morgan Jones
4f3ab58687 Implement Instance Upgrade
This change includes a new "trove upgrade" CLI command and
a new "Instances.upgrade" python API method to implement
the new Instance Upgrade feature.

Change-Id: I6ec2ebb78019c014f87ba5d8cbfd284686c64f30
Implements: blueprint image-upgrade
2016-08-16 14:44:29 +00:00
song jian
d0599d9006 Display more flavor information in trove flavor-list command
This commit adds disk_space colmn to flavor-list

Change-Id: Iffd24d3527af7ba34da233833eb1a9831b84f8a6
2016-08-15 04:31:16 -07:00
Jenkins
b18d4ebf46 Merge "Fix module-list failing with AccessInfoV2 error" 2016-08-12 05:38:49 +00:00
Jenkins
11a6d2fd99 Merge "Remove discover from test-requirements" 2016-08-11 23:27:46 +00:00
Peter Stachowski
5d82867d57 module-update with --all_datastores doesn't work
In writing the scenario tests for the fix for
https://launchpad.net/bugs/1611525 (see
https://review.openstack.org/#/c/353118/ ) it became evident that the
--all_datastores and --all_datastore_versions options weren't
functioning correctly. These options are now handled in the right way.

Change-Id: I0f226f09db08f635c542b27d8d2f898050d327fa
Partial-Bug: #1612430
2016-08-11 17:57:54 -04:00
Jenkins
942f369884 Merge "Replace assertDictEqual" 2016-08-08 18:46:43 +00:00
Masaki Matsushita
972beeafd0 Add vCPUs to flavor-list
This commit adds vCPU colmn to flavor-list

Closes-Bug: #1261876
Change-Id: Id0ab43cdaa20918af278c44ea9bff7d23260e438
2016-08-04 10:58:39 +09:00