Skip to content

Commit

Permalink
update host: use looser matching
Browse files Browse the repository at this point in the history
  • Loading branch information
karmab committed Dec 26, 2023
1 parent f145528 commit 4f8bbf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ailib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ def update_host(self, hostname, overrides):
infra_env_id = self.get_infra_env_id(infra_env)
hosts = self.client.v2_list_hosts(infra_env_id=infra_env_id)
matchingids = [host['id'] for host in hosts
if host['requested_hostname'] == hostname or host['id'] == hostname or
if host['requested_hostname'].startswith(hostname) or host['id'].startswith(hostname) or
match_mac(host, hostname)]
if matchingids:
infra_envs[infra_env_id] = matchingids
Expand Down

0 comments on commit 4f8bbf2

Please sign in to comment.