neoave / mrack

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

feat: printout compose_id when using -latest image pointer for Openstack #167

Closed dav-pascual closed 2 years ago

dav-pascual commented 2 years ago

In order to know what image is the "latest" tag pointing to in compose name in Openstack, meta_compose_id and meta_compose_url fields from image meta information are printed out in the log and added to ansible inventory output.

Implemented in a way that allows extension for other providers with extra custom fields in the future, or images that don't have those fields at all.

dav-pascual commented 2 years ago

As I stated, It's only implemented for Openstack images for now, and these values are optional since there are images that don't have meta_compose_id and meta_compose_url fields like Windows images.

Compose Id and compose url are being printed out in mrack log, and mrack database has been extended to output them to ansible inventory file.

The extension of mrack database, consist of a dict in the host, which accepts such extra values. This allow us to use other values from other providers in the future.

dav-pascual commented 2 years ago

Other thing to note, is that host field names are being hardcoded across the project. Could be improved in the future.

dav-pascual commented 2 years ago

Rebased with Black pre-commit hook patch