def __init__(self): super(NotifyAction, self).__init__() self.args = [ Args.get_notify_message_arg("Notification message"), Args.get_notify_topic_arg("Notification topic (severity)"), ] self.flag_func_map = ( (None, self.send), )
def __init__(self): super(NotificationsAction, self).__init__() self.args = [ Args.group( Args.get_list_arg("List all available notifications."), Args.get_notify_send_arg("Send notification"), Args.get_notify_mark_as_read_arg( "Mark notification(s) as read ('*' to mark all as read)."), ), Args.group( Args.get_notify_topic_arg("Notification topic (severity)"), ), Args.get_notify_all_messages_arg( "Select all messages (only unread by default)."), ] self.flag_func_map = ( ("send", self.send), ("mark-as-read", self.mark_as_read), (None, self.list), )