Merge "image: Fixed URL for stores_info"
This commit is contained in:
commit
21aade2f9b
openstack
@ -1733,7 +1733,7 @@ class Proxy(proxy.Proxy):
|
|||||||
:rtype: :class:`~openstack.image.v2.service_info.Store`
|
:rtype: :class:`~openstack.image.v2.service_info.Store`
|
||||||
"""
|
"""
|
||||||
if details:
|
if details:
|
||||||
query['base_path'] = utils.urljoin(_si.Store, 'details')
|
query['base_path'] = utils.urljoin(_si.Store.base_path, 'detail')
|
||||||
return self._list(_si.Store, **query)
|
return self._list(_si.Store, **query)
|
||||||
|
|
||||||
# ====== IMPORTS ======
|
# ====== IMPORTS ======
|
||||||
|
@ -36,6 +36,8 @@ class Store(resource.Resource):
|
|||||||
description = resource.Body('description')
|
description = resource.Body('description')
|
||||||
#: default
|
#: default
|
||||||
is_default = resource.Body('default', type=bool)
|
is_default = resource.Body('default', type=bool)
|
||||||
|
#: properties
|
||||||
|
properties = resource.Body('properties', type=dict)
|
||||||
|
|
||||||
def delete_image(self, session, image, *, ignore_missing=False):
|
def delete_image(self, session, image, *, ignore_missing=False):
|
||||||
"""Delete image from store
|
"""Delete image from store
|
||||||
|
@ -29,6 +29,11 @@ EXAMPLE_STORE = {
|
|||||||
'id': IDENTIFIER,
|
'id': IDENTIFIER,
|
||||||
'description': 'Fast access to rbd store',
|
'description': 'Fast access to rbd store',
|
||||||
'default': True,
|
'default': True,
|
||||||
|
'properties': {
|
||||||
|
"pool": "pool1",
|
||||||
|
"chunk_size": 65536,
|
||||||
|
"thin_provisioning": False,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -49,6 +54,7 @@ class TestStore(base.TestCase):
|
|||||||
self.assertEqual(EXAMPLE_STORE['id'], sot.id)
|
self.assertEqual(EXAMPLE_STORE['id'], sot.id)
|
||||||
self.assertEqual(EXAMPLE_STORE['description'], sot.description)
|
self.assertEqual(EXAMPLE_STORE['description'], sot.description)
|
||||||
self.assertEqual(EXAMPLE_STORE['default'], sot.is_default)
|
self.assertEqual(EXAMPLE_STORE['default'], sot.is_default)
|
||||||
|
self.assertEqual(EXAMPLE_STORE['properties'], sot.properties)
|
||||||
|
|
||||||
@mock.patch.object(exceptions, 'raise_from_response', mock.Mock())
|
@mock.patch.object(exceptions, 'raise_from_response', mock.Mock())
|
||||||
def test_delete_image(self):
|
def test_delete_image(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user