1107 Commits

Author SHA1 Message Date
Jenkins
95e7d70266 Merge "Merge v1_1's base module into main base module" 2013-07-30 17:55:26 +00:00
liyingjun
8b5dcee15e Add user quota client API support
Implements blueprint user-quota-related-client-api

    This patch adds user arguments to the following subcommands:
        * quota-show
        * quota-update
        * quota-delete

Change-Id: I6556de366a758f7550e9b26357f231666caae419
2013-07-30 10:59:25 +08:00
Christian Berendt
5fe9408d2e make findall in novaclient/base.py more efficient
Use /resources instead of /resources/detail to resolve
the resource ID by the name and load the details of the
resource in a separate step. This reduces the overhead
to resolve the resource ID and results in a better runtime
performance.

This patch does not solve the issue that the name resolving
takes place on the client side. For solving this issue new
Nova API methods are necessary.

fixes bug #1202179

Change-Id: Ib753b1d090cb74b2d137c68f6899dad4ae2ec1ca
2013-07-29 10:52:22 +02:00
Jenkins
2a45c7570f Merge "Enable force_delete and restore instance via novaclient." 2013-07-27 14:57:30 +00:00
Xavier Queralt
0d061f0aeb Merge v1_1's base module into main base module
This class was forked from novaclient.base when adding v1.1 support and
and because v1.0 is no longer supported it can be merged again.

blueprint: improve-block-device-handling

Change-Id: I3113eff522a9dc280f48053001afa9e1a0cad3e3
2013-07-26 16:39:46 +02:00
Jenkins
d5687acff6 Merge "Add name argument to hypervisor commands" 2013-07-26 09:28:55 +00:00
Jenkins
3bc9cee729 Merge "Add name argument to aggregate commands" 2013-07-26 09:28:08 +00:00
Jenkins
ee7b01a86d Merge "recognize 429 as an rate limiting status" 2013-07-26 08:40:02 +00:00
Chuck Short
3f0312eabc Remove python 2.4 and python 2.5 support.
As a project we do not support python 2.4 or python 2.5
and these versions of python are not tested, so remove
the compatibility code.

Change-Id: I267d9e7e83d85322c45d56d9c5256b514224ad8c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-07-24 13:48:42 -04:00
Jenkins
2a19ba3031 Merge "make v2_auth and plugin_auth explictly return their results" 2013-07-23 21:40:16 +00:00
Jenkins
58d436ed88 Merge "Skip setting volume_size if not given" 2013-07-23 01:01:32 +00:00
Yufang Zhang
cc2c0a8e6f Enable force_delete and restore instance via novaclient.
Bug 1195670

Nova supports force_delete or restore instance in the API level,
thus it makes sense to support this feature in novaclient.

Change-Id: I7cc3d2d2a7ab8dfe043176a3ea97c10deae683c9
2013-07-22 21:24:49 +08:00
Ken'ichi Ohmichi
4025b7e5e3 Add name argument to aggregate commands
Fixes #Bug 1202901

This patch adds name arguments to the following subcommands:
 * aggregate-update
 * aggregate-delete
 * aggregate-set-metadata
 * aggregate-add-host
 * aggregate-remove-host
 * aggregate-details

Change-Id: I93f44a12b6d5a91b448f6f8d238311d58bf40c01
2013-07-22 10:04:09 +09:00
Ken'ichi Ohmichi
de250bf170 Add name argument to hypervisor commands
Fixes #Bug 1202920

This patch adds name arguments to the following subcommands:
 * hypervisor-show
 * hypervisor-uptime

Change-Id: I9adfb699775d2d8f8ca45a7a28621e634bc03055
2013-07-22 09:44:53 +09:00
Jiajun Liu
1b5ed91650 recognize 429 as an rate limiting status
currently novaclient recognize 413 as rate limiting status while
it shoule be 429 according to HTTP protocol.

fixes bug 1191874

Change-Id: Ib1ae54f7d13d0ca579dd264e8d0d7630770e92d6
2013-07-17 02:32:29 +00:00
Jenkins
74506b83fe Merge "CLI for disable service reason" 2013-07-15 17:50:40 +00:00
Julie Pichon
f702c25d43 Fix backwards-incompatible API change (method signature)
project_id was changed to projectid in a previous changeset.

Fixes bug 1203001

Change-Id: If9c21ae4f3cfbeb89569f6e4bd415c2041dc6294
2013-07-12 08:30:33 +01:00
Jenkins
9b7d470288 Merge "Fix interface-list got none mac address." 2013-07-19 13:21:21 +00:00
Jenkins
32f38fe19e Merge "Allow tenant ID for authentication" 2013-07-18 21:51:19 +00:00
Dirk Mueller
af7ca70e3e Fix and enable gating on H402
End one-line docstrings with punctuation.
Change them to command style where necessary.

