Commit Graph

196 Commits

Author SHA1 Message Date
Jenkins d4196325eb Merge "Revert "Don't update tags every time"" 2016-08-20 19:16:37 +00:00
Steve Martinelli b78285761d Revert "Don't update tags every time"
This reverts commit e77322c179.

Change-Id: Ida826a2aa888beeb76dbe657b2ccd6cb088157ed
2016-08-19 06:10:14 +00:00
KATO Tomoyuki 3a10936248 Update doc URL
Docs team changed URL for search engine optimization.

Change-Id: I68e2a5d666da55722d5ee2fa4aec2326c0de0946
2016-08-19 07:31:05 +09:00
Jenkins 5de07c3395 Merge "Fix warlock model creation" 2016-08-12 15:15:46 +00:00
Jenkins 7936f173c0 Merge "Don't update tags every time" 2016-08-08 09:09:22 +00:00
dineshbhor 98bbbb88e7 Replace OpenStack LLC with OpenStack Foundation
Change-Id: I5877db07031b12d8fa7ed774ac09d24f8906ea86
Closes-Bug: #1214176
2016-07-26 15:17:14 +05:30
Jenkins 1763e33d3d Merge "Update outdated image shema" 2016-07-16 10:27:18 +00:00
KATO Tomoyuki b660d3247a Update docs URL
Change-Id: Id8b1b97a85534c4398b3c49648c6e2f2df3ee20e
Related:-Bug: #1602266
2016-07-13 09:00:24 +09:00
Sabari Kumar Murugesan d7db97c926 Fix warlock model creation
Commands like glance md-namespace-show <namespace> fail because
of a breaking change in warlock 1.3.0's model creation factory
method.

Warlock introduced a new kwarg 'resolver' in model_factory method
but changed its position with the 'base_class' kwarg. Since we
were calling the model_factory method with positional arg, this
broke the model creation.

Closes-Bug: #1596573

Change-Id: Ic7821f4fdb1b752e0c7ed2bc486299a06bf485c1
2016-07-06 18:18:42 -07:00
Mike Fedosin 29cfd07e17 Update outdated image shema
Image schema that is located in glance client
is seriously outdated, we need to updated it
and bring it in line with the server version.

Change-Id: I5a79a84a9c07b9ee821a71a5bd2d61cb4299ad72
2016-06-28 20:59:05 +03:00
Mike Fedosin e77322c179 Don't update tags every time
This code removes unnecessary PATCH requests
for tags updating if they were not modified.

Change-Id: I8eced32f39d0c98e0b26014e7b2341ab6580ff01
Closes-bug: 1587999
2016-06-01 21:02:29 +03:00
Ihar Hrachyshka 3a0007a1c3 Fixed grammar in image-download command description
Change-Id: Ie18e1bee3376fdc01685c6f1d3a949c6934296b3
2016-06-01 10:07:47 +00:00
Jenkins 9ffebbb25e Merge "Enable hacking checks" 2016-04-20 17:13:16 +00:00
Tin Lam cd5925bc60 Enable hacking checks
Enabled following hacking checks from tox.ini:
- H233 Python 3.x incompatible use of print operator
- H303 no wildcard import
- H404 multi line docstring should start with a summary

Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe
Partial-Bugs: #1475054
2016-04-18 16:23:59 +00:00
Dao Cong Tien 9faa9d47aa Fix typos in docstrings and comments
Update a comment to be more meaningful

Change-Id: Ie1aa46917c1a253db92a0dc819803a1d3e795b07
2016-04-11 09:08:02 +07:00
Jenkins 04e1ea73a5 Merge "Ship the default metadata schema in the client" 2016-03-24 18:35:28 +00:00
wangxiyuan d3de9ed16a Ship the default metadata schema in the client
Now the help message of namespace and resource_type are wrong,
we could see a <unavailable> error when try to get the help
information, such as "glance help md-namespace-create".

See the patch[1] to get more information. the patch[1] added
image schema, but the metadata schema are needed as well.

This patch adds the current metadata schema into client, so that
help text can't be rendered when there schema is not available in
the system.

[1]: https://review.openstack.org/#/c/209536/3

Change-Id: I2ab94d8768114a7e5c475310ba094af653627658
Closes-Bug: #1536430
2016-03-24 09:04:20 +00:00
Tom Cocozzello c6904d0332 Docs are generated incorrectly
When docs are generated with pbr command 'warnerrors = True'
there are many doc problems that are shown. This patch fixes
these problems.

Change-Id: Idb804ab924782b6d7d379494987bdba2acbce568
Closes-Bug: #1557235
2016-03-22 13:28:14 +00:00
Jenkins d59e341a4c Merge "Fix location update" 2016-03-11 22:52:56 +00:00
Fei Long Wang 8b6dbb2065 Fix location update
After commit Ieb03aaba887492819f9c58aa67f7acfcea81720e, the command
location-update is totally broken now. This patch removes the updating
for an image from non-empty to empty since it's not supported now.
And also removing the default value of metadata for location-update
cli command because now the only purpose of location-update is updating
the location's metadata, so it doesn't make sense to give it a default
value which may update existing metadata by mistake.

