Commit Graph

1548 Commits

Author SHA1 Message Date
Jenkins
c9f4e085e2 Merge "Sync with Oslo-Incubator" 2014-04-09 08:49:18 +00:00
Jenkins
b3c57729c5 Merge "Support IPv6 when booting instances" 2014-04-09 08:46:55 +00:00
Jenkins
5864e52d37 Merge "Add service-delete subcommand to delete a service" 2014-04-09 07:29:42 +00:00
Jenkins
5a1df33b75 Merge "Fix name arg help for volume-type-create" 2014-04-09 07:26:55 +00:00
Jenkins
ee80b107d7 Merge "Allow admin user to get all tenant's floating IPs" 2014-04-09 07:21:47 +00:00
OpenStack Jenkins
375166cb59 Merge "Updated from global requirements" 2014-04-08 21:08:25 +00:00
Matt Riedemann
7df6579f7a Fix name arg help for volume-type-create
Similar to change I10b1bd6d but for help on an argument rather than the
command itself.

Closes-Bug: #1304570

Change-Id: I4f08ffb6af248ccd7446012765d17c41567f4b38
2014-04-08 12:52:17 -07:00
gtt116
91caad97d3 Add service-delete subcommand to delete a service
In nova https://review.openstack.org/#/c/39998/ expose an API to delete
a service. Both in V1.1 and V3.

This patch make novaclient support it.

Change-Id: I4aaabc866b464c046b46eda68734f37223c6d6a0
Implements: blueprint support-delete-service
2014-04-08 20:04:54 +08:00
Jenkins
465919953d Merge "Fix session handling in novaclient" 2014-04-08 01:54:52 +00:00
OpenStack Jenkins
f6cda643fe Updated from global requirements
Change-Id: I123a065193ea330d71afe2fd2ee3fdcbcbd4a88b
2014-04-07 21:27:22 +00:00
Jenkins
37df0510ef Merge "Print adminPass when rebuilding from shell" 2014-04-07 18:51:30 +00:00
Jenkins
055a18fcd8 Merge "Remove py3kcompat" 2014-04-07 18:18:21 +00:00
Boris Pavlovic
98934d7bf1 Fix session handling in novaclient
Prior to this patch, novaclient was handling sessions in an inconsistent
manner.

Every time we created a client instance, it would use a global
connection pool, which made it difficult to use in a process that is
meant to be forked.

Obviously sessions like the ones provided by the requests library that
will automatically cause connections to be kept alive should not be
implicit. This patch moves the novaclient back to the age of a single
session-less request call by default, but also adds two more
resource-reuse friendly options that a user needs to be explicit about.

The first one is that both v1_1 and v3 clients can now be used as
context managers,. where the session will be kept open (and thus the
connection kept-alive) for the duration of the with block. This is far
more ideal for a web worker use-case as the session can be made
request-long.

The second one is the per-instance session. This is very similar to what
we had up until now, except it is not a global object so forking is
possible as long as each child instantiates it's own client. The session
once created will be kept open for the duration of the client object
lifetime.

Please note: client instances are not thread safe. As can be seen from
above forking example - if you wish to use threading/multiprocessing,
you *must not* share client instances.

DocImpact

Related-bug: #1247056
Closes-Bug: #1297796
Co-authored-by: Nikola Dipanov <ndipanov@redhat.com>
Change-Id: Id59e48f61bb3f3c6223302355c849e1e99673410
2014-04-07 19:38:51 +02:00
Johannes Erdfelt
496e39a260 Print adminPass when rebuilding from shell
The 'nova rebuild' command did not print the adminPass returned by the
server. This is because it discards the instance information returned
by the rebuild action and fetchs the information again. This would lose
the adminPass and it would not be printed for the user.

This patch reuses the instance information returned by the rebuild action
which ensures that the adminPass is printed by the shell.

Change-Id: I144bfa298bef529c78ca04042cd37a763537f09e
Closes-bug: 1302696
2014-04-04 13:21:54 -07:00
Johannes Erdfelt
04fdf97b35 Remove py3kcompat
It's not used by novaclient anymore and isn't used by any other
openstack common code either.

Change-Id: I96ebf030d0a96436a8a75c6937c354003ee32c58
Closes-bug: 1280033
2014-04-04 12:34:15 -07:00
Johannes Erdfelt
9162a5fe8f Split test_rebuild() into two tests
The method tests rebuilds with and without passwords, but the tests are
independent and should be in two seperate tests.

