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
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
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
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
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
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
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
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
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
Current Client sample doesn't work because the imported class is not
used in the sample. This patch fixes it.
Change-Id: I01d4ec277a8858a14f4e3a50b8de130aa5a4f0b5
The eph_dict expects the format size=value.Catch valueError and return
proper error text
Change-Id: I99ef7efe7dc14aa346913009e244ad4eea0369a9
Closes-bug: #1433200
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
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
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
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
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
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
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
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
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
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
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