# Packages
No description provided by the author
# Functions
BuildAttributeDataFromPath allows to return attribute data from path as below: - instance attribute: _yorc/deployments/<DEPLOYMENT_ID>/topology/instances/<NODE_NAME>/<INSTANCE_NAME>/attributes/<ATTRIBUTE_NAME> - capability attribute: _yorc/deployments/<DEPLOYMENT_ID>/topology/instances/<NODE_NAME>/<INSTANCE_NAME>/capabilities/(/*)*/attributes/<ATTRIBUTE_NAME> - relationship attribute: _yorc/deployments/<DEPLOYMENT_ID>/topology/relationship_instances/<NODE_NAME>/<REQUIREMENT_INDEX>/<INSTANCE_NAME>/attributes/<ATTRIBUTE_NAME>.
CleanupPurgedDeployments definitively removes purged deployments
Deployment are cleaned-up if they have been purged for at least evictionTimeout or if the are in the extraDeployments list.
CreateNewNodeStackInstances create the given number of new instances of the given node and all other nodes hosted on this one and all linked nodes
CreateNewNodeStackInstances returns a map of newly created instances IDs indexed by node name.
DeleteInstance deletes the given instance of the given node from the Consul store.
DeleteRelationshipInstance deletes the instance from relationship instances stored in consul.
DeploymentStatusFromString returns a DeploymentStatus from its textual representation.
DoesDeploymentExists checks if a given deploymentId refer to an existing deployment.
DoesNodeExist checks if a given node exist in a deployment.
GetArtifactsForNode returns a map of artifact name / artifact file for the given node.
GetArtifactsForType returns a map of artifact name / artifact file for the given type.
GetArtifactTypeExtensions returns the extensions defined in this artifact type.
GetBooleanNodeProperty returns the boolean value of a property (default: false).
GetCapabilitiesOfType returns names of all capabilities in a given type hierarchy that derives from a given capability type.
GetCapabilityForRequirement returns the capability associated with a given requirementIndex for the given nodeName.
GetCapabilityProperty retrieves the value for a given property in a given node capability
It returns true if a value is found false otherwise as first return parameter.
GetCapabilityPropertyType retrieves the type for a given property in a given node capability It returns false if there is no such property.
GetCapabilityPropertyValue retrieves the value for a given property in a given node capability
It returns true if a value is found false otherwise as first return parameter.
GetDefaultNbInstancesForNode retrieves the default number of instances for a given node nodeName in deployment deploymentId.
GetDeploymentStatus returns a DeploymentStatus for a given deploymentId
If the given deploymentId doesn't refer to an existing deployment an error is returned.
GetDeploymentTemplateName only return the name of the template used during the deployment.
GetHostedOnNode returns the node name of the node defined in the first found relationship derived from "tosca.relationships.HostedOn"
If there is no HostedOn relationship for this node then it returns an empty string.
GetHostedOnNodeInstance returns the node name and instance name of the instance defined in the first found relationship derived from "tosca.relationships.HostedOn"
If there is no HostedOn relationship for this node then it returns an empty string.
GetImplementationArtifactForExtension returns the implementation artifact type for a given extension.
GetImplementationArtifactForOperation returns the implementation artifact type for a given operation.
GetInputValue tries to retrieve the value of the given input name.
GetInstanceAttribute retrieves the given attribute for a node instance
It returns true if a value is found false otherwise as first return parameter.
GetInstanceAttributeValue retrieves the given attribute for a node instance
It returns true if a value is found false otherwise as first return parameter.
GetInstanceCapabilityAttribute retrieves the value for a given attribute in a given node instance capability
It returns true if a value is found false otherwise as first return parameter.
GetInstanceCapabilityAttributeValue retrieves the value for a given attribute in a given node instance capability
It returns true if a value is found false otherwise as first return parameter.
GetInstanceState retrieves the state of a given node instance.
GetInstanceStateString retrieves the string value of the state attribute of a given node instance.
GetKeyValuePairsNodeProperty returns a key/value string map value of a node property (default: false).
GetMaxNbInstancesForNode retrieves the maximum number of instances for a given node nodeName in deployment deploymentId.
GetMinNbInstancesForNode retrieves the minimum number of instances for a given node nodeName in deployment deploymentId.
GetNbInstancesForNode retrieves the number of instances for a given node nodeName in deployment deploymentID.
GetNbRequirementsForNode returns the number of requirements declared for the given node.
GetNestedDataType return the type of a nested datatype.
GetNodeAttributes retrieves the values for a given attribute in a given node.
GetNodeAttributesNames retrieves the list of existing attributes for a given node.
GetNodeAttributesValues retrieves the values for a given attribute in a given node.
GetNodeCapabilityAttributeNames retrieves the names for all capability attributes of a capability on a given node name.
GetNodeCapabilityType retrieves the type of a node template capability identified by its name
This is a shorthand for GetNodeTypeCapabilityType.
GetNodeInstancesIds returns the names of the different instances for a given node.
GetNodeMetadata retrieves the related node metadata key if exists.
GetNodeProperty retrieves the value for a given property in a given node
It returns true if a value is found false otherwise as first return parameter.
GetNodePropertyValue retrieves the value for a given property in a given node
It returns true if a value is found false otherwise as first return parameter.
GetNodes returns the names of the different nodes for a given deployment.
GetNodesHostedOn returns the list of nodes that are hosted on a given node.
GetNodeType returns the type of a given node identified by its name.
GetNodeTypeCapabilityProperty retrieves the property value of a node type capability identified by its name
It explores the type hierarchy (derived_from) to found the given capability.
GetNodeTypeCapabilityPropertyValue retrieves the property value of a node type capability identified by its name
It explores the type hierarchy (derived_from) to found the given capability.
GetNodeTypeCapabilityType retrieves the type of a node type capability identified by its name
It explores the type hierarchy (derived_from) to found the given capability.
GetNodeTypeImplementingAnOperation returns the first (bottom-up) type in the type hierarchy of a given node that implements a given operation
This is a shortcut for retrieving the node type and calling the GetTypeImplementingAnOperation() function.
GetOperationHostFromTypeOperation return the operation_host declared for this operation if any.
GetOperationHostFromTypeOperationByName return the operation_host declared for this operation if any.
GetOperationImplementationFile allows you when the implementation of an operation is an artifact to retrieve the file of this artifact
The returned file is the raw value.
GetOperationImplementationFileWithRelativePath allows you when the implementation of an operation is an artifact to retrieve the file of this artifact
The returned file is relative to the root of the deployment.
GetOperationImplementationRepository allows you when the implementation of an operation is an artifact to retrieve the repository of this artifact.
GetOperationImplementationType allows you when the implementation of an operation is an artifact to retrieve the type of this artifact.
GetOperationInput retrieves the value of an input for a given operation.
GetOperationInputPropertyDefinitionDefault retrieves the default value of an input of type property definition for a given operation.
GetOperationInputs returns the list of inputs names for a given operation.
GetOperationOutputForNode return a map with in index the instance number and in value the result of the output The "params" parameter is necessary to pass the path of the output.
GetOperationOutputForRelationship retrieves an operation output for a relationship The returned value may be empty if the operation output could not be retrieved.
GetOperationPathAndPrimaryImplementation traverses the type hierarchy to find an operation matching the given operationName.
GetParentType returns the direct parent type of a given type using the 'derived_from' attributes
An empty string denotes a root type.
GetPoliciesForType retrieves all policies with or derived from policyTypeName.
GetPoliciesForTypeAndNode retrieves all policies with or derived from policyTypeName and with nodeName as target.
GetPolicyPropertyValue retrieves the value for a given property in a given policy
It returns true if a value is found false otherwise as first return parameter.
GetPolicyTargets retrieves the policy template targets these targets are node names.
GetPolicyTargetsForType retrieves the policy type targets this targets are node types.
GetPolicyType returns the type of the policy.
GetRelationshipAttributeFromRequirement retrieves the value for a given attribute in a given node instance requirement
It returns true if a value is found false otherwise as first return parameter.
GetRelationshipAttributeValueFromRequirement retrieves the value for a given attribute in a given node instance requirement
It returns true if a value is found false otherwise as first return parameter.
GetRelationshipForRequirement returns the relationship associated with a given requirementIndex for the given nodeName.
GetRelationshipPropertyFromRequirement returns the value of a relationship's property identified by a requirement index on a node
Deprecated: use GetRelationshipPropertyValueFromRequirement instead will be removed in Yorc 4.0.
GetRelationshipPropertyValueFromRequirement returns the value of a relationship's property identified by a requirement index on a node.
GetRelationshipTypeImplementingAnOperation returns the first (bottom-up) type in the type hierarchy of a given relationship that implements a given operation
An error is returned if the operation is not found in the type hierarchy.
GetRepositoryTokenTypeFromName retrieves the token_type of credential for a given repoName.
GetRepositoryTokenUserFromName This function get the credentials (user/token) for a given repoName.
GetRepositoryURLFromName allow you to retrieve the url of a repo from is name.
GetRequirementIndexByNameForNode returns the requirement index which name match with defined requirementName for a given node name.
GetRequirementIndexFromRequirementKey returns the corresponding requirement index from a given requirement key (typically returned by GetRequirementsKeysByTypeForNode).
GetRequirementKeyByNameForNode returns path to requirement which name match with defined requirementName for a given node name.
GetRequirementNameByIndexForNode returns the requirement name for a given node and requirement index.
GetRequirementsIndexes returns the list of requirements indexes for a given node.
GetRequirementsKeysByTypeForNode returns paths to requirements whose name or type_requirement match the given requirementType
The returned slice may be empty if there is no matching requirements.
GetStringArrayNodeProperty returns the string Array value of a node property (default: false) This function returns a nil array for an empty string property value.
GetStringNodeProperty returns the string value of a property.
GetTargetInstanceForRequirement returns the target node and instances associated with a given requirementIndex of the given nodeName/instanceName.
GetTargetNodeForRequirement returns the target node associated with a given requirementIndex for the given nodeName.
GetTargetNodeForRequirementByName returns the target node associated with a given requirementName for the given nodeName.
GetTopologyInputType retrieves the optional data type of the parameter.
GetTopologyOutput returns the value of a given topology output
Deprecated: use GetTopologyOutputValue instead will be removed in Yorc 4.0.
GetTopologyOutputsNames returns the list of outputs for the deployment.
GetTopologyOutputType retrieves the optional data type of the parameter.
GetTopologyOutputValue returns the value of a given topology output.
GetTypeAttributeDataType returns the type of a attribute as defined in its attribute definition
Default value is "string" if not specified.
GetTypeAttributes returns the list of attributes defined in a given type
It lists only attributes defined in the given type not in its parent types.
GetTypeAttributesNames returns the list of attributes names found in the type hierarchy.
GetTypeImplementingAnOperation returns the first (bottom-up) type in the type hierarchy that implements a given operation
An error is returned if the operation is not found in the type hierarchy.
GetTypeImportPath returns the import path relative to the root of a CSAR of a given TOSCA type.
GetTypeProperties returns the list of properties defined in a given type
It lists only properties defined in the given type not in its parent types.
GetTypePropertyDataType returns the type of a property as defined in its property definition
Default value is "string" if not specified.
GetTypes returns the names of the different types for a given deployment.
GetWorkflows returns the list of workflows names for a given deployment.
HasAnyRequirementCapability returns true and the the related node name addressing the capability if node with name nodeName has the requirement with the capability type equal or derived from the provided type otherwise it returns false and empty string.
HasAnyRequirementFromNodeType returns true and the the related node name addressing the capability if node with name nodeName has the requirement with the node type equal or derived from the provided type otherwise it returns false and empty string.
HasScalableCapability check if the given nodeName in the specified deployment, has in this capabilities a Key named scalable.
IsDeploymentNotFoundError checks if an error is a deployment not found error.
IsHostedOn checks if a given nodeName is hosted on another given node hostedOn by traversing the hostedOn hierarchy.
IsInconsistentDeploymentError checks if an error is an inconsistent deployment error.
IsInputNotFound checks if a given error is an error indicating that an input was not found in an operation.
IsNodeDerivedFrom check if the node's type is derived from another type.
IsNodeTemplateImplementingOperation returns true if the node implements the defined operation.
IsOperationImplemented checks if a given operation is implemented either in the node template or in the node type hierarchy
An implemented operation means that it has a non empty primary implementation or file for an implementation artifact.
IsOperationInputAPropertyDefinition checks if a given operation input is a property definition.
IsOperationNotImplemented checks if a given error is an error indicating that an operation is not implemented.
IsTargetForPolicy returns true if the node name is a policy target.
IsTypeAttributeRequired checks if a attribute defined in a given type is required.
IsTypeDerivedFrom traverses 'derived_from' to check if type derives from another type.
IsTypeMissingError checks if the given error is a TypeMissing error.
IsTypePropertyRequired checks if a property defined in a given type is required.
LookupInstanceAttributeValue executes a lookup to retrieve instance attribute value when attribute can be long to retrieve.
NewInconsistentDeploymentError allows to create a new inconsistentDeploymentError error.
NodeHasAttribute returns true if the node type has an attribute named attributeName defined
exploreParents switch enable attribute check on parent types
This is basically a shorthand for GetNodeType then TypeHasAttribute.
NodeHasProperty returns true if the node type has a property named propertyName defined
exploreParents switch enable property check on parent types
This is basically a shorthand for GetNodeType then TypeHasProperty.
ParseDeploymentStatus attempts to convert a string to a DeploymentStatus.
ReadWorkflow reads a workflow definition from Consul and built its TOSCA representation.
SelectNodeStackInstances selects a given number of instances of the given node, all the nodes hosted on this one and all nodes linked to it.
SetAttributeComplexForAllInstances sets the same attribute value to all instances of a given node.
SetAttributeForAllInstances sets the same attribute value to all instances of a given node.
SetCapabilityAttributeComplexForAllInstances sets the same capability attribute value that may be a literal or a complex data type to all instances of a given node.
SetCapabilityAttributeForAllInstances sets the same capability attribute value to all instances of a given node.
SetDeploymentStatus sets the deployment status to the given status.
SetInstanceAttribute sets an instance attribute.
SetInstanceAttributeComplex sets an instance attribute that may be a literal or a complex data type.
SetInstanceCapabilityAttribute sets a capability attribute for a given node instance.
SetInstanceCapabilityAttributeComplex sets an instance capability attribute that may be a literal or a complex data type.
SetInstanceListAttributes sets a list of instance attributes in order to store all attributes together then publish.
SetInstanceListAttributesComplex sets an instance list of attributes that may be a literal or a complex data type All attributes are stored together Then all notifications are published.
SetInstanceRelationshipAttribute sets a relationship attribute for a given node instance.
SetInstanceRelationshipAttributeComplex sets an instance relationship attribute that may be a literal or a complex data type.
SetInstanceState stores the state of a given node instance and publishes a status change event
Deprecated: use SetInstanceStateWithContextualLogs instead will be removed in Yorc 4.0.
SetInstanceStateString stores the state of a given node instance and publishes a status change event
Deprecated: use SetInstanceStateStringWithContextualLogs instead will be removed in Yorc 4.0.
SetInstanceStateStringWithContextualLogs stores the state of a given node instance and publishes a status change event context is used to carry contextual information for logging (see events package).
SetInstanceStateWithContextualLogs stores the state of a given node instance and publishes a status change event context is used to carry contextual information for logging (see events package).
SetNodeInstanceAttribute sets an attribute value to a node instance
Deprecated: Use SetInstanceAttribute will be removed in Yorc 4.0.
SetNodeProperty sets a node property.
SetRelationshipAttributeComplexForAllInstances sets the same relationship attribute value that may be a literal or a complex data type to all instances of a given node.
SetRelationshipAttributeForAllInstances sets the same relationship attribute value to all instances of a given node.
StoreDeploymentDefinition takes a defPath and parse it as a tosca.Topology then it store it in consul under consulutil.DeploymentKVPrefix/deploymentID.
TagDeploymentAsPurged registers current purge time and emit a deployment status change event and a log for the given deployment
The timestamp will be used to evict purged deployments after an given delay.
TypeHasAttribute returns true if the type has a attribute named attributeName defined
exploreParents switch enable attribute check on parent types.
TypeHasCapability checks if a given TOSCA type has a capability which type is derived from capabilityTypeName.
TypeHasProperty returns true if the type has a property named propertyName defined
exploreParents switch enable property check on parent types.
# Constants
DEPLOYED is a DeploymentStatus of type DEPLOYED.
DEPLOYMENT_FAILED is a DeploymentStatus of type DEPLOYMENT_FAILED.
DEPLOYMENT_IN_PROGRESS is a DeploymentStatus of type DEPLOYMENT_IN_PROGRESS.
DockerHubURL is the official URL for the docker hub.
INITIAL is a DeploymentStatus of type INITIAL.
PURGED is a DeploymentStatus of type PURGED.
SCALING_IN_PROGRESS is a DeploymentStatus of type SCALING_IN_PROGRESS.
SingularityHubURL is the official URL for the docker hub.
UNDEPLOYED is a DeploymentStatus of type UNDEPLOYED.
UNDEPLOYMENT_FAILED is a DeploymentStatus of type UNDEPLOYMENT_FAILED.
UNDEPLOYMENT_IN_PROGRESS is a DeploymentStatus of type UNDEPLOYMENT_IN_PROGRESS.
UPDATE_FAILURE is a DeploymentStatus of type UPDATE_FAILURE.
UPDATE_IN_PROGRESS is a DeploymentStatus of type UPDATE_IN_PROGRESS.
UPDATED is a DeploymentStatus of type UPDATED.
# Variables
DefaultVaultClient is the default Vault Client used to resolve get_secret functions it is nil by default and should be set by the one who created the client.
# Structs
AttributeData represents the related attribute data.
AttributeNotifier is an attribute notifying its value changes.
An OperationInputResult represents a result of retrieving an operation input
As in case of attributes it may have different values based on the instance name this struct contains the necessary information to identify the result context.
OperationOutputNotifier is an operation output notifying its value changes.
A TOSCAValue is the result of a resolved property or attribute.
# Interfaces
Notifier represents the action of notify it's value change.
# Type aliases
DeploymentStatus x ENUM( INITIAL, DEPLOYMENT_IN_PROGRESS, DEPLOYED, UNDEPLOYMENT_IN_PROGRESS, UNDEPLOYED, DEPLOYMENT_FAILED, UNDEPLOYMENT_FAILED, SCALING_IN_PROGRESS, UPDATE_IN_PROGRESS, UPDATED, UPDATE_FAILURE, PURGED ).