Skip to content

Commit 5c174f6

Browse files
authored
fix(imsv2): fixed conflict between creation and update (#605)
fix(imsv2): fixed conflict between creation and update Reviewed-by: Anton Sidelnikov
1 parent 8647ef3 commit 5c174f6

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

otcextensions/sdk/imsv2/v2/image.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ class Image(resource.Resource):
6363
'enterprise_project_id')
6464

6565
name = resource.Body('name')
66-
description = resource.Body('__description')
66+
description = resource.Body('description')
6767
os_type = resource.Body('os_type')
68-
os_version = resource.Body('__os_version')
68+
os_version = resource.Body('os_version')
6969
image_url = resource.Body('image_url')
7070
instance_id = resource.Body('instance_id')
7171
min_disk = resource.Body('min_disk', type=int)
@@ -91,16 +91,16 @@ class Image(resource.Resource):
9191
protected = resource.Body('protected', type=bool)
9292
virtual_size = resource.Body('virtual_size')
9393
hw_firmware_type = resource.Body('hw_firmware_type')
94-
disk_format = resource.Body('disk_format')
95-
container_format = resource.Body('container_format')
9694
hw_vif_multiqueue_enabled = resource.Body('hw_vif_multiqueue_enabled')
9795
checksum = resource.Body('checksum')
9896
size = resource.Body('size')
9997
file = resource.Body('file')
98+
__description = resource.Body('__description')
99+
__os_type = resource.Body('__os_type')
100+
__os_version = resource.Body('__os_version')
100101
os_bit = resource.Body('__os_bit')
101102
platform = resource.Body('__platform')
102103
is_registered = resource.Body('__is_registered')
103-
os_type = resource.Body('__os_type')
104104
image_source_type = resource.Body('__image_source_type')
105105
imagetype = resource.Body('__imagetype')
106106
originalimagename = resource.Body('__originalimagename')

otcextensions/tests/functional/sdk/imsv2/v2/test_image.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def test_create_image(self):
3030
"image_url":
3131
"ims-test-images:rancheros-openstack.img",
3232
"os_version": "CentOS 7.0 64bit",
33+
"os_type": "Linux",
3334
"min_disk": 40,
3435
"image_tags": [{"key": "key2", "value": "value2"},
3536
{"key": "key1", "value": "value1"}]

0 commit comments

Comments
 (0)