osc config contexts migrate
Migrate cloud entries of clouds.yaml/secure.yaml into contexts.yaml.
Every cloud becomes a server, a user, (when it is scoped) a scope and a context, all named like the cloud. Clouds whose name is already used in the target file are skipped, and so are clouds that cannot be expressed (the reason is reported). clouds.yaml itself is not modified.
The target file is updated in place: existing entries, comments and formatting are left untouched, the migrated entries are appended to the end of their sections. A flow-style list that already has entries (servers: [{...}]) is refused rather than rewritten.
The user entries carry the credentials (a password, an application credential secret), so a newly created file is only readable by you. Short-lived credentials (token, passcode, access_token, jwt) are not migrated. Settings without a place in contexts.yaml (i.e. compute_api_version) are dropped with a warning.
Usage: osc config contexts migrate [OPTIONS] [CLOUD]...
Arguments:
<CLOUD>— Clouds to migrate (default: all)
Options:
--file <PATH>— Path to the targetcontexts.yaml(default:--os-context-fileor the standard search locations)--set-current <CLOUD>— Make this context thecurrent-contextwhen the file sets none--dry-run— Only show which entries would be added. The entries themselves are not shown: they carry credentials