Merge "Fix showing events on swift."
This commit is contained in:
commit
0c83ac25a9
@ -136,8 +136,7 @@ class SwiftContainer(resource.Resource):
|
|||||||
return unicode(self.resource_id)
|
return unicode(self.resource_id)
|
||||||
|
|
||||||
def FnGetAtt(self, key):
|
def FnGetAtt(self, key):
|
||||||
url, token_id = self.swift().get_auth()
|
parsed = list(urlutils.urlparse(self.swift().url))
|
||||||
parsed = list(urlutils.urlparse(url))
|
|
||||||
if key == 'DomainName':
|
if key == 'DomainName':
|
||||||
return parsed[1].split(':')[0]
|
return parsed[1].split(':')[0]
|
||||||
elif key == 'WebsiteURL':
|
elif key == 'WebsiteURL':
|
||||||
|
@ -138,8 +138,6 @@ class swiftTest(HeatTestCase):
|
|||||||
container_name = utils.PhysName('test_stack', 'test_resource')
|
container_name = utils.PhysName('test_stack', 'test_resource')
|
||||||
swiftclient.Connection.put_container(
|
swiftclient.Connection.put_container(
|
||||||
container_name, {}).AndReturn(None)
|
container_name, {}).AndReturn(None)
|
||||||
swiftclient.Connection.get_auth().MultipleTimes().AndReturn(
|
|
||||||
('http://server.test:8080/v_2', None))
|
|
||||||
swiftclient.Connection.head_container(
|
swiftclient.Connection.head_container(
|
||||||
mox.IgnoreArg()).MultipleTimes().AndReturn(headers)
|
mox.IgnoreArg()).MultipleTimes().AndReturn(headers)
|
||||||
swiftclient.Connection.delete_container(container_name).AndReturn(None)
|
swiftclient.Connection.delete_container(container_name).AndReturn(None)
|
||||||
@ -152,8 +150,8 @@ class swiftTest(HeatTestCase):
|
|||||||
ref_id = rsrc.FnGetRefId()
|
ref_id = rsrc.FnGetRefId()
|
||||||
self.assertEqual(container_name, ref_id)
|
self.assertEqual(container_name, ref_id)
|
||||||
|
|
||||||
self.assertEqual('server.test', rsrc.FnGetAtt('DomainName'))
|
self.assertEqual('example.com', rsrc.FnGetAtt('DomainName'))
|
||||||
url = 'http://server.test:8080/v_2/%s' % ref_id
|
url = 'http://example.com:1234/v1/%s' % ref_id
|
||||||
|
|
||||||
self.assertEqual(url, rsrc.FnGetAtt('WebsiteURL'))
|
self.assertEqual(url, rsrc.FnGetAtt('WebsiteURL'))
|
||||||
self.assertEqual('82', rsrc.FnGetAtt('ObjectCount'))
|
self.assertEqual('82', rsrc.FnGetAtt('ObjectCount'))
|
||||||
|
Loading…
Reference in New Issue
Block a user