Files
archived-openlan-cgw/api/events.yaml
Oleksandr Mazur cbc1ca38f8 API revamp: add optional / mandatory fields specificators, fix description(s)
* Update API to fix some spelling issues;
* Add specificators that specify the mandatoriness of fields in API;
* Add a simple table that maps req->kaka_topic;

Signed-off-by: Oleksandr Mazur <oleksandr.mazur@plvision.eu>
2025-03-03 18:53:41 +02:00

377 lines
12 KiB
YAML

---
# List of events and messages that CGW can raise as a reaction to different
# events that happen within CGW (for example infra device connection).
infra_join:
description:
Event, that CGW generates whenever assigned infra successfully connects to CGW.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- infra_join
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
infra_public_ip:
description:
Peer address of the connected infra, as seen on the socket level
of the CGW.
type: string
connect_message_payload:
description:
Payload of infra CONNECT message
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
infra_leave:
description:
Event, that CGW generates whenever assigned infra disconnects from the CGW.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- infra_leave
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
unassigned_infra_join:
description:
Event, that CGW generates whenever un-assigned infra successfully connects to CGW.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- unassigned_infra_join
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
group_owner_shard_id:
description:
ID of the shard that is the actual owner of the infra group.
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
infra_public_ip:
description:
Peer address of the connected infra, as seen on the socket level
of the CGW.
type: string
connect_message_payload:
description:
Payload of infra CONNECT message
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
unassigned_infra_leave:
description:
Event, that CGW generates whenever unassigned infra disconnects from the CGW.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- unassigned_infra_leave
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
foreign_infra_connection:
description:
Event, that CGW generates whenever foreign (assigned, but connected
to the wrong CGW instance) infra successfully connects to CGW.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- foreign_infra_connection
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
infrastructure_group_infra_capabilities_changed:
description:
Event, that CGW generates whenever CGW detects capabilities change
of the connected assigned infra.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- infrastructure_group_infra_capabilities_changed
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that successfully connected to CGW.
type: string
changes:
description:
List of detected delta- changes / diff in capabilities;
type: array
items:
type: object
properties:
changed:
description:
String-value representing value that changed
type: string
old:
type: string
new:
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
ap_client_join:
description:
Event, that CGW generates whenever it detects topology
change - a new WiFi client connection.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- ap_client_join
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that connected the WiFi ssid of the infra.
type: string
client:
description:
MAC (serial) of the infra client that joined.
type: string
ssid:
description:
SSID that the underlying infra client joined.
type: string
band:
description:
Band on which the underlying infra client joined.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
ap_client_leave:
description:
Event, that CGW generates whenever it detects topology
change - a WiFi client disconnect.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- ap_client_leave
infra_group_id:
type: integer
infra_group_infra:
description:
MAC (serial) of the infra that disconnected the WiFi ssid of the infra.
type: string
client:
description:
MAC (serial) of the infra client that disconnected.
type: string
band:
description:
Band on which the underlying infra client disconnected.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
ap_client_migrate:
description:
Event, that CGW generates whenever it detects topology
change - existing WiFi client migrating from one infra to another
(wifi client connects to AP_1 while was connected to AP_0).
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- ap_client_migrate
infra_group_id:
type: integer
to_infra_group_infra_device:
description:
MAC (serial) of the destination infra to which the WiFi client is migrating to.
type: string
client:
description:
MAC (serial) of the infra client that joined.
type: string
to_ssid:
description:
Destination SSID that the underlying infra client is migrating to.
type: string
to_band:
description:
Destination band on which the underlying infra is migrating on.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been detected by the CGW.
type: integer
infrastructure_state_event_message:
description:
Enveloped infra state event that infra device generates periodically.
The original UCentral State/Healthcheck events are presented in 'payload'.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- infrastructure_state_event_message
event_type:
description:
The UCentral State/Healthcheck event type.
type: string
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
payload:
description:
Payload of infra State or Healthcheck (UCentral) event message.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been received by the CGW on the socket level.
type: integer
infrastructure_realtime_event_message:
description:
Enveloped infra real-time event that infra device generates periodically.
The original UCentral Real-time events are presented in 'payload'.
type:
description: MANDATORY field. Type should be parsed by NB services for matching.
type: string
enum:
- infrastructure_realtime_event_message
event_type:
description:
The UCentral Real-time event type (e.g. Log, Alarm, WifiScan, etc...).
type: string
reporter_shard_id:
description: MANDATORY field.
ID of the shard that handled request and generated this response.
type: integer
payload:
description:
Payload of infra Real-time (UCentral) event message.
type: string
cloud-header:
description:
The infrastructure group and infra cloud header.
This field is optional and might be empty JSON object or missed.
type: string
timestamp:
description: MANDATORY field.
(unix-epoch-time) 16 digits (microseconds) timestamp that indicates exact time
the event had been received by the CGW on the socket level.
type: integer