Merge "Display container ip not gateway IP"

This commit is contained in:
Jenkins 2014-03-28 12:20:21 +00:00 committed by Gerrit Code Review
commit 0a6239f79a
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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