diff options
| author | NiallBunting <niall.bunting@hp.com> | 2015-09-23 14:54:26 +0000 |
|---|---|---|
| committer | Steve Martinelli <stevemar@ca.ibm.com> | 2015-10-06 20:14:34 +0000 |
| commit | 1afb57453387f9f81d755f23d75d583b732e2d12 (patch) | |
| tree | 5a1c11fab97585b4df39b9dc1575e33d770493fe /openstackclient/tests/image/v2/fakes.py | |
| parent | 201b1cee86a4df8ede6c97d962ac331ad0378140 (diff) | |
| download | python-openstackclient-1afb57453387f9f81d755f23d75d583b732e2d12.tar.gz | |
Add tags to `image set`
This adds --tag to the v2 version of `image set`. This
is another step to compatability between the osc image api.
Added merge of tags into existing tags and handling duplicates,
and tests for same.
Co-Authored-By: Steve Martinelli <stevemar@ca.ibm.com>
Change-Id: Ie800fcbf8bbc0978c54ace3278750a18023e8ce4
Diffstat (limited to 'openstackclient/tests/image/v2/fakes.py')
| -rw-r--r-- | openstackclient/tests/image/v2/fakes.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/openstackclient/tests/image/v2/fakes.py b/openstackclient/tests/image/v2/fakes.py index 1a9e301a..11ad455d 100644 --- a/openstackclient/tests/image/v2/fakes.py +++ b/openstackclient/tests/image/v2/fakes.py @@ -13,6 +13,7 @@ # under the License. # +import copy import mock from openstackclient.tests import fakes @@ -25,6 +26,7 @@ image_name = 'graven' image_owner = 'baal' image_protected = False image_visibility = 'public' +image_tags = [] IMAGE = { 'id': image_id, @@ -32,11 +34,16 @@ IMAGE = { 'owner': image_owner, 'protected': image_protected, 'visibility': image_visibility, + 'tags': image_tags } IMAGE_columns = tuple(sorted(IMAGE)) IMAGE_data = tuple((IMAGE[x] for x in sorted(IMAGE))) +IMAGE_SHOW = copy.copy(IMAGE) +IMAGE_SHOW['tags'] = '' +IMAGE_SHOW_data = tuple((IMAGE_SHOW[x] for x in sorted(IMAGE_SHOW))) + member_status = 'pending' MEMBER = { 'member_id': identity_fakes.project_id, @@ -117,6 +124,14 @@ IMAGE_schema = { "type": "string", "description": "Status of the image (READ-ONLY)" }, + "tags": { + "items": { + "type": "string", + "maxLength": 255 + }, + "type": "array", + "description": "List of strings related to the image" + }, "visibility": { "enum": [ "public", |
