Spdk/scripts/rpc/notify.py
Maciej Wawryk c7174d9e07 RPC: rename get_notification_types to notify_get_types
Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: I564678a0cff1cf63b2287713b163138bfb17d9ac
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/468934
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
2019-09-24 16:42:41 +00:00

30 lines
578 B
Python

from .helpers import deprecated_alias
@deprecated_alias('get_notification_types')
def notify_get_types(client):
return client.call("notify_get_types")
def get_notifications(client,
id=None,
max=None):
"""
Args:
id First ID to start fetching from
max Maximum number of notifications to return in response
Return:
Notifications array
"""
params = {}
if id:
params['id'] = id
if max:
params['max'] = max
return client.call("get_notifications", params)