congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
TopologyUtils.updateGroupMembers
Code IndexAdd Tabnine to your IDE (free)

How to use
updateGroupMembers
method
in
org.alien4cloud.tosca.utils.TopologyUtils

Best Java code snippets using org.alien4cloud.tosca.utils.TopologyUtils.updateGroupMembers (Showing top 2 results out of 315)

origin: alien4cloud/alien4cloud

/**
 * Rename formattedOldNodeName node template of a topology.
 * 
 * @param topology
 * @param nodeTemplateName
 * @param newNodeTemplateName
 */
public static void renameNodeTemplate(Topology topology, String nodeTemplateName, String newNodeTemplateName) {
  Map<String, NodeTemplate> nodeTemplates = getNodeTemplates(topology);
  NodeTemplate nodeTemplate = getNodeTemplate(topology.getId(), nodeTemplateName, nodeTemplates);
  nodeTemplate.setName(newNodeTemplateName);
  nodeTemplates.put(newNodeTemplateName, nodeTemplate);
  nodeTemplates.remove(nodeTemplateName);
  refreshNodeTempNameInRelationships(nodeTemplateName, newNodeTemplateName, nodeTemplates);
  updateOnNodeTemplateNameChange(nodeTemplateName, newNodeTemplateName, topology);
  updateGroupMembers(topology, nodeTemplate, nodeTemplateName, newNodeTemplateName);
  updatePolicyMembers(topology, nodeTemplateName, newNodeTemplateName);
}
origin: alien4cloud/alien4cloud

@Override
protected void processNodeOperation(Csar csar, Topology topology, DeleteNodeOperation operation, NodeTemplate template) {
  Map<String, NodeTemplate> nodeTemplates = TopologyUtils.getNodeTemplates(topology);
  // Prepare to cleanup files (store artifacts reference in the operation and process deletion on before commit operation).
  Map<String, DeploymentArtifact> artifacts = template.getArtifacts();
  operation.setArtifacts(artifacts);
  List<String> typesTobeUnloaded = Lists.newArrayList();
  // Clean up dependencies of the topology
  removeRelationShipReferences(operation.getNodeName(), csar, topology, typesTobeUnloaded);
  topologyService.unloadType(topology, typesTobeUnloaded.toArray(new String[typesTobeUnloaded.size()]));
  // Cleanup from policies
  removeNodeFromPolicies(operation.getNodeName(), topology);
  nodeTemplates.remove(operation.getNodeName());
  removeOutputs(operation.getNodeName(), topology);
  if (topology.getSubstitutionMapping() != null) {
    removeNodeTemplateSubstitutionTargetMapEntry(operation.getNodeName(), topology.getSubstitutionMapping().getCapabilities());
    removeNodeTemplateSubstitutionTargetMapEntry(operation.getNodeName(), topology.getSubstitutionMapping().getRequirements());
  }
  // group members removal
  TopologyUtils.updateGroupMembers(topology, template, operation.getNodeName(), null);
  // update the workflows
  workflowBuilderService.removeNode(topology, csar, operation.getNodeName());
  log.debug("Removed node template [ {} ] from the topology [ {} ] .", operation.getNodeName(), topology.getId());
}
org.alien4cloud.tosca.utilsTopologyUtilsupdateGroupMembers

Javadoc

Manage node group members when a node name is removed or its name has changed.

Popular methods of TopologyUtils

  • getScalableCapability
  • getScalingPolicy
  • getNodeTemplate
    Get a NodeTemplate given its name from a topology
  • getNodeTemplates
    Get the Map of NodeTemplate from a topology
  • getNexAvailableName
  • getScalingProperty
  • renameNodeTemplate
    Rename formattedOldNodeName node template of a topology.
  • setScalingProperty
  • estimateWorkflowStepInstanceCount
    For the given topology, estimate the number of workflow step instances regarding the scaling setting
  • getAvailableGroupIndex
  • getRelationShipName
    Construct a relationship name from target and relationship type.
  • getTargetRelationships
    Get all relationships that target the given node template.
  • getRelationShipName,
  • getTargetRelationships,
  • normalizeAllNodeTemplateName,
  • refreshNodeTempNameInRelationships,
  • refreshNodeTemplateNameInRelationships,
  • toLowerCase,
  • toUpperCase,
  • updateKey,
  • updateOnNodeTemplateNameChange

Popular in Java

  • Reactive rest calls using spring rest template
  • getExternalFilesDir (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • addToBackStack (FragmentTransaction)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now