From 2c593b1d75a3302be8d88970f7bb26b40a45ae90 Mon Sep 17 00:00:00 2001
From: Robert Latta <robert.latta@geant.org>
Date: Fri, 5 Apr 2019 14:35:54 +0100
Subject: [PATCH] added details for infinera trap metadata

---
 README.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 90 insertions(+)

diff --git a/README.md b/README.md
index f8953e58..43c2c71f 100644
--- a/README.md
+++ b/README.md
@@ -419,6 +419,7 @@ Any non-empty responses are JSON formatted messages.
                     "equipment": {"type": "string"},
                     "other_end_equipment": {"type": "string"},
                     "port": {"type": "string"},
+                    "other_end_port": {"type": "string"},
                     "logical_unit": {
                         "oneOf": [
                             {"type": "integer"},
@@ -578,6 +579,95 @@ Any non-empty responses are JSON formatted messages.
     ```
 
 
+* /infinera-classifier/trap-metadata/*`source-equipment`*/*`source-interface`*
+
+  The source-equipment is the equipment that causes the trap, not the NMS that
+  sends it.
+  
+  The response will be an object containing the
+  metadata, formatted according to the following schema:
+  
+    ```json
+    {
+        "$schema": "http://json-schema.org/draft-07/schema#",
+        "type": "object",
+    
+        "definitions": {
+            "service-info": {
+                "type": "object",
+                "properties": {
+                    "id": {"type": "integer"},
+                    "name": {"type": "string"},
+                    "status": {
+                        "type": "string",
+                        "enum": ["operational", "installed", "planned", "ordered"]
+                    },
+                    "circuit_type": {
+                        "type": "string",
+                        "enum": ["path", "service", "l2circuit"]
+                    },
+                    "service_type": {"type": "string"},
+                    "project": {"type": "string"},
+                    "equipment": {"type": "string"},
+                    "other_end_equipment": {"type": "string"},
+                    "port": {"type": "string"},
+                    "other_end_port": {"type": "string"},
+                    "logical_unit": {
+                        "oneOf": [
+                            {"type": "integer"},
+                            {"type": "string", "maxLength": 0}
+                        ]
+                    },
+                    "other_end_logical_unit": {
+                        "oneOf": [
+                            {"type": "integer"},
+                            {"type": "string", "maxLength": 0}
+                        ]
+                    },
+                    "manufacturer": {
+                        "type": "string",
+                        "enum": ["juniper", "coriant", "infinera",
+                                 "cisco", "hewlett packard",
+                                 "corsa", "graham smith uk ltd",
+                                 "unknown", ""]
+                    },
+                    "card_id": {"type": "string"},
+                    "other_end_card_id": {"type": "string"},
+                    "interface_name": {"type": "string"},
+                    "other_end_interface_name": {"type": "string"}
+                },
+                "additionalProperties": False
+            },
+            "geant-lambdas": {
+                "type": "object",
+                "properties": {
+                    "id": {"type": "integer"},
+                    "name": {"type": "string"},
+                    "status": {
+                        "type": "string",
+                        "enum": ["operational", "installed", "planned", "ordered"]
+                    },
+                },
+                "additionalProperties": False
+            }
+        },
+    
+        "type": "object",
+        "properties": {
+            "services": {
+                "type": "array",
+                "items": {"$ref": "#/definitions/service-info"}
+            },
+            "geant-lambdas": {
+                "type": "array",
+                "items": {"$ref": "#/definitions/geant-lambdas"}
+            },
+        },
+        "additionalProperties": False
+    }
+    ```
+
+
 * /poller/interfaces/*`hostname`*
 
   The response will be the list of active interfaces on the
-- 
GitLab