From 5f52e0fcbfb927c3adada58e94bd10685535d2bd Mon Sep 17 00:00:00 2001 From: Jan Cholasta Date: Tue, 21 Jun 2016 13:06:20 +0200 Subject: [PATCH] frontend: forward command calls using full name Forward commands to remote server using the full versioned name. https://fedorahosted.org/freeipa/ticket/4427 Reviewed-By: David Kupka --- ipalib/frontend.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ipalib/frontend.py b/ipalib/frontend.py index edea20866..05d19e4f5 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -428,6 +428,10 @@ class Command(HasParam): def topic(self): return type(self).__module__.rpartition('.')[2] + @property + def forwarded_name(self): + return self.full_name + def __call__(self, *args, **options): """ Perform validation and then execute the command. @@ -811,7 +815,8 @@ class Command(HasParam): Forward call over RPC to this same command on server. """ try: - return self.Backend.rpcclient.forward(self.name, *args, **kw) + return self.Backend.rpcclient.forward(self.forwarded_name, + *args, **kw) except errors.RequirementError as e: if self.api.env.context != 'cli': raise