Skip to content

Commit

Permalink
Merge pull request #314 from stackhpc/upstream/2023.1-2024-08-06
Browse files Browse the repository at this point in the history
Synchronise 2023.1 with upstream
  • Loading branch information
priteau authored Aug 6, 2024
2 parents 36cd0c7 + ff60f19 commit a21cfcf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
4 changes: 0 additions & 4 deletions kayobe/plugins/action/kolla_ansible_host_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ def _get_interface_fact(self, net_name, required, description):
# Get the network interface for this network.
iface = ("{{ '%s' | net_interface }}" % net_name)
iface = self._templar.template(iface)
if iface:
# Ansible fact names replace dashes with underscores.
# FIXME(mgoddard): Is this still required?
iface = iface.replace('-', '_')
if required and not iface:
msg = ("Required network '%s' (%s) does not have an interface "
"configured for this host" % (net_name, description))
Expand Down
20 changes: 0 additions & 20 deletions kayobe/tests/unit/plugins/action/test_kolla_ansible_host_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,6 @@ def test__run_two_interfaces(self):
}
self.assertEqual(expected, result)

def test__run_one_with_dashes(self):
variables = copy.deepcopy(self.variables)
variables["foo_interface"] = "eth-0"
module = self._create_module(variables)
interfaces = [{
"var_name": "kolla_foo_interface",
"network": "foo",
"description": "Foo network",
"required": False,
}]
result = module._run(interfaces, [])
expected = {
"changed": False,
"ansible_facts": {
"kolla_foo_interface": "eth_0",
},
"_ansible_facts_cacheable": False,
}
self.assertEqual(expected, result)

def test__run_interface_not_mapped(self):
module = self._create_module()
interfaces = [{
Expand Down

0 comments on commit a21cfcf

Please sign in to comment.