2032 Commits

Author SHA1 Message Date
Jenkins
569aed335e Merge "Reuse uuidutils frim oslo_utils" 2015-05-08 18:52:23 +00:00
Jenkins
f2b762733a Merge "Sync latest code from oslo-incubator" 2015-05-08 18:52:14 +00:00
Andrey Kurilin
667f1af972 Reuse uuidutils frim oslo_utils
Change-Id: I0c5ec41215e97dafd7377179979b01a67704cb05
2015-05-08 12:36:41 +03:00
Andrey Kurilin
4a7cf96766 Sync latest code from oslo-incubator
Hash of latest commit in oslo: f5646edc61b9653d7ff71ed0177ed77811bbdcd0

Change-Id: I2f3bf41434591fcfc811ae6dec40ccabd42db741
2015-05-08 12:27:59 +03:00
OpenStack Proposal Bot
d03a85a205 Updated from global requirements
Change-Id: I9b195f06731e390087f8850fbba59afacc89239f
2015-05-07 23:37:26 +00:00
Jenkins
fbcfaca847 Merge "nova client now support limits subcommand" 2015-05-06 22:52:14 +00:00
Jenkins
8f2e1b57ed Merge "Make _discover_extensions public" 2015-05-06 18:34:13 +00:00
kylin7-sg
02c04c5658 Make _discover_extensions public
Heat uses `novaclient.shell.OpenStackComputeShell._discover_extensions`
function, which is private currently. It's better to change this method
to public for public use.

Change-Id: I15879d56db2ec88a9bef99b6af8924ebd4ad169b
Closes-bug: #1440779
2015-05-06 14:10:59 +08:00
OpenStack Proposal Bot
99fcc6939e Updated from global requirements
Change-Id: I897e515d571c81c318206758c2cd419b4bbed55f
2015-05-04 20:09:13 +00:00
rajiv.kumar
bf6fbdb8d7 nova client now support limits subcommand
Added new subcommand "limits" which displays absolute limits and
rate limits both. do_limits() functions calls get() only once and
then passes limits.rate and limits.absolute to _print_rate_limits
and _print_absolute_limits respectively; these functions then
format the output.

Change-Id: I1344da1a3925a3f3a757e340f11381b69a668bf7
Closes-Bug: #1172254
2015-05-04 04:59:05 +00:00
Ken'ichi Ohmichi
95421a3702 Don't use SessionClient for version-list API
The endpoint of version API doesn't contain "/v2/{project-id}" and it is
just "/". SessionClient is based on the endpoint "/v2/{project-id}/...",
so this patch makes a client use a raw url for version-list API.

Change-Id: I53f2afacce2dda14ac9761e824b48887f7c192f9
Closes-Bug: #1444235
2015-05-03 21:27:24 +00:00
Jenkins
2a7c2f14c2 Merge "Don't lookup service url when bypass_url is given" 2015-04-27 17:12:51 +00:00
Jenkins
95a743f164 Merge "Deprecate v1.1 and remove v3" 2015-04-27 13:23:13 +00:00
Ken'ichi Ohmichi
86ec0c6bac Add min/max microversions to version-list cmd
Since Id464a07d624d0e228fe0aa66a04c8e51f292ba0c, Nova returns min/max
microversions on a "list versions" API response.
For using microversions, API users need to know available microversions.
This patch adds them to version-list command.

Change-Id: I81f667ca4f0403183cac918e416a730c16b6eeff
2015-04-26 15:43:17 +00:00
Jenkins
7a2075756e Merge "Add --all-tenants option to 'nova delete'" 2015-04-23 11:42:34 +00:00
Jenkins
3251bc430f Merge "Handle binary userdata files such as gzip" 2015-04-23 11:41:01 +00:00
Jenkins
d0263a76a3 Merge "Fix displaying of an unavailable flavor of a showing instance" 2015-04-23 03:20:00 +00:00
Jenkins
fdef4cea12 Merge "Report better error message --ephemeral poor usage" 2015-04-23 03:11:44 +00:00
Jenkins
9b6dcd13e5 Merge "Revert "nova flavor-show command is inconsistent"" 2015-04-22 21:29:08 +00:00
Jenkins
ac4390c3ea Merge "Update README to work with release tools" 2015-04-22 19:08:30 +00:00
Andrey Kurilin
61ef35fe79 Deprecate v1.1 and remove v3
Module novaclient.v1_1 is already deprecated, so it's time to stop using it
inside novaclient.