Closes-Bug: #1537626

Change-Id: I9ce98e6c63996bbfdbc56761055e37a871f9d3e2
2016-03-11 12:51:13 +00:00
Danny Al-Gaaf 860908c517 Catch InUseByStore case in do_image_delete
In case do_image_delete() is called on an image that is
in use and can't be deleted by the driver a HTTPConflict
error is raised in glance. Catch this error and print a
propper error message.

Closes-Bug: #1551037

Change-Id: Id17098f27511df8e05e56b8df21e748921223bd9
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2016-03-09 23:27:02 +01:00
Jenkins 6aaa6f2f8c Merge "Handle 403 forbidden on download" 2016-02-29 13:04:08 +00:00
Stuart McLaren 5b9f21b38b Handle 403 forbidden on download
A download of a deactivated image may result in a 403.
The cli should catch this error rather than stack trace.

We also catch other unexpected http responses.

Change-Id: If33fbc3a56cdb02b3ab32a6479a67fff20b4b1a9
Closes-bug: 1523612
2016-02-24 18:31:38 +00:00
Jenkins c58b4cc984 Merge "Auto-generated squash commit" 2016-02-12 00:10:58 +00:00
Flavio Percoco e91d8ec4b8 Auto-generated squash commit
Fix misspellings

Upstream-Change-Id: Ie7ecbe4b33dd0e1ef94b0be85ec3af790cc6fcd7

Correct spelling mistake

Change interable to iterable.

Upstream-Change-Id: I468a87a3df9ed00ed82f1ba0d6abbbc6944cf613

Change-Id: I4de8426cd19ef0bc7c00fe57f8bc3303d0a4f8a4
Co-Authored-by: venkatamahesh <venkatamaheshkotha@gmail.com>
Co-Authored-by: Irina <yuyuesh@cn.ibm.com>
2016-02-11 12:26:55 -04:30
Jenkins 7f9c6d62a5 Merge "v2 - "readOnly" key should be used in schemas" 2016-02-08 10:16:32 +00:00
zwei 22e3bf0234 v2 - "readOnly" key should be used in schemas
If it has a value of boolean true,
    this keyword indicates that the instance property SHOULD NOT be changed,
    and attempts by a user agent to modify the value of this property are expected to be rejected by a server.
    The value of this keyword MUST be a boolean.
    The default value is false.

    Further link for reference: http://json-schema.org/latest/json-schema-hypermedia.html#anchor15

Closes-Bug: #1521581
Depends-On: I279fba4099667d193609a31259057b897380d6f0
Change-Id: I96717506259c0d28500b8747369c47029b1dd9b6
2016-02-04 15:06:13 +08:00
kairat_kushaev 56c27d1cb8 Change metavar for location commands in V2
Currently location-add, location-delete and location-update
shows <ID> in help messages as metavar for image id. It may be
not clear to the users so we need to change this to <IMAGE_ID>.

Change-Id: I59c787e449fa34bc792de179993c55f59734b9fe
Closes-Bug: #1535220
2016-01-20 12:04:29 +03:00
Jenkins ab234553cf Merge "Add help the ability to sort images with multiple keys" 2016-01-18 23:23:33 +00:00
kairat_kushaev a8d7ded8fb Enhance description of instance-uuid option for image-create
Current description of instance-uuid may confuse users because
they may think that instance-uuid can serve as basis for image
but it just stores instance-uuid as image-metadata.
So we need to enhance the description in glanceclient.

Change-Id: I55829d106c9d25374df6538b3071104ee5f215f2
Closes-Bug: #1496822
2016-01-18 12:41:17 +03:00
Jenkins 0b7a6d2379 Merge "Remove location check from V2 client" 2016-01-15 05:27:21 +00:00
kairat_kushaev cea67763c9 Remove location check from V2 client
Glance client has a custom check that generates exception if
location has not been returned by image-get request.
This check should on server side and it should be managed by
policy rules when do location-add action.
That also allows to increase possibility of migrating Heat
to v2[1].

NOTE: After this patch, we'll raise a HTTPBadRequest from
server side instead of HTTPConflict when a user adds a
duplicate location.

[1]: https://review.openstack.org/#/c/240450/

Co-Authored-By: wangxiyuan <wangxiyuan@huawei.com>

Change-Id: I778ad2a97805b4d85eb0430c603c27a0a1c148e0
Closes-bug: #1493026
2016-01-15 01:24:48 +00:00
Jenkins 2db882c41c Merge "Add docker to image_schema on glance v2 cli" 2016-01-14 15:24:07 +00:00
Nicolas Simonds 214dbffc92 Skip schema validation on GET /v2/images/%s
These are server-generated, not user-generated, and schema validation
should not be necessary.

