Skip to content

Commit

Permalink
Drop two no longer used methods from prepare step
Browse files Browse the repository at this point in the history
`_prepare_roles` and `_prepare_hosts` were used in the past, before
parallelization was introduced.
  • Loading branch information
happz committed Feb 8, 2024
1 parent fdb16ba commit 39932b3
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions tmt/steps/prepare/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,6 @@ def summary(self) -> None:
self.preparations_applied, 'preparation')
self.info('summary', f'{preparations} applied', 'green', shift=1)

def _prepare_roles(self) -> collections.defaultdict[str, list[str]]:
""" Create a mapping of roles to guest names """
role_mapping = collections.defaultdict(list)
for guest in self.plan.provision.guests():
if guest.role:
role_mapping[guest.role].append(guest.name)
return role_mapping

def _prepare_hosts(self) -> dict[str, str]:
""" Create a mapping of guest names to IP addresses """
host_mapping = {}
for guest in self.plan.provision.guests():
if hasattr(guest, 'guest') and guest.guest:
# FIXME: guest.guest may not be simply an IP address but also
# a host name.
host_mapping[guest.name] = guest.guest
return host_mapping

def go(self, force: bool = False) -> None:
""" Prepare the guests """
super().go(force=force)
Expand Down

0 comments on commit 39932b3

Please sign in to comment.