Since support of v3 nova is undocumented feature, which uses v2
implementation, we can remove code related to it.

Also, this patch removes redundant check for compute api version != 1.0.

Change-Id: I06b349f704d5ae2c592d8d286da268870f2a69e9
2015-04-22 15:03:07 +03:00
Sean Dague
31f97a011b fix FloatingIP repr
The FloatingIP repr added in d614dbcab9cc8c5732ce28c655738218e147aad7
is incorrect, and can cause fails when you attempt to do bulk creation
activities with logging turned on.

This removes the __repr__ for FloatingIP so that it fails back to the
Resource defaults which are safe.

Partial Revert of d614dbcab9cc8c5732ce28c655738218e147aad7

Closes-Bug: #1437244

Change-Id: I8cedf418917157ce632606bef640049140134372
2.24.1
2015-04-22 06:56:38 -04:00
melanie witt
4f9e65c438 Don't lookup service url when bypass_url is given
Change https://review.openstack.org/#/c/164321 broke the bypass_url
option. It made the assumption that self.service_catalog won't be set
in novaclient/client.py when bypass_url is specified, which isn't
necessarily true. This change adds a check for self.bypass_url and
looks up service url only if bypass_url hasn't been specified.

Closes-Bug: #1445086

Change-Id: I72d2b3e3199aeae7fb2f2c68be259774e07a4501
2015-04-21 23:54:14 +00:00
melanie witt
098116d6a5 Revert "nova flavor-show command is inconsistent"
This reverts commit 4e79285b45ec1490c8e923f724cbaf4d42fe81c4.

The aforementioned commit broke flavor-show for mixed case flavorids.
The reason is a bit complex. On the nova api side, there is caching of
db items for flavors, keyed off the flavorid retrieved from the db,
case sensitive, unlike the db query itself. Attempts to flavor-show
a flavor with flavorid composed of letters will fail with a 400 if
the capitalization doesn't match.

For the flavor names, they work in lowercase because the find_resource
function falls back on a search by "human_id" after failing every other
attempt to find the flavor, because "human_id" is a oslo-slugified
string (all lowercase, non-word characters removed, spaces converted
to hyphens).

Closes-Bug: #1446850

Change-Id: I73247b50f5a6918167c071ccc13cd676aa2c7fec
2015-04-21 22:19:06 +00:00
Doug Hellmann
af7c850bb8 Update README to work with release tools
The README file needs to have links to the project documentation and bug
tracker in a parsable format in order for some of the release tools
scripts to work (particularly the one that prints the release note
email).

Change-Id: I37e0acc5ed8e1af565359290fa622456901c735e
2015-04-21 15:44:09 +00:00
Jenkins
5eab1430f2 Merge "Remove all imports from oslo namespace" 2.24.0 2015-04-20 22:42:54 +00:00
Jenkins
2b1f70c4ff Merge "Fix typo on class Client sample" 2015-04-20 19:56:35 +00:00
Andrey Kurilin
ccff3d3c94 Remove all imports from oslo namespace
oslo namespace is deprecated

Change-Id: I345eb210222d8e973b99f27821099f52883ab27d
2015-04-20 13:52:38 +03:00
Ken'ichi Ohmichi
c4d2f92116 Fix typo on class Client sample
Current Client sample doesn't work because the imported class is not
used in the sample. This patch fixes it.

Change-Id: I01d4ec277a8858a14f4e3a50b8de130aa5a4f0b5
2015-04-17 05:36:27 +00:00
Doug Hellmann
9799353781 Uncap library requirements for liberty
Change-Id: Ia92f6e83fa2f5229606095ca41bc638cdab99fee
Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
2015-04-16 18:13:32 +00:00
Ramaraja Ramachandran
2761606fbf Report better error message --ephemeral poor usage
The eph_dict expects the format size=value.Catch valueError and return
proper error text