Also, remove duplication of the rebuild with password test from
test_rebuild_preserve_ephemeral

Change-Id: I40d0376fabf319dbe703d593de8fb4cdcf0aeab1
2014-04-04 10:57:40 -07:00
Jenkins
2005e17bed Merge "Raise exception when poll returns error state" 2014-04-02 20:10:36 +00:00
Jenkins
f70d7b8916 Merge "Fix for invalid literal ValueError parsing ipv6 url(s)" 2014-04-02 14:40:00 +00:00
Jenkins
297ebde1d3 Merge "Explain how to delete a metadata in aggregate-set-metadata" 2014-04-02 04:55:51 +00:00
liu-sheng
02328d3337 Allow admin user to get all tenant's floating IPs
When getting floatingips with Nova API, the results will be filtered
with the 'tenant_id'.
So, we can only get the floatingips belonging to the tenant of the current
context.
When ceilometer invokes novaclient to list floatingips, it will get an
empty list because the tenant is 'service'.
we should allow an admin user to index all tenants's floatingip by adding a
parameter 'all_tenants'.
This patch provides CLI support

Change-Id: I35a2155401247d49017bf3c03341b082cb87750d
Closes-bug: #1262124
2014-04-02 09:31:04 +08:00
Jenkins
a002abc060 Merge "Remove quota-class subcommand" 2014-04-01 23:09:17 +00:00
Jenkins
b5f800fd54 Merge "Add service-list show id column" 2014-04-01 17:49:54 +00:00
Jenkins
0586260407 Merge "Avoid AttributeError in servers.Server.__repr__" 2014-03-31 22:05:20 +00:00
Jenkins
ec7e95d65e Merge "Remove unused arguments to _boot()" 2014-03-31 18:00:30 +00:00
Davanum Srinivas
9344f02649 Fix for invalid literal ValueError parsing ipv6 url(s)
Switch to using network_utils for splitting the URL. The code
in oslo-incubator supports ipv6 urls

HEAD of oslo-incubator is bb52a3fc49f033b9f36238231ca56e754a78cf4b

Updated openstack-common.conf to pick up the new dependency from
oslo-incubator

Change-Id: Ifa3dec384e85942a191260d17e8141030d31ff84
Closes-Bug: #1298137
2014-03-29 14:16:02 -04:00
Jenkins
d85c24ff5a Merge "Fix error when run with no arguments on Python 3" 2014-03-28 20:31:50 +00:00
Jenkins
fce239650f Merge "typo in novaclient" 2014-03-28 19:07:00 +00:00
Jenkins
6cbf00db25 Merge "Support building wheels (PEP-427)" 2014-03-28 18:56:47 +00:00
Johannes Erdfelt
17a8b78eec Remove unused arguments to _boot()
reservation_id, min_count, max_count are never specified by any callers.
Remove the arguments and the code that checks the values.

Change-Id: I3794fd1eabbfb999c422c701af1ff64cd667313f
2014-03-27 19:15:14 -07:00
Shuangtai Tian
8475ada28c typo in novaclient
Change-Id: If30543ed7c94cd965f1d6b7f0d4af26b23914ba2
2014-03-28 09:55:44 +08:00
Davanum Srinivas
32d84dc786 Sync with Oslo-Incubator
oslo-incubator HEAD was 2eab986ef3c43f8d1e25065e3cbc1307860c25c7

This change brings in a few minor updates to python3 and a bug fix
for deep copy failure in gettextutils.

Change-Id: Id360f3b43d1ad2f67b328206990dd6bdb53c1cd7
2014-03-27 20:12:54 +00:00
Sergey Lukjanov
21f166b623 Start using oslosphinx theme for docs
Change-Id: Ic327d9752e9c77e6543f23b032c8b77abd6ed479
2014-03-26 15:42:03 +04:00
Johannes Erdfelt
656cf91f89 Fix error when run with no arguments on Python 3
Python 3 changed the map built-in to return an iterable instead of a list.
When tested in a boolean context, this always returns True, even if it
would not return anything when iterated.

Instead of the usage being printed, this error was printed:
ERROR: 'Namespace' object has no attribute 'func'

Use list comprehension instead to ensure that an iterable isn't returned

