diff --git a/.drone.yml b/.drone.yml index 819da14..8e47526 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,4 +10,7 @@ steps: username: from_secret: docker_username password: - from_secret: docker_password \ No newline at end of file + from_secret: docker_password +- name: validate json good + image: fftdf/docker-json-validate + commands: "jsonlint test_val.json" \ No newline at end of file diff --git a/test_not_val.json b/test_not_val.json new file mode 100644 index 0000000..806eb73 --- /dev/null +++ b/test_not_val.json @@ -0,0 +1,143 @@ +{ + "devices":[ + { + "name": "AM-01", + "mac": "18:e8:29:9c:90:ae", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122931927, + "latitude":50.818885422 + } + } + { + "name": "AM-02", + "mac": "18:e8:29:9c:96:ba", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122777700, + "latitude":50.819022680 + } + }, + { + "name": "AM-03", + "mac": "18:e8:29:9c:9f:5c", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122780383, + "latitude":50.819123506 + } + }, + { + "name": "AM-04", + "mac": "18:e8:29:9c:9f:66", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122800499, + "latitude":50.819281945 + } + }, + { + "name": "AM-05", + "mac": "18:e8:29:9c:a3:40", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122950703, + "latitude":50.819309905 + } + }, + { + "name": "AM-06", + "mac": "18:e8:29:9c:a3:ac", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.123155892, + "latitude":50.819188745 + } + }, + { + "name": "AM-07", + "mac": "b4:fb:e4:10:22:26", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.123302072, + "latitude":50.819028611 + } + }, + { + "name": "Bahnhof Troisdorf - Ecke Bahnhof", + "mac": "e0:63:da:b0:92:99", + "gateway_nexthop": "18e829dcc37e", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.150242180, + "latitude":50.814274325 + } + }, + { + "name": "Bahnhof Troisdorf - Ecke Straße", + "mac": "74:83:c2:36:d7:ea", + "gateway_nexthop": "18e829dcc37e", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.150479555, + "latitude":50.814447186 + } + }, + { + "name": "Polizei - MeshPro Ost", + "mac": "78:8a:20:b0:8c:88", + "gateway_nexthop": "18e8295c534c", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.153409868, + "latitude":50.813643886 + } + }, + { + "name": "Rathaus-Nord", + "mac": "74:83:c2:96:56:c5", + "gateway_nexthop": "18e8292f7de6", + "linked_to": "18:e8:29:2f:7d:e6", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.147794664, + "latitude":50.817631439 + } + }, + { + "name": "Rathaus-Süd", + "mac": "74:83:c2:96:55:8d", + "gateway_nexthop": "18e8292f7de6", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.148724049, + "latitude":50.817368776 + } + }, + { + "name": "Am-Krausacker-2", + "mac": "18:e8:29:a0:6f:23", + "gateway_nexthop": "18e8292f7de6", + "gateway": "a28cae6ff604", + "domain": "unifi", + "location": { + "longitude":7.148406208, + "latitude":50.817093402 + } + } + ] + } \ No newline at end of file diff --git a/test_val.json b/test_val.json new file mode 100644 index 0000000..bacf1a2 --- /dev/null +++ b/test_val.json @@ -0,0 +1,143 @@ +{ + "devices":[ + { + "name": "AM-01", + "mac": "18:e8:29:9c:90:ae", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122931927, + "latitude":50.818885422 + } + }, + { + "name": "AM-02", + "mac": "18:e8:29:9c:96:ba", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122777700, + "latitude":50.819022680 + } + }, + { + "name": "AM-03", + "mac": "18:e8:29:9c:9f:5c", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122780383, + "latitude":50.819123506 + } + }, + { + "name": "AM-04", + "mac": "18:e8:29:9c:9f:66", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122800499, + "latitude":50.819281945 + } + }, + { + "name": "AM-05", + "mac": "18:e8:29:9c:a3:40", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.122950703, + "latitude":50.819309905 + } + }, + { + "name": "AM-06", + "mac": "18:e8:29:9c:a3:ac", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.123155892, + "latitude":50.819188745 + } + }, + { + "name": "AM-07", + "mac": "b4:fb:e4:10:22:26", + "gateway_nexthop": "18e82924170a", + "gateway": "a28cae6ff604", + "linked_to": "18:e8:29:24:17:0a", + "location": { + "longitude":7.123302072, + "latitude":50.819028611 + } + }, + { + "name": "Bahnhof Troisdorf - Ecke Bahnhof", + "mac": "e0:63:da:b0:92:99", + "gateway_nexthop": "18e829dcc37e", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.150242180, + "latitude":50.814274325 + } + }, + { + "name": "Bahnhof Troisdorf - Ecke Straße", + "mac": "74:83:c2:36:d7:ea", + "gateway_nexthop": "18e829dcc37e", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.150479555, + "latitude":50.814447186 + } + }, + { + "name": "Polizei - MeshPro Ost", + "mac": "78:8a:20:b0:8c:88", + "gateway_nexthop": "18e8295c534c", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.153409868, + "latitude":50.813643886 + } + }, + { + "name": "Rathaus-Nord", + "mac": "74:83:c2:96:56:c5", + "gateway_nexthop": "18e8292f7de6", + "linked_to": "18:e8:29:2f:7d:e6", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.147794664, + "latitude":50.817631439 + } + }, + { + "name": "Rathaus-Süd", + "mac": "74:83:c2:96:55:8d", + "gateway_nexthop": "18e8292f7de6", + "gateway": "a28cae6ff604", + "location": { + "longitude":7.148724049, + "latitude":50.817368776 + } + }, + { + "name": "Am-Krausacker-2", + "mac": "18:e8:29:a0:6f:23", + "gateway_nexthop": "18e8292f7de6", + "gateway": "a28cae6ff604", + "domain": "unifi", + "location": { + "longitude":7.148406208, + "latitude":50.817093402 + } + } + ] + } \ No newline at end of file