Documentation ¶
Index ¶
- func GetInstanceID(instanceName string) string
- func GetInstanceName(nodeName, instanceID string) string
- func GetOperation(ctx context.Context, ...) (prov.Operation, error)
- func GetOverlayPath(cfg config.Configuration, taskID, deploymentID string) (string, error)
- func GetTargetCapabilityPropertiesAndAttributesValues(ctx context.Context, deploymentID, nodeName string, op prov.Operation) (map[string]*deployments.TOSCAValue, error)
- func IsOrchestratorHostOperation(op prov.Operation) bool
- func IsRelationshipOperation(op prov.Operation) bool
- func IsRelationshipTargetNodeOperation(op prov.Operation) bool
- func SetOperationLogFields(ctx context.Context, op prov.Operation) context.Context
- type EnvInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetInstanceID ¶
GetInstanceID returns the instance ID from an instance name
func GetInstanceName ¶
GetInstanceName returns the built instance name from nodeName and instanceID
func GetOperation ¶
func GetOperation(ctx context.Context, deploymentID, nodeName, operationName, requirementName, operationHost string, inputs map[string]tosca.ParameterDefinition) (prov.Operation, error)
GetOperation returns a Prov.Operation structure describing precisely operation in order to execute it
func GetOverlayPath ¶
func GetOverlayPath(cfg config.Configuration, taskID, deploymentID string) (string, error)
GetOverlayPath returns the overlay path In case of taskTypeRemoveNodes, it refers the backup overlay
func GetTargetCapabilityPropertiesAndAttributesValues ¶
func GetTargetCapabilityPropertiesAndAttributesValues(ctx context.Context, deploymentID, nodeName string, op prov.Operation) (map[string]*deployments.TOSCAValue, error)
GetTargetCapabilityPropertiesAndAttributesValues retrieves properties and attributes of the target capability of the relationship (if this operation is related to a relationship)
It may happen in rare cases that several capabilities match the same requirement. Values are stored in this way:
- TARGET_CAPABILITY_NAMES: comma-separated list of matching capabilities names. It could be use to loop over the injected variables
- TARGET_CAPABILITY_<capabilityName>_TYPE: actual type of the capability
- TARGET_CAPABILITY_TYPE: actual type of the capability of the first matching capability
- TARGET_CAPABILITY_<capabilityName>_PROPERTY_<propertyName>: value of a property
- TARGET_CAPABILITY_PROPERTY_<propertyName>: value of a property for the first matching capability
- TARGET_CAPABILITY_<capabilityName>_<instanceName>_ATTRIBUTE_<attributeName>: value of an attribute of a given instance
- TARGET_CAPABILITY_<instanceName>_ATTRIBUTE_<attributeName>: value of an attribute of a given instance for the first matching capability
func IsOrchestratorHostOperation ¶
IsOrchestratorHostOperation checks if the operation should be executed on orchestrator host
func IsRelationshipOperation ¶
IsRelationshipOperation checks if an operation is part of a relationship
func IsRelationshipTargetNodeOperation ¶
IsRelationshipTargetNodeOperation checks if an operation is part of a relationship and should be executed on the target node
Types ¶
type EnvInput ¶
An EnvInput represent a TOSCA operation input
func ResolveInputs ¶
func ResolveInputs(ctx context.Context, deploymentID, nodeName, taskID string, operation prov.Operation) ([]*EnvInput, []string, error)
ResolveInputs allows to resolve inputs for an operation
func ResolveInputsWithInstances ¶
func ResolveInputsWithInstances(ctx context.Context, deploymentID, nodeName, taskID string, operation prov.Operation, sourceNodeInstances, targetNodeInstances []string) ([]*EnvInput, []string, error)
ResolveInputsWithInstances used to resolve inputs for an operation