Notification¶
Command Line Interface¶
Notification has a very rich command-line interface that supports many types of operations on Events, starting services and testing.
Content
notification¶
usage: notification [-h] COMMAND ...
Sub-commands¶
Sub-commands¶
Sub-commands¶
count¶
Counts events.
notification event count [-h] [--begin-offset BEGIN_OFFSET] [--begin-time BEGIN_TIME] [-n NAMESPACE] [--sender SENDER] [-s SERVER_URI] key
Named Arguments¶
-s, –server-uri
The uri of notification server.
-n, –namespace
Namespace of the event. If not set, all namespaces would be handled.
–begin-offset
Begin offset of the event. Defaults to 0
–begin-time
Begin datetime of the event, formatted in ISO 8601.
–sender
Sender of the event.
list¶
Lists events.
notification event list [-h] [--begin-offset BEGIN_OFFSET] [--begin-time BEGIN_TIME] [-n NAMESPACE] [-o table, json, yaml] [--sender SENDER] [-s SERVER_URI] key
Named Arguments¶
-s, –server-uri
The uri of notification server.
-n, –namespace
Namespace of the event. If not set, all namespaces would be handled.
–begin-offset
Begin offset of the event. Defaults to 0
–begin-time
Begin datetime of the event, formatted in ISO 8601.
–sender
Sender of the event.
-o, –output
Possible choices: table, json, yaml, plain.
Output format. Allowed values: json, yaml, plain, table (default: table).
Default: “table”.
listen¶
Listens events
notification event listen [-h] [--begin-offset BEGIN_OFFSET] [--begin-time BEGIN_TIME] [-n NAMESPACE] [-s SERVER_URI] key
Named Arguments¶
-s, –server-uri
The uri of notification server.
-n, –namespace
Namespace of the event. If not set, all namespaces would be handled.
–begin-offset
Begin offset of the event. Defaults to 0
–begin-time
Begin datetime of the event to listen, formatted in ISO 8601.
Default: datetime.now().isoformat().
send¶
Sends an event.
notification event send [-h] [--context CONTEXT] [-n NAMESPACE] [--sender SENDER] [-s SERVER_URI] key value
Named Arguments¶
-s, –server-uri
The uri of notification server.
-n, –namespace
Namespace of the event. If not set, all namespaces would be handled.
–context
Context of the event.
–sender
Sender of the event.
Sub-commands¶
Named Arguments¶
–color
Possible choices: auto, off, on
Do emit colored output (default: auto).
Default: “auto”.