From: John Mulligan Date: Fri, 23 Jan 2026 19:00:19 +0000 (-0500) Subject: cephadm: add parent_identity function X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=48784fffe7bbd58d944c73a78c88f109541e1a2d;p=ceph.git 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 --- 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