api: remove 'addr' param from message dispatcher

Now that jsoncomm is using a connection oriented protocol, the
`addr` parameter is not needed[*] and can thus be removed from
the `BaseAPI._message` message dispatcher. Adapt all usages
of it, including the tests.

[*] sendmsg ignores the destination parameter for connection
oriented sockets.
This commit is contained in:
Christian Kellner 2020-07-27 16:09:48 +02:00 committed by Tom Gundersen
parent abbdf06ba5
commit 8388a64ffa
4 changed files with 13 additions and 13 deletions

View file

@ -23,12 +23,12 @@ class APITester(osbuild.api.BaseAPI):
endpoint = "test-api"
def _message(self, msg, _fds, sock, addr):
def _message(self, msg, _fds, sock):
self.messages += 1
if msg["method"] == "echo":
msg["method"] = "reply"
sock.send(msg, destination=addr)
sock.send(msg)
def _cleanup(self):
self.clean = True