Skip to content

Commit

Permalink
docs: re-arrange tosca reference pages
Browse files Browse the repository at this point in the history
  • Loading branch information
aszs committed Oct 3, 2024
1 parent fb69f09 commit d7b2419
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 45 deletions.
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ Table of Contents

TOSCA as Python <dsl.md>

toscaref.rst

packages.rst

secrets.rst
Expand All @@ -50,8 +52,6 @@ Table of Contents

jsonschema.rst

toscaref.rst

glossary.rst

api.rst
Expand Down
2 changes: 1 addition & 1 deletion docs/toscaref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
TOSCA Language Reference
================================

This section describes the YAML syntax of the TOSCA :tosca_spec:`Service templates<DEFN_ELEMENT_SERVICE_TEMPLATE>`
This section describes the syntax of the TOSCA :tosca_spec:`Service templates<DEFN_ELEMENT_SERVICE_TEMPLATE>`

A service template is comprised of several high level sections:

Expand Down
13 changes: 10 additions & 3 deletions docs/toscaref/spec-groups.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Groups
======

``groups`` provide a way of configuring shared behavior for different
sets of ``node_templates``.
sets of ``node_templates``. Groups can optionally have a :ref:`type <group_types>` and properties.

As an Unfurl extension, groups can have other groups as members.

Example
+++++++
Expand All @@ -13,20 +15,25 @@ Example
groups:
group1:
type: my_group_type
members:
- node_template_1
- another_group
another_group:
members:
- node_template_2
Definition
+++++++++++

+------------+----------+------+--------------------------------------+
| Keyname | Required | Type | Description |
+============+==========+======+======================================+
+------------+----------+------+--------------------------------------+
| type | no |string| The group's :ref:`type <group_types>`|
+------------+----------+------+--------------------------------------+
| members | yes | list | A list of group members. Members are |
| | | | group or node template names. |
+------------+----------+------+--------------------------------------+
| properties | no | dict | A dict of properties. |
+------------+----------+------+--------------------------------------+

60 changes: 21 additions & 39 deletions docs/toscaref/spec-outputs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Definition
- no
- string
- An optional description for the output.
* - values
* - value
- yes
- <any>
- The output value. May be anything from a simple value (e.g. port) to a complex value (e.g. hash with values). Output values can contain hard-coded values, inputs, properties and attributes.
Expand All @@ -44,44 +44,26 @@ Example

.. code:: yaml
tosca_definitions_version: tosca_dsl_1_3
imports:
- http://<example URL>/types.yaml
node_templates:
webserver_vm:
type: tosca.nodes.Compute
webserver:
type: tosca.nodes.WebServer
properties:
port: 8080
outputs:
webapp_endpoint:
description: ip and port of the web application
value:
ip: { get_attribute: [webserver_vm, ip] }
port: { get_property: [webserver, port] }
Outputs
+++++++

Outputs are recorded in the :ref:`ensemble.yaml<ensemble_yaml>` and is printed in the console after a job has completed as part of the job summary.

.. code:: yaml
status:
outputs:
url: https://demo.example.com
webapp_endpoint:
description: ip and port of the web application
value:
ip: { get_attribute: [webserver_vm, ip] }
port
Example
-------
topology_template:
node_templates:
webserver_vm:
type: tosca.nodes.Compute
webserver:
type: tosca.nodes.WebServer
properties:
port: 8080
outputs:
webapp_endpoint:
description: ip and port of the web application
value:
ip: { get_attribute: [webserver_vm, ip] }
port: { get_property: [webserver, port] }
Job Status
++++++++++

Outputs are printed in the console after a job has completed as part of the job summary and recorded in the :ref:`ensemble.yaml<ensemble_yaml>`'s status section:

.. code:: yaml
Expand Down

0 comments on commit d7b2419

Please sign in to comment.