An API endpoint to build a temporal graph and store it in neo4j based on the posted JSON query document.
:raises HTTPBadRequest: if request body is not a valid JSON with the queries per service function
:return: A JSON document containing the posted request body, along with meta data about the built graph (time range and uuid, which can then be reused for other API calls)
:return: A JSON document containing metadata about the built graph (time range and uuid, which can then be reused for other API calls)
"""
try:
...
...
@@ -91,7 +92,8 @@ class GraphAPI(object):
"""
An API endpoint to delete a temporal graph associated with a uuid generated by the CLMC service.
:return: A JSON document containing the UUID of the deleted subgraph
:return: A JSON document containing the number of deleted nodes.
:raises HTTPNotFound: if the request is not associated with any subgraph
"""
...
...
@@ -110,6 +112,7 @@ class GraphAPI(object):
An API endpoint to run the round trip time cypher query over the graph associated with a given request ID.
:return: A JSON response with a list of forward latencies, reverse latencies and SF endpoint response time.
:raises HTTPBadRequest: if the request URL doesn't contain the required URL query parameters
:raises HTTPNotFound: if the request is not associated with any subgraph or the compute node / endpoint node doesn't exist
"""
...
...
@@ -213,7 +216,7 @@ class GraphAPI(object):
"""
An API endpoint to build/update the network topology in the neo4j graph.
:return: A JSON response with the number of switches and clusters that were built.
:return: A JSON response with the number of switches, clusters and ues that were built.
"""
graph=Graph(host=self.request.registry.settings['neo4j_host'],password=self.request.registry.settings['neo4j_password'])# connect to the neo4j graph db
...
...
@@ -326,7 +329,7 @@ class GraphAPI(object):
"""
An API endpoint to delete the network topology in the neo4j graph.
:return: A JSON response with the number of switches and clusters that were deleted.
:return: A JSON response with the number of switches, clusters and ues that were deleted.
"""
graph=Graph(host=self.request.registry.settings['neo4j_host'],password=self.request.registry.settings['neo4j_password'])# connect to the neo4j graph db