LegacyTranslation

Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the Habitat Guide and Python API guide (v2.0) for usage.

class LegacyTranslation(document: ~typing.Dict[str, ~typing.Any], workflow: str, unmapped: ~typing.Mapping[str, ~typing.Any] = <factory>, warnings: ~typing.Tuple[str, ...] = ())[source]

Bases: object

Result of translating one v0 payload into the v1 document layout.

document

The v1 YAML-isomorphic payload (plain dict).

Type:

Dict[str, Any]

workflow

Workflow alias the payload was translated as.

Type:

str

unmapped

v0 settings preserved verbatim under document["legacy"].

Type:

Mapping[str, Any]

warnings

Human-readable notes about lossy or unmapped decisions, intended for the CLI migration report.

Type:

Tuple[str, …]

__init__(document: ~typing.Dict[str, ~typing.Any], workflow: str, unmapped: ~typing.Mapping[str, ~typing.Any] = <factory>, warnings: ~typing.Tuple[str, ...] = ()) → None