diff --git a/docs/clmc-service.md b/docs/clmc-service.md index 01e5baee9904d7a8c949eb4513e03ab9d596b1fc..b858b1ff42e42a2b73e190e285cd18282eb1be7f 100644 --- a/docs/clmc-service.md +++ b/docs/clmc-service.md @@ -303,7 +303,7 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port * Response: - The response of this request is a JSON content, which contains the result from the Cypher query including forward latencies, reverse latencies and service function response time along with the + The response to this request is a JSON content, which contains the result from the Cypher query including forward latencies, reverse latencies and service function response time along with the calculated round trip time and global tag values for the given service function endpoint. Returns a 400 Bad Request error if the URL parameters are invalid @@ -324,7 +324,7 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port ], "total_forward_latency": 33, "reverse_latencies": [ - 15, 18 + 11, 22 ], "total_reverse_latency": 33, "response_time": 15.75, @@ -369,10 +369,44 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port } ``` -* Generating network measurements +* **POST** ***/graph/network*** - To generate network measurements, which are then used to create the network topology in the Neo4j graph, refer to - the src/service/clmcservice/generate_network_measurements.py script. An example configuration file is src/service/resources/GraphAPI/network_config.json + This API method instructs CLMC to build the network topology in its graph database by querying the SDN controller and retrieving the switch-to-switch latency measurements - + currently only Floodlight is supported as SDN controller. + + * Response: + + The response to this request is a JSON content which shows how many Switch and Cluster nodes were created in the graph. + + Returns a 503 Service Unavailable error if the SDN controller cannot be reached. + + Returns a 501 Not Implemented error if the SDN controller is reachable but cannot respond with a valid JSON content on the API endpoint for querying the network topology. + + * Response Body Example: + + ```json + { + "new_switches_count": 12, + "new_clusters_count": 5 + } + ``` + +* **DELETE** ***/graph/network*** + + This API method instructs CLMC to delete the network topology from its graph database. + + * Response: + + The response to this request is a JSON content which shows how many Switch and Cluster nodes were deleted from the graph. + + * Response Body Example: + + ```json + { + "deleted_switches_count": 12, + "deleted_clusters_count": 5 + } + ``` ## CRUD API for service function endpoint configurations