neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
12 stars 14 forks source link

feat: shortnames for windows machines in Openstack provider + shortname in Ansible inventory #148

Closed pvoborni closed 2 years ago

pvoborni commented 2 years ago

This is an alternative implementation to https://github.com/neoave/mrack/pull/146 consisting of 3 changes. The actual fix, which is very small + 2 preparations where refactoring to pass the req is the biggest.

fix(openstack): use shortnames for Windows vm names Windows machines get hostname often by Cloudbase-Init. But windows host support setting only shortnames (domain is added when the host joins AD domain). OpenStack derives the hostnane from vm name (until nova version 2.90 where hostname attr is added). Thus we set shortname to support this also on older OpenStacks.

feat: add shortname in Ansible inventory output It is added in meta_hostname attribute as often shortnames are referred as hostnames.

refactor: pass req to to_host method Or in other words, do not loose it/return it from wait_till_provisioned method.

That way a provider can loose all info about req