Pony Universe
The TOSCA elements of the pony universe are intended to be used for splitting & matching and target allocation test cases. For the matching of node templates a specific semantic of the requirement, capability, and relationship types is required. There are several options to find out which relationship type can be used for the matching:
- For requirement and capability types the property requiredRelationshipType can be used to mention the QName of a specific relationship type. This type is selected if it is available in the repository.
- For a relationship type a valid source and valid target can be specified. If there is a relationship type which the requirement type as valid source and the capability types as valid target element, this relationship is selected. If there is no matching the same is checked for the requirement and capability type the original types are derived from.
- It is assumed that two base capability types exist: container and endpoint. Container means the Node Template serves as host and endpoint indicates that a connection is required. Thus, based on the TOSCA YAML Simple Profile either a hostedOn or a connectsTo relationship is required. These types are available in each TOSCA runtime and are the fallback solutions for the matching.
Additionally, for the splitting of topologies the semantic of the relationship types have to be known to identify, e.g., all hosted node templates of a specific node template. For this the relationship types also required a strong inheritance hierarchy. The base type, which has no further parent must be either the type hostedOn or must have as valid target the capability type container. The same applies for the connectsTo semmantics.
The ideas of the different elements in the pony universe are as follows:
- In the universe two different pony breeds are available: shetland_pony and unicorn
- A pony can, for example attendTo a ponycompetition. The relationship type attendTo is derived from the relationship type connectsTo, which has the capability type Endpoint as valid target assigned. A matching between a pony (shetland_pony or unicorn) is possible based on the matching between the requirement type ReqCompetition, added to the Requirement Definitions of the two ponys, and the capability type CapCompetition added to the ponycompetition node type.
- A ponycompetition can requires specific equipement, depending on the environment in which the competition is held. In the pony universe two types of equipement are distinguished: dressageequipment and westernequipment. For the matching the ponycompetition has the requirement type ReqEquipment assigned and the two equipment types the capability type CapEquipment. The relationship type requires used for the matching is derived from hostedOn to indicate the hosting semantics. Additionally, the valid source of the type requires is the requirement type ReqEquipment and the valid source is the capability type CapEquipment. Thus, this relationship type is selected for the matching between these types. The hostedOn relationship has the capability type Container attached. For the case that the specific relationship type requires is not available in a TOSCA runtime, the CapEquipment capability type is derived from the Container type to enable the selection of the fallback base type hostedOn.
- A pony can standsOn either a pasture (Weide), field or straw, which can be hostedOn a stall or LargeStall. For the ponys the requirement type ReqWarmFloor is used to enable a matching depending on the enviroment. The pasture, field and straw provide the capability CapWarmFloor. The relationship type standsOn indicates the ReqWarmFloor requirement type as valid source and the CapWarmFloor capability type as valid target. However, in case this specific relationship type is not available the capability type CapWarmFloor is derived from the capability type Container. To add a clear semantics to the relationship type, it inherits from the relationship type hostedOn.
- In addition to the ReqWarmFloor/CapWarmFloor, the warmth of a Node Template can be specified using the FloorWarmth Policy Type. The Policy Templates FieldFloorWarmth, PastureFloorWarmth, FloorWarmth10 and FloorWarmth30 provide different warmth values. pasture uses the PastureFloorWarmth Policy Template and field the FieldFloorWarmth Policy Template. field is warmer (warmth: 20) than pasture (warmth: 15).
- For matching with different stalls or the extension of areas where straw can be used for the ponys to stand on, the stalls stall and LargeStall are used. For stall the requirement type ReqCanHostStraw and the capability type CapCanHostStraw are added. For LargeStall the requirement type ReqLargeStall and the capability type CapLargeStall are added. For a matching between a requirement and a capability of these types the relationship type hostedOn is selected because no specific relationship type exists and the capability tpye CapCanHostStraw is derived from the capability type Container.
- A pony can eat oat, which can be hostedOn in a trough (Trog). The shetland_pony has the requirement type ReqDryFood attached, while the unicorn has the requirement ReqFood. The type ReqDryFood inherits from the type ReqFood. This mechanisms can be used for testing different matchings because of the type hierarchy. However, currently only the specific relationship type eat is available which has the requirement type ReqFood added as valid source and the capability type CapFood added as valided target. This capability type is assigned to the node type oat to enable the matching between a pony node template and an oat template. CapFood is derived from the base type Endpoint to ensure the connectsTo relationship type as fallback matching solution. The relationship type eat is also derived from connectsTo to make the semantic explicit. For hosting the oat the requirement type ReqCanHostOat is defined and attached to the oat node type and the capability type CapCanHostOat is assigned to the trough node type. The capability type is derived from the type Container and because no specific relationship type is defined, the hostedOn relationship type is used for a matching.
The pony universe is intended to be extended with further elements if required. All extensions should be documented here!