Change-Id: Ie15f2fa8ee93ab26490e371133fa0f944430737b
Closes-bug: 1295356
2014-03-25 08:49:05 -07:00
Jenkins
733f1e58d8 Merge "Fix authentication bug when booting an server in V3" 2014-03-25 05:33:57 +00:00
ZhiQiang Fan
6fbddcb4b6 Avoid AttributeError in servers.Server.__repr__
servers.Server represents various object now, and some of them may
don't have attribute 'name', for example, the interface_list() result
object. It will cause AttributeError when we try to format string with
such object, so I add a check for the 'name' attribute in __repr__
method, it will use 'unknown-name' instead when 'name' is not found.

Change-Id: If4757d5d73721774543d58a4cc875710a6013f34
Closes-Bug: #1280453
2014-03-25 10:54:10 +08:00
Jenkins
94a4c49de0 Merge "Print a useful message for unknown server errors" 2014-03-22 09:20:20 +00:00
Jenkins
6e3b2878a1 Merge "Show Exception Name in Shell Output" 2014-03-22 09:09:08 +00:00
Jenkins
5bd3bbf8f1 Merge "Correct the help sting of volume-type-delete" 2014-03-22 08:09:34 +00:00
Jenkins
8ecc6b3eff Merge "Allow user ID for authentication" 2014-03-21 19:51:23 +00:00
Ryan Hallisey
d01b3abdb0 Raise exception when poll returns error state
When running nova boot --poll, any error states that occur will be
seen but, an exit code of 0 will be returned indicating success.
This would be problematic for scripts looking to see if an
operation completed successfully.

To fix this, an exception is raised after the nova api indicates to the
poll code that the vm is in an error state. The exceptions signals the shell
main function to exit with code 1.

Change-Id: I48f6b1c82e2f8b221dda898dcb804b0196018505
Fixes-Bug: #1292669
2014-03-21 11:59:58 -04:00
Jenkins
1d86d86bc8 Merge "Fix element miss in client request body" 2014-03-21 15:52:23 +00:00
Jenkins
159d3e4dbf Merge "Re-add install_venv_common to openstack-common.conf" 2014-03-21 15:47:10 +00:00
liu-sheng
596d7d5675 Correct the help sting of volume-type-delete
Change-Id: I10b1bd6d42e4085dc73572f05ed893385ca3e139
2014-03-21 15:28:45 +08:00
Jenkins
1128298460 Merge "Do auth_url.rstrip('/') only if auth_url is set" 2014-03-21 06:27:38 +00:00
OpenStack Jenkins
a63729fe55 Merge "Updated from global requirements" 2014-03-21 06:15:00 +00:00
Johannes Erdfelt
e43825bd1c Print a useful message for unknown server errors
If a server error is returned that has an unknown code, novaclient will
end up printing something similar to:

ClientException: <attribute 'message' of 'exceptions.BaseException' objects>

Setting a message for ClientException will ensure that something more
useful than that is printed.

Change-Id: I43a2a33017f9a5c1b79d7fd8af4153e91d296f7b
Closes-bug: 1295293
2014-03-20 15:54:19 -07:00
Solly Ross
0b1a29e7b0 Show Exception Name in Shell Output
Currently, when the CLI encounters an exception, only the exception
message is shown.  However, the name of the exception can be quite
informative as well.

For instance, an error message might read "Cannot do xyz", which
simply indicates the operation was unsucessful.  However, the attached
exception name (HTTPNotImplemented, for instance) indicates the
*reason* that the call was unsuccessful.

Change-Id: I0298477bd9d40d98c95bb797c68c47dbc952b345
2014-03-18 17:23:18 -04:00
Kevin L. Mitchell
8c7524b8bf Work around pypy testing issue
A recent release of setuptools appears to have introduced a bug that
causes the pypy gate tests to fail.  This applies a temporary workaround
that should restore pypy testing while the root cause of the problem is
researched.

Change-Id: I66597e40c1d2e57cca1292844d228af85214197d
Partial-Bug: 1290562
2014-03-18 11:37:57 -05:00
shihanzhang
91c138c51f Support IPv6 when booting instances
When nova uses neutron, IPv6 addresses may be allocated.  This ensures
those addresses are supported.the patch to modify nova is
https://review.openstack.org/#/c/74252/

Change-Id: I2468d3bcaca9122e5d3f9c98044d57f623630dc3
Closes-bug: #1267685
2014-03-18 18:01:29 +08:00
OpenStack Jenkins
4e8dea6745 Updated from global requirements
Change-Id: Ibb039ec440a513a49cbcf05daa69ac8785770035
2014-03-18 08:52:05 +00:00