Change-Id: I8ff689c3a2f20d489286f80112c6dc95c97f2f31
2013-07-17 15:44:05 +02:00
Jenkins
0c775cbd78 Merge "Add AgregatesManager.get()" 2013-07-16 21:05:33 +00:00
Jenkins
2645e97a05 Merge "Clean up and make HACKING.rst point to openstack-dev/hacking" 2013-07-16 21:05:32 +00:00
Jenkins
ca56219a71 Merge "Remove uncessary code related to nova start/stop" 2013-07-16 21:05:30 +00:00
Jenkins
da711d56d2 Merge "Adds zsh completion" 2013-07-16 20:05:49 +00:00
Dean Troyer
c360c3e8da Add AgregatesManager.get()
utils.find_resource() uses manager.get() as part of converting Resource
names to IDs.  AggregatesManager had get_details() instead of get().

Add AggregatesManager.get(), leaving .get_details() in place for backward
API compatibility.

Bug: 1200341

Change-Id: I7d238bbe43e1760e31f1a9ba783c668246f20844
2013-07-11 14:26:01 -05:00
Dirk Mueller
f50ff361e2 Skip setting volume_size if not given
When the block-device parameters skip volume_size,
don't set it. Setting to an empty volume_size
would be invalid as it has to be an integer,
and Nova API will reject the request if api validation
is implemented. (proposed e.g. at
https://review.openstack.org/#/c/34749/)

Fixes bug LP #1199539

Change-Id: I7ab518886abf8d449caf1c70563a79a990d7765e
2013-07-10 17:09:38 +02:00
gtt116
70e6cd9790 Fix interface-list got none mac address.
novaclient expect the response json body has a column 'mac_address', but
actually is 'mac_addr'. This patch is a quick fix. Just print out
"mac_addr" is readable enough.

Fix bug: #1199706

Change-Id: I68823a3d719ee2f5d9d8b6227ca8eb858fc270c3
2013-07-10 17:50:19 +08:00
Jenkins
a45c49bafc Merge "python3: Fix unicode compatibility python2/python3" 2013-07-10 04:09:58 +00:00
Xiao Hanyu
b5c91018e0 Remove uncessary code related to nova start/stop
'nova start' and 'nova stop' actually send request with 'os-start'
and 'os-stop', instead of 'start' and 'stop'.

Change-Id: I1472e1b648dae8f3b281a113adb60421a00e5a48
2013-07-09 14:31:16 +08:00
Nicolas Simonds
912288c486 make v2_auth and plugin_auth explictly return their results
In cases where the respective authentication methods return
non-NoneTypes, (e.g., HTTP 305 redirects) they would get dropped
on the floor previously.

This patch set splits the test_auth_redirect unit test into two
nearly-identical unit tests to exercise the different code paths.
Without the patch, the test_v2_auth_redirect unit test fails with
an HTTP 401 error

Change-Id: I2018bc5b73ce86d6d5383958375d5dbbde2e763c
Fixes: Bug 1197191
2013-07-08 16:49:04 -07:00
Monty Taylor
a5558f8780 Sync install_venv_common from oslo
The current version of install_venv_common uses the --distribute flag
in its creation of the virtualenv. This causes some upgrade problems
with the new versions of distribute and setuptools. The solution to
those problems is to get off of the distribute bandwagon.

Change-Id: I5efe196c46b12d88c853f8362ebcbf0cc6f1573d
2013-07-08 15:22:39 -04:00
Joe Gordon
1b3cd6ff9e Clean up and make HACKING.rst point to openstack-dev/hacking
Instead of having a full local copy of HACKING Reference the OpenStack
hacking guide (openstack-dev/hacking) and remove duplicate sections.

Change-Id: Iaabc27c42d74b7441c17e63db15724f64114620b
2013-07-08 18:31:03 +01:00
Sulochan Acharya
d095b8a335 CLI for disable service reason
Adds cli option to allow users to give reason
for service-disable. Also adds disabled reason
as a column in service list, so any disabled service
can be seen with reason.

A recent nova change that allows disable-log-reason
allows users to provide reason for disabling service.
This just adds the cli option for the method.

Blueprint record-reason-for-disabling-service

Change-Id: If263788c34279d6b4c568d5e0320448d2ff67a12
2013-07-03 13:14:36 -05:00
Phil Day
02f906bcd6 Allow tenant ID for authentication
Tenant names are not necessarily unique for a User, so the client
should also allow authentication by tenant_id

If both ID and Name are specificed then use the ID

Fixes bug 1195454

Change-Id: Ib62aabc3702db88f02259cd721f9efb31404bcb7
2013-07-03 16:05:13 +01:00
Jenkins
5c8616d03e Merge "python3: Fix print statements" 2013-07-03 02:55:35 +00:00
Jenkins
e3dfc5a407 Merge "python3: Compatibility for iteritems differences" 2013-07-02 22:10:45 +00:00
Jenkins
c865cee9a1 Merge "Bring stdout/stderr capturing in line w/ nova" 2013-07-01 06:11:18 +00:00
Jenkins
0bf5f49bcb Merge "Fixup trivial License Header mismatch." 2013-06-30 07:12:15 +00:00
Daniel Wallace
2770e059e9 Adds zsh completion
Use nova bash-completion to add native zsh completion using built in
parameter expansion.  Nothing spectacular or new, this is mostly so that
zsh users do not need to autoload bashcompinit just to use nova.

Change-Id: I56f62f036e0c85e79197f4c7dfd25abf7eb4110a
Implements: zsh completion
2013-06-28 20:39:28 -05:00
Matt Thompson
c7e9b1b8dc Bring stdout/stderr capturing in line w/ nova
In .testr.conf, we reference OS_STDOUT_CAPTURE / OS_STDERR_CAPTURE
while in novaclient/tests/utils.py we reference OS_STDOUT_NOCAPTURE
and OS_STDERR_NOCAPTURE.  This change brings things more in line
with nova project by referencing OS_STDOUT_CAPTURE / OS_STDERR_CAPTURE
in both locations.

Change-Id: I22efdec84bef78e99d1d95303cadade6011d76a2
Fixes: bug #1192997
2013-06-28 10:23:46 +01:00
Dirk Mueller
0134008f9b Fixup trivial License Header mismatch.
The currently proposed Hacking check H103
compares the license boilerplate header in
source files with a known good version.
Fix up the syntactical-only mismatches with
that check.

Change-Id: Ie8861b9ded858aabb4cebbe9db656e8cccc9efed
2013-06-27 21:42:11 +02:00
Ben Nemec
b526c9beff Remove Diablo compatibility options
According to the fixme in the code, these should have been removed
in Folsom.

Change-Id: If11c576e45931b72c227f51a0b8f63bc5f7dd4cb
2013-06-26 14:34:01 -05:00
Chuck Short
07fd520d16 python3: Fix print statements
Fix print statements while running with python3. This is
due to the fact that the print() has changed between
python2 and python3.

Change-Id: I3af57cf8925e0fcfb34981f5b72ed989ba9f6cd4
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-26 14:47:12 -04:00
Jenkins
abb57b6934 Merge "Return Customer's Quota Usage through Admin API" 2013-06-25 22:34:42 +00:00
Chuck Short
a25d4fe59a python3: Compatibility for iteritems differences
In python3 dict.iteritems(), dict.iterkeys(), and
dict.itervalues() are no longer supported. So use
six.iteritems() where it is appropriate.

Change-Id: I8b07dc2a89d790ec275d45f859e1644e9b00c837
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-24 11:51:04 -05:00
Chuck Short
8c4e145b92 python3: Fix unicode compatibility python2/python3
Python3 enforces the distinction between byte strings and text strings
more rigorously than python2. So use six.text_type/six.u()
where appropriate

Change-Id: I890e19cb857e10f0292aabdaebaa8e7a7bd8db23
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-24 11:47:15 -05:00
Jenkins
05ca996e67 Merge "Update help for --nic opt and make net-id or port-id required" 2013-06-21 13:48:52 +00:00
Mahesh Panchaksharaiah
ea4712369b Return Customer's Quota Usage through Admin API
Modified the used limits API for Admin to retrieve
the used limits for a customer. Changes done to the
nova client to fetch limits for a given tenant.

This is related to changes made in nova,
https://review.openstack.org/#/c/27468/

Change-Id: Id53576eb35d6dab7cb655f8427091e95a6f75a6d
Implements: blueprint customer-quota-through-admin-api
2013-06-21 13:56:48 +05:30
Jenkins
cb42b95f1f Merge "Cells Support" 2013-06-20 16:33:58 +00:00
Eoghan Glynn
909a53b161 Discard possibly expired token before re-authenticating
Fixes bug 1192656

Previously, the attempt to re-authenticate on possible token
expiry actually re-used the expired token, which was clearly
bound to fail in the expired case.

Now the old authentication state is discarded before attempting
re-authentication.

Change-Id: I3fd125702061f7ac84eb501d2a488aab5b2385b9
2013-06-19 20:36:48 +01:00