Class StackServiceImpl

  • All Implemented Interfaces:
    StackService

    public class StackServiceImpl
    extends BaseHeatServices
    implements StackService
    This class implements all methods for manipulation of HeatStack objects. The non-exhaustive list of methods is oriented along http://developer.openstack.org/api-ref-orchestration-v1.html#stacks
    Author:
    Matthias Reisser
    • Constructor Detail

      • StackServiceImpl

        public StackServiceImpl()
    • Method Detail

      • create

        public Stack create​(String name,
                            String template,
                            Map<String,​String> parameters,
                            boolean disableRollback,
                            Long timeoutMins)
        Description copied from interface: StackService
        POST /v1/{tenant_id}/stacks Creates a new StackCreate Object and returns a new Stack as sent from the server.
        Specified by:
        create in interface StackService
        Parameters:
        name - Name of Stack
        template - Template in Json-Format or YAML format
        parameters - Map of parameters
        disableRollback - boolean to enable or disable rollback
        timeoutMins - timeout in minutes
        Returns:
        new Stack as returned from the server
      • list

        public List<? extends Stack> list​(Map<String,​String> filteringParams)
        Description copied from interface: StackService
        Gets a list of currently existing Stack objects, filtered by parameters.
        Specified by:
        list in interface StackService
        Parameters:
        filteringParams - The parameters used to filter the stacks returned.
        Returns:
        the list of Stack objects.
      • update

        public ActionResponse update​(String stackName,
                                     String stackId,
                                     StackUpdate stackUpdate)
        Description copied from interface: StackService
        Updates an existing Stack
        Specified by:
        update in interface StackService
        Parameters:
        stackName - the stack name
        stackId - the specific stack identifier
        stackUpdate - the stack update options
        Returns:
        the action response
      • abandon

        public AdoptStackData abandon​(String stackName,
                                      String stackId)
        Description copied from interface: StackService
        Deletes a stack but leaves its resources intact, and returns data that describes the stack and its resources.
        Specified by:
        abandon in interface StackService
        Parameters:
        stackName - Name of Stack
        stackId - Id of Stack
        Returns:
        adopt_stack_data element representing by AdoptStackData
      • adopt

        public Stack adopt​(AdoptStackData adoptStackData,
                           Map<String,​String> parameters,
                           boolean disableRollback,
                           Long timeoutMins,
                           String template)
        Description copied from interface: StackService
        Creates a stack from existing resources.
        Specified by:
        adopt in interface StackService
        Parameters:
        adoptStackData - Structure AdoptStackData, representing existing resources
        parameters - Map of parameters
        disableRollback - Enable or disable rollback
        timeoutMins - Timeout in minutes
        template - Template in Json-Format or YAML format. It is optional, used just in case there will be new resources (not included in adoptStackData)