Merge "Rename ssh_port to connection_port" into feature/zuulv3
diff --git a/tests/unit/test_executor.py b/tests/unit/test_executor.py
index 5d27663..474859d 100755
--- a/tests/unit/test_executor.py
+++ b/tests/unit/test_executor.py
@@ -416,15 +416,15 @@
job)
def test_getHostList_host_keys(self):
- # Test without ssh_port set
+ # Test without connection_port set
node = {'name': 'fake-host',
'host_keys': ['fake-host-key'],
'interface_ip': 'localhost'}
keys = self.test_job.getHostList({'nodes': [node]})[0]['host_keys']
self.assertEqual(keys[0], 'localhost fake-host-key')
- # Test with custom ssh_port set
- node['ssh_port'] = 22022
+ # Test with custom connection_port set
+ node['connection_port'] = 22022
keys = self.test_job.getHostList({'nodes': [node]})[0]['host_keys']
self.assertEqual(keys[0], '[localhost]:22022 fake-host-key')
diff --git a/zuul/executor/server.py b/zuul/executor/server.py
index 5f0f2b7..3a91995 100644
--- a/zuul/executor/server.py
+++ b/zuul/executor/server.py
@@ -911,7 +911,7 @@
# results in the wrong thing being in interface_ip
# TODO(jeblair): Move this notice to the docs.
ip = node.get('interface_ip')
- port = node.get('ssh_port', 22)
+ port = node.get('connection_port', node.get('ssh_port', 22))
host_vars = dict(
ansible_host=ip,
ansible_user=self.executor_server.default_username,
diff --git a/zuul/model.py b/zuul/model.py
index 3b49591..56d08a1 100644
--- a/zuul/model.py
+++ b/zuul/model.py
@@ -383,7 +383,7 @@
self.public_ipv4 = None
self.private_ipv4 = None
self.public_ipv6 = None
- self.ssh_port = 22
+ self.connection_port = 22
self._keys = []
self.az = None
self.provider = None