Change-Id: I99ef7efe7dc14aa346913009e244ad4eea0369a9
Closes-bug: #1433200
2015-04-07 14:47:04 +05:30
Feodor Tersin
a63aa515f5 Fix displaying of an unavailable flavor of a showing instance
Since then an instance was booted with a flavor, the flavor could be
deleted or become unavailable (private flavors). As a result novaclient
fails to show the instance with member role user.

This patch set adds handling of unavailable flavors to showing of
instances as it is done for unavailable images.

Closes-Bug: #1366168

Change-Id: I810dcac814b7523313112bb9151754659b85df51
2015-04-07 11:15:37 +03:00
melanie witt
19d4d35a4e Handle binary userdata files such as gzip
The current code in the servers api assumes only text files will be
provided as userdata. That is, the data is utf-8 encoded before it
is base64 encoded and sent. This breaks for binary userdata files,
(example, gzip files) as they can't be utf-8 encoded.

This change ignores specifically the exceptions that are raised
when utf-8 encoding is attempted on non-text data: AttributeError
and UnicodeDecodeError. These exceptions will be ignored to let
binary files proceed to the base64 encoding step.

Closes-Bug: #1419859

Change-Id: Ie96283f6ff892ae30485722cf7c3ec40f3f1b5df
2015-04-03 21:09:10 +00:00
melanie witt
14cada7d0d Add --all-tenants option to 'nova delete'
Currently, the all_tenants=1 search option is being passed all the
time for 'nova delete' commands in order to enable 'nova delete' by
name to work across tenants, for those that have all_tenants access
in the nova policy.json. This however breaks all 'nova delete' for
non-admins when policy has been configured to allow only admin to
list servers across all_tenants.

This patch changes 'nova delete' to take an option --all-tenants to
get the functionality to delete by name across tenants. This is
similar to how 'nova list --all-tenants' works.

Closes-Bug: #1439381

