Skip to content
Snippets Groups Projects
Commit cfe4e4ca authored by Nikolay Stanchev's avatar Nikolay Stanchev
Browse files

Documented the API methods for building and deleting the network topology graph

parent 8efa55cc
No related branches found
No related tags found
No related merge requests found
...@@ -303,7 +303,7 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port ...@@ -303,7 +303,7 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port
* Response: * 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. 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 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 ...@@ -324,7 +324,7 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port
], ],
"total_forward_latency": 33, "total_forward_latency": 33,
"reverse_latencies": [ "reverse_latencies": [
15, 18 11, 22
], ],
"total_reverse_latency": 33, "total_reverse_latency": 33,
"response_time": 15.75, "response_time": 15.75,
...@@ -369,10 +369,44 @@ with **/clmc-service** so that the nginx reverse proxy server (listening on port ...@@ -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 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 -
the src/service/clmcservice/generate_network_measurements.py script. An example configuration file is src/service/resources/GraphAPI/network_config.json 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 ## CRUD API for service function endpoint configurations
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment