-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added diagrams generated with Cloudnet TOSCA toolbox #50
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,3 +154,6 @@ cython_debug/ | |
|
||
# default opera storage folder | ||
.opera/ | ||
|
||
# PlantUML diagram generation | ||
? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
###################################################################### | ||
# | ||
# None standardized TOSCA types. | ||
# | ||
# Copyright (c) 2021 Inria | ||
# | ||
###################################################################### | ||
|
||
tosca_definitions_version: tosca_simple_yaml_1_3 | ||
|
||
artifact_types: | ||
tosca.artifacts.Implementation.Ansible: | ||
derived_from: tosca.artifacts.Implementation | ||
description: Artifact for the interpreted Ansible language | ||
mime_type: application/x-ansible | ||
file_ext: [ yaml ] | ||
|
||
tosca.artifacts.File.Text: | ||
derived_from: tosca.artifacts.File | ||
description: Artifact for TEXT files | ||
file_ext: [ txt ] | ||
|
||
tosca.artifacts.File.Json: | ||
derived_from: tosca.artifacts.File | ||
description: Artifact for JSON files | ||
file_ext: [ json ] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#! /bin/sh | ||
###################################################################### | ||
# | ||
# Run the Cloudnet TOSCA toolbox. | ||
# | ||
# Copyright (c) 2021 Inria | ||
# | ||
###################################################################### | ||
|
||
# Check that the CLOUDNET_BINDIR environment variable is set correctly. | ||
if [ ! -f ${CLOUDNET_BINDIR}/cloudnet_rc.sh ] | ||
then | ||
echo "The CLOUDNET_BINDIR environment variable is not set correctly!" | ||
exit 1 | ||
fi | ||
Comment on lines
+10
to
+15
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This script can be executed if the user has already installed Cloudnet TOSCA toolbox, right? It would be nice to have also the installation part here in this script. |
||
|
||
# Load cloudnet commands. | ||
. ${CLOUDNET_BINDIR}/cloudnet_rc.sh | ||
|
||
# Copy the toolbox configuration. | ||
cp diagrams/toolbox/tosca2cloudnet.yaml . | ||
|
||
# Compile all xopera-examples service template files. | ||
translate $(grep 'tosca_definitions_version: ' -l -r .) | ||
|
||
# Remove useless generated files. | ||
rm diagrams/*-workflow-diagram.plantuml | ||
|
||
# Generate UML2 diagrams. | ||
generate_uml2_diagrams diagrams/*.plantuml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd also rather see that each diagram would be separated the folder that contains the corresponding example. |
||
|
||
# Remove useless generated files. | ||
rm -rf diagrams/Alloy/ \ | ||
diagrams/DeclarativeWorkflows/ \ | ||
diagrams/ToscaDiagrams/ \ | ||
diagrams/NetworkDiagrams/ \ | ||
diagrams/*.plantuml \ | ||
diagrams/*.svg \ | ||
tosca2cloudnet.yaml |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
###################################################################### | ||
# | ||
# Configuration for Cloudnet TOSCA toolbox. | ||
# | ||
# Copyright (c) 2021 Inria | ||
# | ||
###################################################################### | ||
|
||
# Configuration of the type checker. | ||
TypeSystem: | ||
tosca_normative_types: | ||
tosca_simple_yaml_1_3: | ||
- file:/cloudnet/tosca/profiles/tosca_simple_yaml_1_3/types.yaml | ||
- file:diagrams/toolbox/additional_artifact_types.yaml | ||
|
||
# Configuration of all generators. | ||
Generator: | ||
filename-format: fullname # keep full filenames | ||
|
||
# Configuration of the Alloy generator. | ||
Alloy: | ||
# Target directory where Alloy files are generated. | ||
target-directory: diagrams/Alloy | ||
|
||
# Configuration of the declarative workflow generator. | ||
DeclarativeWorkflows: | ||
# Target directory where declarative workflows are generated. | ||
target-directory: diagrams/DeclarativeWorkflows | ||
|
||
# Configuration of the network diagram generator. | ||
nwdiag: | ||
# Target directory where network diagrams are generated. | ||
target-directory: diagrams/NetworkDiagrams | ||
|
||
# Configuration of the TOSCA diagram generator. | ||
tosca_diagrams: | ||
# Target directory where network diagrams are generated. | ||
target-directory: diagrams/ToscaDiagrams | ||
|
||
# Configuration of the UML2 diagram generator. | ||
UML2: | ||
# Target directory where UML2 diagrams are generated. | ||
target-directory: diagrams | ||
|
||
# Logging configuration. | ||
logging: | ||
loggers: | ||
cloudnet.tosca.configuration: | ||
level: WARNING | ||
cloudnet.tosca.importers: | ||
level: WARNING | ||
cloudnet.tosca.processors: | ||
level: WARNING | ||
cloudnet.tosca.syntax: | ||
level: WARNING | ||
cloudnet.tosca.type_system: | ||
level: WARNING | ||
cloudnet.tosca.declarative_workflows: | ||
level: WARNING | ||
cloudnet.tosca.alloy: | ||
level: WARNING | ||
cloudnet.tosca.network_diagrams: | ||
level: WARNING | ||
cloudnet.tosca.tosca_diagrams: | ||
level: WARNING | ||
cloudnet.tosca.uml2_diagrams: | ||
level: WARNING | ||
cloudnet.tosca.hot: | ||
level: WARNING | ||
root: | ||
level: WARNING |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<map id="tosca-intrinsic-functions-service-uml2-class-diagram_map" name="tosca-intrinsic-functions-service-uml2-class-diagram_map"> | ||
<area shape="rect" id="id1" href="'a'," title="'a'," alt="" coords="565,179,717,192"/> | ||
</map> | ||
Comment on lines
+1
to
+3
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, why is this file different than the others? |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<map id="tosca-policy-triggers-service-uml2-component-diagram1_map" name="tosca-policy-triggers-service-uml2-component-diagram1_map"> | ||
<area shape="rect" id="id1" href="tosca-policy-triggers-service-autoscale-radon.triggers.scaling.AutoScale-sequence-diagram.svg" title="tosca-policy-triggers-service-autoscale-radon.triggers.scaling.AutoScale-sequence-diagram.svg" alt="" coords="621,247,843,264"/> | ||
</map> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<map id="tosca-policy-triggers-service-uml2-component-diagram2_map" name="tosca-policy-triggers-service-uml2-component-diagram2_map"> | ||
<area shape="rect" id="id1" href="tosca-policy-triggers-service-autoscale-radon.triggers.scaling.AutoScale-sequence-diagram.svg" title="tosca-policy-triggers-service-autoscale-radon.triggers.scaling.AutoScale-sequence-diagram.svg" alt="" coords="1052,361,1274,378"/> | ||
</map> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rename this folder to
.cloudnet-tosca-toolbox
for being clearer. It's important that this directory name starts with the dot (.
) to keep it hidden. This is needed because xOpera examples are already separated into folders and we cannot have a folder for generating diagrams on the same level.