]> git-server-git.apps.pok.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)
committerAdam King <adking@redhat.com>
Thu, 31 Aug 2023 17:35:13 +0000 (13:35 -0400)
commitf447dd2941813aeeeb632fad2e7959daafc87572
tree1b8da610405eb128ce95e25b9bc4bc84f265529b
parent8a1186e3d65bd1fbab6bc42a7c680e131fb03367
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