rpc: do not validate command name in RPCClient.forward

The validation is already done on the server.

This allows manually forwarding commands unknown to the client but known
to the server.

https://fedorahosted.org/freeipa/ticket/4739

Reviewed-By: David Kupka <dkupka@redhat.com>
This commit is contained in:
Jan Cholasta
2016-05-25 12:44:19 +02:00
parent 11de39651f
commit 5a4a29be1c

View File

@@ -971,10 +971,6 @@ class RPCClient(Connectible):
:param args: Positional arguments to pass to remote command.
:param kw: Keyword arguments to pass to remote command.
"""
if name not in self.Command:
raise ValueError(
'%s.forward(): %r not in api.Command' % (self.name, name)
)
server = getattr(context, 'request_url', None)
self.log.info("Forwarding '%s' to %s server '%s'",
name, self.protocol, server)