Class TroveUtils


  • public class TroveUtils
    extends Object
    Helper methods for dealing with instances that get created with errors.
    • Field Detail

      • logger

        protected Logger logger
    • Constructor Detail

      • TroveUtils

        public TroveUtils​(TroveApi api)
    • Method Detail

      • getWorkingInstance

        public Instance getWorkingInstance​(String region,
                                           String name,
                                           String flavorId,
                                           int size)
        Create an ACTIVE operational instance.
        Parameters:
        region - The instance region.
        name - Instance name.
        flavorId - Id of the flavor to be used when creating the instance.
        size - Size of the instance.
        Returns:
        Instance object in active state or NULL.
        See Also:
        InstanceApi.create(String, int, String)
      • getWorkingInstance

        public Instance getWorkingInstance​(String region)
        This will return a small working instance.
        Parameters:
        region - The region where the instance should be created.
        Returns:
        A working database instance.