Merge "Display container ip not gateway IP"
This commit is contained in:
commit
0a6239f79a
@ -182,7 +182,7 @@ class DockerContainer(resource.Resource):
|
||||
if name == 'network_ip':
|
||||
client = self.get_client()
|
||||
networkinfo = self._container_networkinfo(client, self.resource_id)
|
||||
return networkinfo['Gateway']
|
||||
return networkinfo['IPAddress']
|
||||
if name == 'network_tcp_ports':
|
||||
client = self.get_client()
|
||||
networkinfo = self._container_networkinfo(client, self.resource_id)
|
||||
|
@ -81,7 +81,7 @@ class DockerContainerTest(HeatTestCase):
|
||||
def test_resource_attributes(self):
|
||||
container = self.create_container('Blog')
|
||||
# Test network info attributes
|
||||
self.assertEqual('172.17.42.1', container.FnGetAtt('network_ip'))
|
||||
self.assertEqual('172.17.0.3', container.FnGetAtt('network_ip'))
|
||||
self.assertEqual('1080', container.FnGetAtt('network_tcp_ports'))
|
||||
self.assertEqual('', container.FnGetAtt('network_udp_ports'))
|
||||
# Test logs attributes
|
||||
|
Loading…
x
Reference in New Issue
Block a user