aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-13 12:37:44 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-09-17 10:27:51 +0300
commitc908ef00845fabdbad0b2bb4f56a4908458d84d8 (patch)
tree9da1618f10eb10b9486546faf884192aca599925
parent41d46f8ee481cac153ce2d1b0667a13e3a50c239 (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: Id93cf1bfdbb5c60614e3e5eca3814d5d16b907a9
-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()