31 Commits

Author SHA1 Message Date
Dean Troyer
201b1cee86 Clean up Image v2 image set command
Make the Image v2 image set command meet at the intersection of the v1
image set command and the v2 image create command:

* Add visibility to the deadopts list and remove the option
* Put the options in the same order as v1 image set
* Make the help text match
* Add --properties
* Move the additional options that do not appear in either v1 image set or
  v2 image create after --property as they are really pre-defined properties
* Add tests for v2 image set to match v1 and then some
* Put the SetImage class in v2/image.py in alphabetical order

Change-Id: I102b914e8ad09a014f6fdd846c5766b6c2eaadb8
2015-10-06 11:11:59 -07:00
Jenkins
c71c78df92 Merge "Glance image set Resolve Fracturing" 2015-09-23 12:28:02 +00:00
NiallBunting
8faabb3bba Glance image set Resolve Fracturing
Currently `image set` uses the new api, where other parts of osc the old
api is used. This deprecates the v2 api in favour of the v1 to maintain
the same commands across osc. However the functionality now remains
there as people could now be using this functionality.

This also adds the --unprotected argument, as in the previous version if
--protected was not supplied it would just make the argument
--unprotected without the users explicit consent.

The patch also fixes the documentation for image set as it was outdated.

Change-Id: I990d20332c80165102badef7ac94ddbeb7824950
Closes-Bug: 1498092
2015-09-23 00:31:41 -04:00
Jenkins
d0427808b8 Merge "Use format_list instead of format_dict when listing images" 2015-09-21 21:54:26 +00:00
Steve Martinelli
e0e9b2bfae Use format_list instead of format_dict when listing images
This currently breaks listing images with --long. Tags are an
array and shouldn't be formatted as a dictionary.

Change-Id: I6d1d85351b58ae4824498774673ebdc8eaa7e420
Closes-Bug: #1498150
2015-09-21 15:18:36 -04:00
Steve Martinelli
d8f7527ff2 Format an images properties and tags
Currently, these properties are each top level keys, they should
all be under a single 'properties' field. Secondly, the tags are
kept as an array, but can be shown as a comma separated string.

Change-Id: Ic769c657a86e768fee38acc40434c377de70a7bc
2015-09-21 18:53:01 +00:00
Monty Taylor
f5b50df8ea Add image create support for image v2
We have it for v1, but v2 is the future. There are two differences,
things in v2 do not go into a properties dict, and the actual image
data needs to get uploaded as a second step.

Closes-Bug: 1405562
Co-Authored-By: Niall Bunting <niall.bunting@hp.com>
Co-Authored-By: Sean Perry <sean.perry@hp.com>
Change-Id: If7b81c4a6746c8a1eb0302c96e045fb0f457d67b
2015-09-21 14:51:03 -04:00
Jenkins
061e0a3670 Merge "add image member commands for image API" 2015-07-20 19:56:32 +00:00
chengkunye
7bb459837b add image member commands for image API
This commit adds the following commands:
    image project add
    image project remove

Closes-Bug: 1402420
Change-Id: I07954e9fa43a3ad6078dd939ecedf9f038299e7b
2015-07-20 10:38:42 -07:00
David Moreau Simard
c830d96e4f Fix image save with API v2
Glanceclient v2 no longer expects the whole image
object, just the image id.

Change-Id: I8f34acfa50ca2d50eb7c9eb1dd5114c4621ad158
Closes-bug: #1475001
2015-07-15 15:41:49 -04:00
Amey Bhide
ce05822a3a Add support for v2 image set command
Partial-Bug: #1405562
Change-Id: Ie30802d720a247748c45099c38450cc6c76bbc2a
2015-05-27 11:49:06 -07:00
Amey Bhide
1bb4bb3baf Minor fix to openstack image show command
image show using V2 api was failing.

openstack --os-image-api-version 2 image show <image_id>
ERROR: openstack _info

Closes-Bug: #1450829
Change-Id: Ic95db2f63d9f5f37e29f0d7e048397da311fbf8c
2015-05-01 08:44:59 -07:00
Lin Yang
af2a665a63 Fix tiny typo in comment message
compatability => compatibility

Change-Id: I3181fb2b83df1e2cb60a9eedf319f2ad0a487dba
Signed-off-by: Lin Yang <lin.a.yang@intel.com>
2015-04-30 17:21:45 +08:00
TerryHowe
3c7b5185ca Handle the pagination for image list
Handle the paginatiion for image list.  We were sorting the
data here, so nothing lost for the generator.

Change-Id: I2d7d4b3d5c9f650953f309c971ac53b64f6f7f77
2015-04-20 11:23:15 -06:00
zhiyuan_cai
42cff38834 Add sort support to image list
Add sort support to image list by sorting items in the client side.
The parameter syntax follows this spec[1].

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

