Browse Source

Add proxy_jump host to topology nodes discovery

When discovering nodes, this allow to use proxy jump SSH
connection info for proxy jump node if it is also a cloud node.

This is typically required when connecting to a cloud
made from vagrant instances. On such case to connect to SSH
vagrant instances (that are cloud nodes) will use SSH
vagrant configuration (IE localhost SSH port) instead of
having to SSH jump to the same host before.

Change-Id: I615d007c99be9cc157c2b7322bddbe6ad6d43014
changes/89/785589/4
Federico Ressi 1 month ago
parent
commit
d6d1b39206
2 changed files with 8 additions and 0 deletions
  1. +7
    -0
      tobiko/openstack/topology/_topology.py
  2. +1
    -0
      tobiko/tripleo/_topology.py

+ 7
- 0
tobiko/openstack/topology/_topology.py View File

@ -267,10 +267,17 @@ class OpenStackTopology(tobiko.SharedFixture):
return digger
def discover_nodes(self):
self.discover_ssh_proxy_jump_node()
self.discover_configured_nodes()
self.discover_controller_nodes()
self.discover_compute_nodes()
def discover_ssh_proxy_jump_node(self):
ssh_client = ssh.ssh_proxy_client()
if ssh_client is not None:
self.add_node(ssh_client=ssh_client,
group='proxy_jump')
def discover_configured_nodes(self):
for address in self.config.conf.nodes or []:
self.add_node(address=address)


+ 1
- 0
tobiko/tripleo/_topology.py View File

@ -67,6 +67,7 @@ class TripleoTopology(topology.OpenStackTopology):
}
def discover_nodes(self):
self.discover_ssh_proxy_jump_node()
self.discover_undercloud_nodes()
self.discover_overcloud_nodes()


Loading…
Cancel
Save