]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm: add fetch_meta function for reading metadata properties from ctx
authorJohn Mulligan <jmulligan@redhat.com>
Thu, 11 May 2023 14:30:12 +0000 (10:30 -0400)
committerJohn Mulligan <jmulligan@redhat.com>
Thu, 15 Jun 2023 20:35:34 +0000 (16:35 -0400)
commitebf506ea65c553eb8f723067e5d7d06efafa5dd1
treeada1277f2524c1d59fda792a7f41b94fde782b90
parentbdf531788f05c7af44f8ad2355c7f27c24724a59
cephadm: add fetch_meta function for reading metadata properties from ctx

The CephadmContext holds much of cephadm's state, including values from
cli options and (soon) configuration file input. Add a `fetch_meta`
function that reads processed metadata from `meta_properties` or parses
JSON stored on `meta_json`. Parsed JSON is saved to `meta_properties`.
Future code should always use fetch_meta for reading, and only ever
set `meta_properties` as a python dict, not round trip JSON through
meta_json.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
src/cephadm/cephadm.py