Change-Id: I42b487d18f00f937db1938daa46487cea2a896ab
Closes-Bug: #1410251
2015-02-06 10:57:10 +08:00
Dean Troyer
61a40343fd Add filter to image list
* Hides previously broken --page-size option
* Adds --property to image list for filtering on properties
* Adds Visibility, Protected, Owner, Properties/Tags to --long output
* Adds api.utils.simple_filter() for selecting matches out of a list
  of objects
* Adds tests for all of the above
* Updates image docs

There are additional filtering options to be added in later reviews.

Change-Id: I32feff0ad61aae749b33621c817658d7dc90c3aa
Closes-bug: 1401902
2015-01-27 19:17:35 -06:00
Dean Troyer
1ecf1bee2d Begin low-level API for Image v1 and v2
image list for v1 and v2:
* Add --public|--private to command parsers
* Implement local public/private filtering for v1 image_list()
* Pass public/private filter to server for v2 image_list()

Change-Id: Ie7c24ea2d1bf2b3b1b7fa342eb45fee45894634d
2015-01-20 17:01:23 -06:00
Steve Martinelli
0d7a50d384 Command doc: image
Change-Id: Ib1563b58351315dc2a44ad77882f8c834a1214c0
2015-01-09 00:16:21 -05:00
wanghong
470b7e53a8 add multi-delete support for compute/image/net/volume
This is part1, add support for these objects:
compute.server
imagev1.image
imagev2.image
network.network
volume.volume
volume.backup
volume.snapshot

Closes-Bug: #1400597
Change-Id: Ice21fee85203a8a55417e0ead8b509b8fd6705c1
2014-12-23 09:31:10 +08:00
Steve Martinelli
c8b3f23733 Change help text for image save command
Change-Id: Ib2aecb68ffa06f9ac831131944c98c49cf99c75a
Closes-Bug: #1372070
2014-09-21 12:02:11 -04:00
Jenkins
7b70143695 Merge "Add more columns to image list output" 2014-07-26 22:20:19 +00:00
Steve Martinelli
6e1fa8b27d Change V2 image tests to actually run V2 image code
The current tests for image do not run v2 image code, changing
that portion also made it's only test fail.
I opted to change the image delete code and not the test, since
passing the object ID is more in line with the rest of the
project code.

Change-Id: I62e13c063a5d68279dbbf31e59266db6285d73bf
2014-07-25 01:16:01 -04:00
Steve Martinelli
e1c32b8224 Add more columns to image list output
Add disk_format, container_format, size and status to image list
command. Added tests as well.

Change-Id: I8e3822c6d46d0020fc706955c026549f6c635587
Closes-Bug: #1348475
2014-07-25 01:09:59 -04:00
Christian Berendt
3b485de6b0 replace string format arguments with function parameters
There are files containing string format arguments inside
logging messages. Using logging function parameters should
be preferred.

Change-Id: Ic749ac9eb55564ed631d57055a5a4dfc3aebd169
2014-05-20 13:49:56 +02:00
Dean Troyer
cdaee1b71e Complete Image v1
* Add v1 versions of image delete, list, save, set, show
* Change default Image API to v1

Rebased for https://review.openstack.org/#/c/36772/

Change-Id: Ie2bfe660aac8a0fcf651c67fd1ea4842e76ce377
2013-07-18 14:14:14 -05:00
Steve Martinelli
1a0d5ccc68 Remove api = apiName calls from each method
As discussed in https://review.openstack.org/#/c/36352/ for each
command, we were setting api = identity or volume... etc,
this was for an old way of calling commands that are is no longer
used.

Also removed openstackclient/common/command.py

Change-Id: I2705f35d343f2ae729dc22d6aed0b852b2f8ca19
2013-07-12 11:07:33 -05:00
Josh Kearney
6da61e03f0 Adds image create and delete functionality.
We use the V1 API for `create` since it does not
yet exist in the V2 API in glanceclient.

For blueprint glance-client.

Change-Id: Ifa819c14f6a013f4530d16247a671e5a1c740a28
2013-04-23 14:09:20 -05:00
Jenkins
1bb59c53ee Merge "Use the cliff framework's ShowOne as intended for show image." 2013-01-28 23:50:10 +00:00
Josh Kearney
4c91e7c56e Use the cliff framework's ShowOne as intended for show image.
Also reformat code to follow newer PEP8 version. Full cleanup
and PEP8 version bump coming in later patch.

Change-Id: Ida3dd9a89660b9c4a91449846dd2d6e223ef187a
2013-01-24 21:30:22 -06:00
Josh Kearney
0a4912f9fb Standardize on a copyright header and ensure all files have them.
Change-Id: I64812bca01ca655c9cf9239a0daea84907082a29
2013-01-24 12:02:23 -06:00
Josh Kearney
eb1ae2e9f2 Adds Glance API v2 support.
Change-Id: Ib0325e62a7e50aa94e852a73f9a2cb95daa8d5f6
2013-01-16 11:29:34 -06:00