diff options
author | serena.spinoso <serena.spinoso@polito.it> | 2017-03-16 16:18:24 +0100 |
---|---|---|
committer | serena.spinoso <serena.spinoso@polito.it> | 2017-03-17 09:28:40 +0100 |
commit | 7d6f6962fb9c5ff6d815241d5d15c86c4c6a501b (patch) | |
tree | 6f5ccb3f58f1ba00dd14583d24cdcb829b62bda9 /docs/release/userguide | |
parent | 9dae2445f7f0b5a62850a49d6c42be0d957db955 (diff) |
Add verigraph documentation
Add user guide and test usage documentation.
Add examples of service graphs to use verigraph.
Change-Id: I3e454e03fa2de99bad0761e3e4a0eab98f2e0b23
Signed-off-by: serena.spinoso <serena.spinoso@polito.it>
Diffstat (limited to 'docs/release/userguide')
-rw-r--r-- | docs/release/userguide/feature.userguide.rst | 61 |
1 files changed, 58 insertions, 3 deletions
diff --git a/docs/release/userguide/feature.userguide.rst b/docs/release/userguide/feature.userguide.rst index f1e1362..1113118 100644 --- a/docs/release/userguide/feature.userguide.rst +++ b/docs/release/userguide/feature.userguide.rst @@ -44,7 +44,7 @@ Example: tosca-parser --template-file=vRNC.yaml Parser tosca2heat References -=========================== +============================ Refer two upstream components: https://github.com/openstack/tosca-parser/blob/master/doc/source/usage.rst https://github.com/openstack/heat-translator/blob/master/doc/source/usage.rst @@ -53,7 +53,7 @@ Refer two upstream components: Parser yang2tosca Execution -============================ +=========================== Step 1: Change directory to where the scripts are present. @@ -94,7 +94,7 @@ Example: Parser policy2tosca Execution -============================ +============================= Step 1: To see a list of commands available. @@ -141,3 +141,58 @@ Example: cat example_tosca.yaml + +Parser verigraph Execution +========================== + +VeriGraph is accessible via both a RESTful API and a gRPC interface. + +**REST API** + +Step 1. Change directory to where the service graph examples are present + +.. code-block:: bash + + cd parser/verigraph/examples + +Step 2. Use a REST client (e.g., cURL) to send a POST request (whose body is one of the JSON +file in the directory) + +.. code-block:: bash + + curl -X POST -d @<file_name>.json http://<server_address>:<server_port>/verify/api/graphs + --header "Content-Type:application/json" + +Step 3. Use a REST client to send a GET request to check a reachability-based property between +two nodes of the service graph created in the previous step. + +.. code-block:: bash + + curl -X GET http://<server_addr>:<server_port>/verify/api/graphs/<graphID>/ + policy?source=<srcNodeID>&destination=<dstNodeID>&type=<propertyType> + +where: + +- <graphID> is the identifier of the service graph created at Step 2 +- <srcNodeID> is the name of the source node +- <dstNodeID> is the name of the destination node +- <propertyType> can be ``reachability``, ``isolation`` or ``traversal`` + +Step 4. the output is a JSON with the overall result of the verification process and the partial +result for each path that connects the source and destination nodes in the service graph. + +**gRPC API** + +VeriGraph exposes a gRPC interface that is self-descriptive by its Protobuf file +(``parser/verigraph/src/main/proto/verigraph.proto``). In the current release, Verigraph +misses a module that receives service graphs in format of JSON and sends the proper +requests to the gRPC server. A testing client has been provided to have an example of how +to create a service graph using the gRPC interface and to trigger the verification step. + +1. Run the testing client + +.. code-block:: bash + + cd parser/verigraph + #Client souce code in ``parser/verigraph/src/main/it/polito/grpc/Client.java`` + ant -f buildVeriGraph_gRPC.xml run-client |