From 48784fffe7bbd58d944c73a78c88f109541e1a2d Mon Sep 17 00:00:00 2001 From: John Mulligan Date: Fri, 23 Jan 2026 14:00:19 -0500 Subject: [PATCH] cephadm: add parent_identity function Add a new parent_identity function that a sub-identity type can use to reconstruct a precise parent identity. Signed-off-by: John Mulligan --- src/cephadm/cephadmlib/daemon_identity.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cephadm/cephadmlib/daemon_identity.py b/src/cephadm/cephadmlib/daemon_identity.py index bfe1a855186..ea8913b1cd3 100644 --- a/src/cephadm/cephadmlib/daemon_identity.py +++ b/src/cephadm/cephadmlib/daemon_identity.py @@ -166,6 +166,12 @@ class DaemonSubIdentity(DaemonIdentity): 'legacy_container_name not valid for DaemonSubIdentity' ) + def parent_identity(self) -> DaemonIdentity: + """Return a new DaemonIdentity object based on the current values of this + DaemonSubIdentity. + """ + return DaemonIdentity(self.fsid, self.daemon_type, self.daemon_id) + @classmethod def from_parent( cls, parent: 'DaemonIdentity', subcomponent: str -- 2.47.3