From 3e63d06f8a4673fc06ca514a0b0676f6be8e0c3a Mon Sep 17 00:00:00 2001 From: Oleksandr Mazur Date: Tue, 10 Dec 2024 11:47:24 +0200 Subject: [PATCH] Utils: Kafka: add missing cfg samples Signed-off-by: Oleksandr Mazur --- .../kafka_data/cfg_ap_basic.json | 48 ++++++++++++++++ .../kafka_data/cfg_ap_basic_invalid.json | 48 ++++++++++++++++ .../kafka_data/cfg_switch_basic.json | 56 +++++++++++++++++++ .../kafka_data/cfg_switch_basic_invalid.json | 56 +++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 utils/kafka_producer/kafka_data/cfg_ap_basic.json create mode 100644 utils/kafka_producer/kafka_data/cfg_ap_basic_invalid.json create mode 100644 utils/kafka_producer/kafka_data/cfg_switch_basic.json create mode 100644 utils/kafka_producer/kafka_data/cfg_switch_basic_invalid.json diff --git a/utils/kafka_producer/kafka_data/cfg_ap_basic.json b/utils/kafka_producer/kafka_data/cfg_ap_basic.json new file mode 100644 index 0000000..3aef18f --- /dev/null +++ b/utils/kafka_producer/kafka_data/cfg_ap_basic.json @@ -0,0 +1,48 @@ +{ + "jsonrpc": "2.0", + "method": "configure", + "params": { + "serial": "MAC_PLACEHOLDER", + "uuid": UUID_PLACEHOLDER, + "when": 0, + "config": { + "ethernet": [ + { + "enabled": true, + "select-ports": [ + "LAN1" + ] + }, + { + "enabled": true, + "select-ports": [ + "LAN2" + ] + } + ], + "interfaces": [ + { + "ethernet": [ + { + "select-ports": [ + "WAN*", + "LAN1", + "LAN2" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "name": "WAN", + "role": "upstream", + "services": [ + "lldp", + "mdns" + ] + } + ], + "uuid": UUID_PLACEHOLDER + } + } +} diff --git a/utils/kafka_producer/kafka_data/cfg_ap_basic_invalid.json b/utils/kafka_producer/kafka_data/cfg_ap_basic_invalid.json new file mode 100644 index 0000000..12fe1d4 --- /dev/null +++ b/utils/kafka_producer/kafka_data/cfg_ap_basic_invalid.json @@ -0,0 +1,48 @@ +{ + "jsonrpc": "2.0", + "method": "configure", + "params": { + "serial": "MAC_PLACEHOLDER", + "uuid": UUID_PLACEHOLDER, + "when": WHEN_PLACEHOLDER, + "config": { + "ethernet": [ + { + "enabled": "YES, TOTALLY ENABLE IT", + "select-ports": [ + "LAN1" + ] + }, + { + "enabled": true, + "select-ports": [ + "LAN2" + ] + } + ], + "interfaces": [ + { + "ethernet": [ + { + "select-ports": [ + "WAN*", + "LAN1", + "LAN2" + ] + } + ], + "ipv4": { + "addressing": "dynamic" + }, + "name": "WAN", + "role": "upstream", + "services": [ + "lldp", + "mdns" + ] + } + ], + "uuid": UUID_PLACEHOLDER + } + } +} diff --git a/utils/kafka_producer/kafka_data/cfg_switch_basic.json b/utils/kafka_producer/kafka_data/cfg_switch_basic.json new file mode 100644 index 0000000..818744d --- /dev/null +++ b/utils/kafka_producer/kafka_data/cfg_switch_basic.json @@ -0,0 +1,56 @@ +{ + "jsonrpc": "2.0", + "method": "configure", + "params": { + "serial": "MAC_PLACEHOLDER", + "uuid": UUID_PLACEHOLDER, + "when": 0, + "config": { + "services": {}, + "ethernet": [ + { + "select-ports": [ + "Ethernet*" + ], + "speed": 1000, + "duplex": "full", + "enabled": true, + "poe": { + "admin-mode": true + } + } + ], + "interfaces": [ + { + "vlan": { + "id": 1, + "proto": "802.1q" + }, + "ethernet": [ + { + "select-ports": [ + "Ethernet*" + ], + "vlan-tag": "un-tagged" + } + ], + "role": "upstream", + "name": "mgmt-vlan" + } + ], + "switch": { + "loop-detection": { + "instances": [ + { + "enabled": true, + "id": 1, + "priority": 32768 + } + ], + "protocol": "rpvstp" + } + }, + "uuid": UUID_PLACEHOLDER + } + } +} diff --git a/utils/kafka_producer/kafka_data/cfg_switch_basic_invalid.json b/utils/kafka_producer/kafka_data/cfg_switch_basic_invalid.json new file mode 100644 index 0000000..696e08a --- /dev/null +++ b/utils/kafka_producer/kafka_data/cfg_switch_basic_invalid.json @@ -0,0 +1,56 @@ +{ + "jsonrpc": "2.0", + "method": "configure", + "params": { + "serial": "MAC_PLACEHOLDER", + "uuid": UUID_PLACEHOLDER, + "when": 0, + "config": { + "services": {}, + "ethernet": [ + { + "select-ports": [ + "Ethernet*" + ], + "speed": 1000, + "duplex": "full", + "enabled": "YES, TOTALLY ENABLE IT", + "poe": { + "admin-mode": true + } + } + ], + "interfaces": [ + { + "vlan": { + "id": 1, + "proto": "802.1q" + }, + "ethernet": [ + { + "select-ports": [ + "Ethernet*" + ], + "vlan-tag": "un-tagged" + } + ], + "role": "upstream", + "name": "mgmt-vlan" + } + ], + "switch": { + "loop-detection": { + "instances": [ + { + "enabled": true, + "id": 1, + "priority": 32768 + } + ], + "protocol": "rpvstp" + } + }, + "uuid": UUID_PLACEHOLDER + } + } +}