Display container ip not gateway IP
As described in the attribute schema of network_ip we want to show the container ip and not the gateway ip. Change-Id: I86a3c3476d04d437d7b6bb270d3178d0bc7e8136 Partial-Bug: #1296745
This commit is contained in:
parent
c6ea390d58
commit
6c2ed29665
@ -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…
Reference in New Issue
Block a user