Rework a unit test that enforces this; bad data should be blocked
at ingest, not blocked on reads.

Co-authored-by: Stuart McLaren <stuart.mclaren@hp.com>
Change-Id: Ib1926fec0e858b6eed43c7931a6d6c3a1708e70e
Closes-Bug: 1501046
2016-01-12 11:30:52 +00:00
KATO Tomoyuki a74a3648ec Add help the ability to sort images with multiple keys
Related Change: If79779a4c52c8dc5c4f39192d3d247335a76ba24
This help is also used for OpenStack Command-Line Interface Reference.

Change-Id: Iadce779afebe4aa80026e46f169546aba9055477
Partial-Bug: #1432813
2016-01-04 23:17:41 +09:00
Atsushi SAKAI f7b50c48ef Add docker to image_schema on glance v2 cli
Add docker to v2 image_schema
Add docker to v2 unit tests

This is related to following glance api extension.
  https://review.openstack.org/#/c/249282/

Co-Authored-By: Kairat Kushaev <kkushaev@mirantis.com>

Closes-Bug: #1519402
Change-Id: Ia015f027788b49c1b0002fb3e3a93ac825854596
2015-12-25 12:28:55 +00:00
Long Quan Sha 44d0b02c67 Fix the download error when the image locations are blank
When the image locations are blank, glance client will get a http response
with no content, glance client should show user no data could be found,
instead of processing the blank response body that will lead to exception.

Glance client will also get a 204 response when an image is in a queued
state (this is true for 'master' and liberty/kilo/juno based servers).

Closes-Bug: #1472449

Co-Authored-by: Stuart McLaren <stuart.mclaren@hp.com>
Change-Id: I5d3d02d6aa7c8dd054cd2933e15b4a26e91afea1
2015-12-07 16:45:01 +00:00
Jake Yip 255b10df28 Fix help for image-create
The help for image-create states that --file 'Must be present if images
are not passed to the client via stdin.'

However, doing image-create without --file is a valid operation - it
queues a file to be created.

Change-Id: I8167c6a891fa2540c84e3b888031d90a34a9b5fc
2015-11-30 16:10:43 +00:00
Jenkins af91e2cc0c Merge "Remove self from image-create/image-update" 2015-11-23 18:18:18 +00:00
wangxiyuan 1f1934eb82 Add versions list function
This patch add a function to query the Glance API versions.

DocImpact

Change-Id: I21eeaee3db4ae23f608b68bb319772ac612975b4
Closes-bug: #1511180
2015-11-10 10:28:32 +08:00
Darja Shakhray bff356ed73 Added reactivate/deactivate image using CLI
Added commands 'glance image-reactivate image_id'
and 'glance image-deactivate image_id' for
reactivate/deactivate image using CLI

DocImpact

Change-Id: I2c370c6bf6ff664d94d756cc76aaa983fbdb8869
Closes-bug: #1508356
2015-11-02 14:00:38 +00:00
kairat_kushaev 4fb3092cb0 Add translation to v2 shell
Add translation support for v2 shell help messages. It allows
to detect the messages that needs to be translated for translation
team.

Change-Id: Id1fb0355090d4e223d13c15100e6726e15563670
2015-10-16 11:26:15 +03:00
Jenkins 2fcff11b90 Merge "Add support for setting Accept-Language header" 2015-10-14 15:25:03 +00:00
Jenkins ccc7d4e550 Merge "Support image deletion in batches in v2" 2015-10-14 15:04:12 +00:00
Frode Nordahl ca050ed4c1 Add support for setting Accept-Language header
DocImpact

Closes-Bug: 1480529
Change-Id: I35a37d55edb700a5993bd5cc352335a87a15e47a
2015-10-14 12:57:07 +00:00
Monty Taylor afd1810c12 Stop trying to send image_size to the server
It turns out the server does not support this, and the underlying
code gets very unhappy.

Co-Authored-By:Itisha <ishadewan07@gmail.com>
Change-Id: If67c11da28adbb2d793430d122e3930cc278737f
2015-10-10 12:59:53 +00:00
wangxiyuan bf02b048bf Support image deletion in batches in v2
Client doesn't support image deletion in batches in v2 now.
It's useful. So it's need to add it.

Change-Id: Idf5a6890b3fd01a65fecab2033b21367c30bc6b1
Closes-bug:#1485407
2015-10-10 10:18:02 +08:00
Jenkins 8c0c3c9ed4 Merge "Replace exception_to_str with oslo.utils function" 2015-09-30 18:10:40 +00:00
NiallBunting b396e73e73 Remove self from image-create/image-update
Self is not meant to exist as it is a READ ONLY property, that is not
meant to exist as something the user can change.

Closes-bug: 1496024
Change-Id: I28fd51a4cbef40fc7c90999fe8121611c7f89f21
2015-09-30 10:19:16 +00:00
Jenkins 6e7c64bd5b Merge "Add period in help message" 2015-09-25 16:48:54 +00:00