You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Introduction

Starting El Alto, the VNF Requirements Project requires all diagrams within the project to use PlantUML instead of injecting images of diagrams for re-usability. For detailed documentation on how to use PlantUML, please refer to http://plantuml.com/.

Testing PlantUML syntax

There are a multitude of ways to create PlantUML diagrams and test them out:

  • For a simple web text editor we recommend: https://www.planttext.com/
  • You can also test out the PlantUML syntax in confluence using the "PlantUML Macro" available.

Testing PlantUML in ReadTheDocs

To test how the PlantUML would be rendered in the project there are a few steps to take once you have cloned the repository down.

Adding PlantUML to RST

When you are adding the PlantUML to RST you will start with the directive "uml".

What this looks like:

.. uml::


Next, you can add a caption and alignment.

What this looks like:

.. uml::

  :align: center

  :caption: **Scale Out Sequence Diagram** - Design Time


Then you would paste in the PlantUML text (make sure the spacing is correct, look at example below).

Example:

PlantUML text in RST

Diagram rendered

Rendering diagram locally

To render the diagram locally you would run "tox -e docs" as you would normally, but you need to make a few small changes.

Prerequisites to run locally

  1. Download the latest PlantUML Jar file from:  http://plantuml.com/download
  2. Go into the "conf.py" file and add the following line:
    1. plantuml = 'java -jar /path/to/plantuml.jar'
      1. Where the "/path/to/plantuml.jar" is the full path of where you downloaded the Jar file in step 1.
  3. Run "tox -e docs" and make sure the diagram has rendered properly.

For any questions, concerns or help please contact: Hagop Bozawglanian

  • No labels