Change-Id: I204daaf5c0f4dab7c93ef0bd85ffab3529ca352a
2015-04-02 17:34:52 +00:00
Jenkins
3681c186f7 Merge "Combine test cases for checking nova limits response" 2015-04-01 22:26:41 +00:00
Rajiv Kumar
88beed19db Combine test cases for checking nova limits response
nova rate-limit returns absolute limits too, but novaclient does
not show absolute limit,a bug
(https://bugs.launchpad.net/python-novaclient/+bug/1172254) has
been filed for this one. There is no test which assert on both
absolute and rate limit. This patch assert on both the rate and
absolute limit returned

Change-Id: Ia635f32eefc46e22e3f4e45a7885f492bb967a99
Closes-Bug: #1436653
2015-04-01 08:35:39 +05:30
Jenkins
493a33a024 Merge "Fix repr of FloatingIPBulk" 2015-03-31 21:34:37 +00:00
Eugeniya Kudryashova
d614dbcab9 Fix repr of FloatingIPBulk
While creating floting ip range returned by API object doesn't contains
attribute 'address', but repr tries to get it. So change list to return
objects of FloatingIP and add repr to FloatingIP,
also changed repr of FloatingIpRange to return actual range of addresses

Closes-bug: #1437244
Change-Id: Ia9e30a3f3d82fa8dde113b40d2da372bf1e7a086
2015-03-31 20:16:14 +03:00
Jenkins
33c70dbe20 Merge "Don't record time when self.timing is False" 2015-03-28 01:10:37 +00:00
Jenkins
5a6f8717f7 Merge "Corrected help for nova boot when attaching block device" 2015-03-26 18:46:30 +00:00
tengqm
038c0dc624 Fix comments on metadata number limitation
The comment says that at most five key/value pairs are allowed but it is
not true, at least not true any more, based on some experiments. This
patch fixes the comment to avoid confusion.

Change-Id: I098ded910a6c7c2a7f967e6afe14e93d231d7ace
2015-03-26 16:36:12 +08:00
yatinkarel
4cef067d41 Corrected help for nova boot when attaching block device
When adding block device with swap format, size is in MB and for
other formats it is in GB, so help is modified to show correct
description

Change-Id: I0472f2a86ed2a2a651d7bbb08976e8813fb72041
Closes-Bug: #1407383
2015-03-26 12:09:27 +05:30
Chris Yeoh
0343dff973 Removes reference to v3 nova api from novaclient docs
The Nova V3 API no longer exists. Although a version of the framework
exists in Nova as part of the new V2.1 API which is equivalent to
the V2 API there is no need to make mention of V3 in the novaclient
documentation.

In future we will be distinguish between legacy Nova API support (one
implementation of V2) and microversions Nova API support (the
new one) to reduce confusion around version numbers which will change quite
a bit without the framework changing.

Co-Authored-By: Andrey Kurilin <akurilin@mirantis.com>

Change-Id: Id0ff51e1165cb267045d7a63aff13c0e41336738
2015-03-25 12:15:40 +10:30
ZhiQiang Fan
1c39f8fabf Don't record time when self.timing is False
The expected behavior is when timing is True, then we record each
request's time, then we should call reset_timings() to release memory.

However, the shell, client.{HTTPClient,SessionClient} will record each
request's time no matter what timing is set, then after long running
time in service like ceilometer-agent-compute, the memory keeps increasing.

We'd better not record request's time when timing is set to False.
Users are not responiable to call reset_timings() when they don't want
timing functionality.

Change-Id: I3e7d2fadf9a21be018781d528a1b6562228da6dd
Closes-Bug: #1433491
2015-03-21 19:27:36 +08:00
OpenStack Proposal Bot
025bcfb1e3 Updated from global requirements
Change-Id: I88ec1f9d3356c8d384b56abc06696755ee3fa2a5
2015-03-21 00:17:56 +00:00
jichenjc
8679eedb83 Revert 'Remove image to local block device mapping'
https://review.openstack.org/#/c/153203/3 added check
for novaclient, removed the logic for both
--image and --block-device are added.

But actually the following valid boot command failed
due to the change here, so this patch reverted original
one and add some descriptions to avoid further removal.

nova boot test-vm --flavor m1.medium --image centos-vm-32
--nic net-id=c3f40e33-d535-4217-916b-1450b8cd3987
--block-device id=26b7b917-2794-452a-95e5-2efb2ca6e32d,bus=sata,
source=volume,bootindex=1

Change-Id: Ia29e63c72b34d3038aa591c466425e65edf5755b
Partial-Bug: #1433609
2015-03-19 22:58:17 +08:00
melanie witt
e0f5072907 Ensure the use of volume endpoint in volumes apis
Currently, several of the volumes apis depend on callers to pass
service_type='volume' as a parameter when creating a client object,
to route correctly. The problem is, it makes it impossible for
callers to work with both the compute and volume endpoints at the
same time. They can either work with compute and have volumes.* calls
return 404, or they can work with volume and have servers.* images.*
flavors.* calls return 404.

The CLI sets service_type='volume' for client objects for the
following commands via a decorator:

volume-list
volume-show
volume-create
volume-delete
volume-snapshot-list
volume-snapshot-show
volume-snapshot-create
volume-snapshot-delete
volume-type-list
volume-type-create
volume-type-delete

With this change, the service_type 'volume' is set in the api,
so the decorators on the shell commands are no longer needed.

Closes-Bug: #1431154

Change-Id: I11b48ac14fa4c64d8aae528552ec5b363be384c5
2.23.0
2015-03-17 01:19:11 +00:00
Jenkins
b41d319308 Merge "Add missing servers.create parameter documentation" 2015-03-12 22:33:53 +00:00
Jenkins
49d6d9278c Merge "Add Client object to documentation" 2015-03-12 18:32:48 +00:00
Jenkins
5e0e430d00 Merge "Add a test for the TCPKeepAliveAdapter" 2015-03-12 18:32:40 +00:00