IMDS.Providers.OpenStack (imds v1.0.0)

Copy Markdown

OpenStack Compute (nova) metadata service.

The service answers on the link-local address 169.254.169.254. From the Victoria release, nova also answers on the IPv6 address fe80::a9fe:a9fe. That address has no route without an interface name, and a URL cannot carry an interface for a link-local address, so the IPv6 address is out of scope. The provider reads the OpenStack metadata document /openstack/latest/meta_data.json and the machine type from the EC2-compatible path /latest/meta-data/instance-type.

The document holds the instance UUID, the instance name, the hostname, the availability zone and the project ID. Nova reports no region, so region is nil. The machine type comes from the EC2-compatible path and is nil when that path is absent, because OpenStack documents the EC2-compatible paths as a compatibility layer that a later release can remove.

Detection needs the instance UUID and one more nova field, the launch index or the hostname.

Summary

Functions

Return the metadata path of the OpenStack metadata document.

Functions

path()

@spec path() :: binary()

Return the metadata path of the OpenStack metadata document.