| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.
We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.
Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]
[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328
Change-Id: I732a57361319687ca0a64693f0e60bc0d8f5b3d2
|
|
|
|
|
|
|
|
|
| |
The Glance V1 image format list contains "VDHX", which is a typo.
This change fixes it, using the correct format name, which is "VHDX".
Luckily, this seems to be used only as part of a help string.
Change-Id: I392f25b3ee0ee9ac6024e1670053191e4bba937a
|
|
|
|
|
|
| |
Use latest release 1.1.0 and compatible changes w.r.t pep8
Change-Id: Ifc3b96d98c1a7feff187f953d487e12135887fb9
|
|
|
|
|
|
|
| |
Updated the container_format and disk_format in v1 help text.
Change-Id: I4ebe4982c179450defe8ad5703999f4074ae32f8
Closes-Bug: #1659010
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1.As mentioned in [1], we should avoid usingg
six.iteritems to achieve iterators. We can
use dict.items instead, as it will return
iterators in PY3 as well. And dict.items/keys
will more readable. 2.In py2, the performance
about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: I71c13040318eca6e5ed993e8aa03f8003986a71c
|
|
|
|
|
|
|
|
|
|
|
|
| |
"ploop" image format is supported in upstream Glance
https://review.openstack.org/341633
And similar patch has been added in python-openstackclient:
https://review.openstack.org/411405
Co-Authored-By: yuyafei <yu.yafei@zte.com.cn>
Change-Id: I1471224df97cf5fecfe7f02e549855af81c45848
Related-Bug: 1650342
|
|
|
|
| |
Change-Id: Ie18e1bee3376fdc01685c6f1d3a949c6934296b3
|
|
|
|
|
|
|
| |
Command help message uses help and CLI-Reference generation.
and in convention, help message stops with period ".".
Change-Id: I652afdb5e4d69a0476a0a2dc313ae60ece3b7bbc
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently glanceclient doesn't enforce disk-format or container-format
presence in the command line on image-create when providing image data
(with --file, --location, --copy-from), which means that the POST
request is made with the whole image and error is reported by Glance
API.
This post enforces presence of those arguments when image data is
provided so we can get the error quicker and avoid sending unnecessary
data over the network.
Change-Id: I5914fa9cfef190a028b374005adbf3a804b1b677
Closes-Bug: #1309272
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Now Glance /images/detail API of v1 supports parameter
'changes-since' to query deleted images. But it's missed
in client. This patch will add the parameter.
Related-Bug: #1432701
Change-Id: Id38e3a78b4b2ef680ea04d35e32beb4b9c8efa00
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently when you download an image without specifying
a file or redirecting the output, the image is dumped into
the console as gibberish. We can avoid this if we
check if file is being redirected or if a file is specified.
Change-Id: I257760752f05b82b935cf19fb10573ee7ff1395d
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently when you are trying to update the location of an image which
is not in queued status you will get an error from the Glance API. The
help message for --location and --copy-from arguments should be updated
to inform the user that it works only for images in queued status.
Co-Authored-By: Abhishek Talwar <abhishek.talwar@tcs.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
Change-Id: I82b14ffde3f301d7ffef68e984ba4ad2ae0f8b0f
Closes-Bug: #1220809
|
| |
| |
| |
| |
| |
| |
| | |
This module is required by the _is_image_data_provided function.
Change-Id: I78265209a2f80aaf61bbe25d69e79c939182516c
Closes-Bug: 1432249
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, attempting to upload data to an image which has a status
which is not 'queued' would appear to succeed, when the data has
actually never been sent to the glance server. To the user, it appeared
that their request was successful. This patch adds a check for incoming
image data on the 'image-update' command, and exits with an error if the
specified image does not have the status 'queued'.
Examples:
$ cat os.img | glance image-update d50b0236-b27c-412a-91b9-18ceafa9cc5a
Unable to upload image data to an image which is active.
$ glance image-update --file os.img d50b0236-b27c-412a-91b9-18ceafa9cc5a
Unable to upload image data to an image which is killed.
Change-Id: I91bbd7f86d5851a5e35946c711dba1932283ed79
Closes-Bug: #1395084
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Deleting an already deleted image using admin user is throwing an
error "404 Not Found" which is confusing. Deleting an image that does
not exist throws "No image with a name or ID of 'image-id' exists."
Updated the code so that trying to delete an already deleted image
throws "No image with an ID of 'image-id' exists." error.
Closes-Bug: #1333119
Change-Id: I8f9a6174663337a0f48aafa029a4339c32eb2134
Co-Authored-By: Abhishek Talwar <abhishek.talwar@tcs.com>
Co-Authored-By: Kamil Rykowski <kamil.rykowski@intel.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The oslo.utils libraries are moving away from namespace packages.
This requires oslo.utils>=1.2.0
bp drop-namespace-packages
Change-Id: I803df61e91eabb96329d859aef6bea03530fb84f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This replaces the use of a pattern along the lines of
print(error message)
sys.exit(1)
in a couple of place in the shell. utils.exit does much the same job,
but outputs to stderr.
Change-Id: I1d3b52e0685772c10aa806a8f208eb6dd7a0e7ef
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously, running:
cat something.img | glance image-create --progress --container-format=bare --disk-format=raw
or
cat something.img | glance --os-image-api-version 2 image-upload --progress <image id>
would result in an error. This error was caused by the length of the
input being unknown, so the overall progress cannot be found.
This patch disables the progress bar whenever the size of the input file
cannot be determined.
Change-Id: I6bfef7441864b638194126880241cc2c96d5b18b
Closes-Bug: #1402746
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, using --property-filter with invalid arguments resulted in
a rather cryptic error message:
$ glance image-list --property-filter name
dictionary update sequence element #0 has length 1; 2 is required
Now, something which is human decipherable is printed:
$ glance image-list --property-filter name
Argument --property-filter requires properties in the format KEY=VALUE
Change-Id: I61d19894fd8864bdca2fa3f627da3c7eb1341c51
|
| |
| |
| |
| |
| |
| |
| | |
This module now lives in oslo.utils, so import it from there instead.
Co-Authored-By: Ian Cordasco <ian.cordasco@rackspace.com>
Change-Id: Ib35dc840992433542490670781badd9529ec8947
|
|/
|
|
|
|
|
|
|
| |
Currently when we enter any non-boolean strings in the client, it
accepts it and defaults the value to false. It should check if the
strings are boolean values and respond with an error if they're not.
Closes-Bug: #1394236
Change-Id: Ie498ee1b93524d91a43343f73140446c2cc9ab92
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, if '--public' is specified, an image is created but
it is not marked as public:
$ glance image-create --public --name minus-minus-public --disk-format raw \
--container-format bare < /etc/fstab
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
.
.
.
| is_public | False |
.
.
.
+------------------+--------------------------------------+
This is inconsistent.
'--public' has been deprecated for some time, and has
been removed from devstack (https://review.openstack.org/#/c/39323/),
so we can finally get rid of it.
We now raise the standard error for unsupported arguments.
Change-Id: I15d16f690f9bd92b4cefbc8ed36ed2d171ff22f3
Closes-bug: #1378844
|
|
|
|
|
|
|
|
|
|
| |
Remove all deprecated commands from the shell
since they are no longer used and to keep
the command line menu from looking cluttered.
Closes-bug: #1314218
Change-Id: I66e82872988e3835e4f290f48dfc80538271426c
|
|
|
|
|
| |
Change-Id: Iea1ebc13979a61d7bed397fb79e2b2a85f00c400
Closes-bug: 1342753
|
|
|
|
|
|
|
| |
Add the type to the parameters that require an integer
in the V1 shell to avoid sending an improper request.
Change-Id: Idb1ed39b11ca737fdd42d24e297c142f28dce35c
|
|
|
|
|
|
|
| |
Image-create help text makes reference of a non existing
parameter --copy_from
Change-Id: I26d584c350734bb26a6cf965a2198f0782dd0a9f
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Make help strings consistent to use "." at end of string.
Fix capitalization of API in one help string.
Change-Id: I7cc5289d881c5e58aad9c69b4668584cdeb0b376
|
|/
|
|
|
|
|
|
|
|
|
| |
This patch fixes a bug where both 'location' and 'progress' are passed
as command line arguments. In this case, the 'data' field is not
present in the fields dict and therefore the progress option cannot be
used. A check is added to make sure the user has specified both a local
image file and the progress flag together.
Change-Id: Ia563139ee8b56d54d480534986e4b619a503fbfc
Closes-Bug: #1259357
|
|
|
|
|
|
|
|
|
| |
Using common method 'bool_from_string' from oslo strutils to replace
utils.string_to_bool.
partially implements blueprint common-client-library-2
Change-Id: I23924db3000feadcfe823c6cc979ea9752a13fa9
|
|
|
|
|
|
|
| |
Six.iteritems() replaces dictionary.iteritems() on Python 2 and
dictionary.items() on Python 3.
Change-Id: I12fda5f20d2f4fe8227e45b2fe46b332f63deb97
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Based on current implement, the cli output format will be bad if
the lines are too long. This issue can be fixed by setting 'max_width'.
However, there is a bug against it, see
https://code.google.com/p/prettytable/source/browse/trunk/CHANGELOG?r=85
line 3. So the requirements.txt is updated as well.
docImpact
Fixes bug 1251283
Change-Id: I0d4192ad9d10a3d6d47a8319463a5edb57719a68
|
|
|
|
|
|
| |
H306 - module imports should be in alphabetical order
Change-Id: I1f8fc25b0e6ca23c21c90bda420f42a45141c2e2
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: I38dcbcf1a6c8efe540fcf5f29e782cb3826e583d
Fixes-Bug: #1214176
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Convert print operator usages to print functions.
Fix one instance of outdated "except x,y:" syntactical construct.
Remove usages of local() in string formatting alongway.
Change-Id: Id0673a9183a6ea6bd9bf3f5c6d8e7c5f114ebf01
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Provides command line support for image-create, image-update,
and image-upload using the Glance V2 API. This includes building
help text for create and update based on the image jsonschema
as fetched from the server.
Also fixes bug caused by default warlock patch generation not
matching what Glance expects when updating a core property
which had not originally been set when the image was created.
Related to bp glance-client-v2
Change-Id: I841f9e3d05802f4b794cb6f4849abe03ff0324d9
|
|/
|
|
|
|
|
|
|
|
| |
Enumerated options should have the same format for all enumerated options.
This commit moves all options to the {option1,option2} format.
fixes bug: #1155171
Change-Id: I8e0ecf3896c76021cb027cbbbb3b5564a04aacec
|
|
|
|
|
|
|
|
|
|
|
| |
While trunk devstack was updated for this, stable/folsom and stable/grizzly
are not and grenade is now broken. I'm not sure how long --public was
undocumented but it may be that certain cli args may need to remain deprecated
but supported for longer than we wish.
This reverts commit ce8636b6b3c4b606483cfb2bc405d86224f309bc
Change-Id: I91d4884e470c8fcc611dae62a30fa22d08dbec03
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As noted by bcwaldon the parameter can be removed after updating
Devstack. Should be done after merging the following change:
https://review.openstack.org/#/c/39323/
Change-Id: I8d0f7ab4cccccf022446374a31e03ac913cfb136
|