Add show resource function to swift container
Note that `entity` object was not added since there is not corresponding manager in swiftclient. Change-Id: I86a6bb4beafa5aa914c8db3b5a1784de874153ea
This commit is contained in:
parent
a21614438c
commit
173a06eb4a
@ -249,6 +249,9 @@ class SwiftContainer(resource.Resource):
|
||||
elif key == self.HEAD_CONTAINER:
|
||||
return headers
|
||||
|
||||
def _show_resource(self):
|
||||
return self.client().head_container(self.resource_id)
|
||||
|
||||
|
||||
def resource_mapping():
|
||||
return {
|
||||
|
@ -157,6 +157,7 @@ class swiftTest(common.HeatTestCase):
|
||||
self.assertEqual('82', rsrc.FnGetAtt('ObjectCount'))
|
||||
self.assertEqual('17680980', rsrc.FnGetAtt('BytesUsed'))
|
||||
self.assertEqual(headers, rsrc.FnGetAtt('HeadContainer'))
|
||||
self.assertEqual(headers, rsrc.FnGetAtt('show'))
|
||||
|
||||
self.assertRaises(exception.InvalidTemplateAttribute,
|
||||
rsrc.FnGetAtt, 'Foo')
|
||||
|
Loading…
x
Reference in New Issue
Block a user