aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-13 12:37:44 +0300
committerScott Murray <scott.murray@konsulko.com>2020-10-01 19:47:06 -0400
commit491bfa79a9e2d7c6b7637b8994a836760e454248 (patch)
tree23e838bce4fb0f32ed3bb4d6b7910bf3773435a7
parent8a32ec3e68e699172b724a8f8f13a227af97fe9c (diff)
Override un/subscribe methods in CANService
All agl-services use 'value' keyword in JSON request for subscription which is set as the default behavior for base.py, however agl-service-can-low uses 'event'. Bug-AGL: SPEC-3585 Signed-off-by: Edi Feschiyan <edi.feschiyan@konsulko.com> Change-Id: I3bd264cf459b49aefc645814fa9a3a1040aa83ca
-rw-r--r--pyagl/services/can.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyagl/services/can.py b/pyagl/services/can.py
index a95327b..12c920a 100644
--- a/pyagl/services/can.py
+++ b/pyagl/services/can.py
@@ -43,6 +43,11 @@ class CANService(AGLBaseService):
async def list(self):
return await self.request('list')
+ async def subscribe(self, event):
+ return await self.request(verb='subscribe', values={'event': event})
+
+ async def unsubscribe(self, event):
+ return await self.request(verb='unsubscribe', values={'event': event})
async def main(loop):
args = CANService.parser.parse_args()