metalsmith/releasenotes/notes/states-79b593683c0783d5.yaml
Dmitry Tantsur 02932096df Clean up the edge cases around states
Currently show_instance returns an Instance even if the requested node
is not actually an instance (e.g. just an available node). This change
corrects it. Make list_instances consistent with it.

Also make the states a proper enum to avoid consumers from using invalid
values (I did it several times when working on this patch).

Change-Id: If9aad0d7f4d10a7119d1f0bccc1cc32a918a72e3
2019-01-18 17:49:01 +01:00

18 lines
558 B
YAML

---
features:
- |
The ``Instance.state`` value is now a proper enumeration of type
``metalsmith.InstanceState``.
- |
The ``list_instances`` call now returns any valid instances, not only ones
created by metalsmith. This is consistent with the ``show_instance(s)``
behavior.
deprecations:
- |
Comparing an instance state with strings is deprecated, use enumeration
values instead.
fixes:
- |
Fixes the ``show_instance(s)`` calls to return an exception for nodes that
are not valid instances (state == ``UNKNOWN``).