]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
python-common: multi-line for yaml 68034/head
authorTimothy Q Nguyen <timqn22@gmail.com>
Thu, 26 Mar 2026 19:16:51 +0000 (12:16 -0700)
committerTimothy Q Nguyen <timqn22@gmail.com>
Tue, 7 Apr 2026 22:46:49 +0000 (15:46 -0700)
commit0a73f686c8734e6545fef48275af56502300a4e7
tree8bf8d1509b0336ddb4cc9fb0aab151fa3322f6fd
parentf665b963355ce1690cbd6dd6551e1f10ea0b5e15
python-common: multi-line for yaml

Currently when running the command ceph orch ls --export
multi-line strings are processed using default interpretation
meaning they could be printed with quotations instead of
the expected | . This causes a hassle for users who want to
copy their specifications to new yaml files as they have to
manually modify the yaml to remove the quotes and add | .
My code fixes this by modifying the yaml representer to
check for multi-line strings and wrapping them in a
YamlLiteralString class which will mark the multi-line string
to be processed with | . I've also added unit tests.

Signed-off-by: Timothy Q Nguyen <timqn22@gmail.com>
src/python-common/ceph/deployment/service_spec.py
src/python-common/ceph/tests/test_service_spec.py