Class ProvisioningTemplate

    • Constructor Summary

      Constructors 
      Constructor Description
      ProvisioningTemplate​(java.lang.String size, java.lang.String image, java.lang.String keyPair, java.util.List<java.lang.String> securityGroups, java.lang.String encodedUserData)
      Creates a new ProvisioningTemplate.
      ProvisioningTemplate​(java.lang.String size, java.lang.String image, java.lang.String keyPair, java.util.List<java.lang.String> securityGroups, java.lang.String encodedUserData, java.util.List<java.lang.String> networks, java.lang.Boolean assignFloatingIp)
      Creates a new ProvisioningTemplate.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static ProvisioningTemplate.Builder builder​(java.lang.String size, java.lang.String image)  
      boolean equals​(java.lang.Object obj)  
      java.lang.String getEncodedUserData()
      A base 64-encoded blob of data used to pass custom data to started machines.
      java.lang.String getImage()
      The name of the machine image used to boot new servers.
      java.lang.String getKeyPair()
      The name of the key pair to use for new machine instances.
      java.util.List<java.lang.String> getNetworks()
      The names of the networks to attach launched servers to (for example, private).
      java.util.List<java.lang.String> getSecurityGroups()
      The security group(s) to use for new machine instances.
      java.lang.String getSize()
      The name of the server type to launch.
      int hashCode()  
      java.lang.Boolean isAssignFloatingIp()
      Returns true if a floating IP address should be allocated to launched servers.
      com.google.gson.JsonObject toJson()  
      java.lang.String toString()  
      void validate()
      Validates that this ProvisioningTemplate contains all mandatory field.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ProvisioningTemplate

        public ProvisioningTemplate​(java.lang.String size,
                                    java.lang.String image,
                                    java.lang.String keyPair,
                                    java.util.List<java.lang.String> securityGroups,
                                    java.lang.String encodedUserData)
        Creates a new ProvisioningTemplate.
        Parameters:
        size - The name of the server type to launch. For example, m1.medium.
        image - The name of the machine image used to boot new servers.
        keyPair - The name of the key pair to use for new machine instances. May be null.
        securityGroups - The security group(s) to use for new machine instances. May be null.
        encodedUserData - A base 64-encoded blob of data used to pass custom data to started machines. It is supported by many cloud providers and is typically used to pass a boot-up shell script or cloud-init parameters to launched machines. May be null.
      • ProvisioningTemplate

        public ProvisioningTemplate​(java.lang.String size,
                                    java.lang.String image,
                                    java.lang.String keyPair,
                                    java.util.List<java.lang.String> securityGroups,
                                    java.lang.String encodedUserData,
                                    java.util.List<java.lang.String> networks,
                                    java.lang.Boolean assignFloatingIp)
        Creates a new ProvisioningTemplate.
        Parameters:
        size - The name of the server type to launch. For example, m1.medium.
        image - The name of the machine image used to boot new servers.
        keyPair - The name of the key pair to use for new machine instances. May be null.
        securityGroups - The security group(s) to use for new machine instances. May be null.
        encodedUserData - A base 64-encoded blob of data used to pass custom data to started machines. It is supported by many cloud providers and is typically used to pass a boot-up shell script or cloud-init parameters to launched machines. May be null.
        networks - The names of the networks to attach launched servers to (for example, private). Each network creates a separate network interface controller (NIC) on a created server. Typically, this option can be left out, but in rare cases, when an account has more than one network to choose from, the OpenStack API forces us to be explicit about the network(s) we want to use.

        If set to null or left empty, the default behavior is to use which ever network is configured by the cloud provider for the user/project. However, if there are multiple choices, this will cause server boot requests to fail.

        assignFloatingIp - Set to true if a floating IP address should be allocated to launched servers. Default: false.
    • Method Detail

      • getSize

        public java.lang.String getSize()
        The name of the server type to launch. For example, m1.medium.
        Returns:
      • getImage

        public java.lang.String getImage()
        The name of the machine image used to boot new servers.
        Returns:
      • getKeyPair

        public java.lang.String getKeyPair()
        The name of the key pair to use for new machine instances. May be null.
        Returns:
      • getSecurityGroups

        public java.util.List<java.lang.String> getSecurityGroups()
        The security group(s) to use for new machine instances. May be null.
        Returns:
      • getEncodedUserData

        public java.lang.String getEncodedUserData()
        A base 64-encoded blob of data used to pass custom data to started machines. It is supported by many cloud providers and is typically used to pass a boot-up shell script or cloud-init parameters to launched machines. May be null.
        Returns:
      • getNetworks

        public java.util.List<java.lang.String> getNetworks()
        The names of the networks to attach launched servers to (for example, private). Each network creates a separate network interface controller (NIC) on a created server. Typically, this option can be left out, but in rare cases, when an account has more than one network to choose from, the OpenStack API forces us to be explicit about the network(s) we want to use.

        If set to null or left empty, the default behavior is to use which ever network is configured by the cloud provider for the user/project. However, if there are multiple choices, this will cause server boot requests to fail.

        Returns:
      • isAssignFloatingIp

        public java.lang.Boolean isAssignFloatingIp()
        Returns true if a floating IP address should be allocated to launched servers.
        Returns:
      • validate

        public void validate()
                      throws java.lang.IllegalArgumentException
        Validates that this ProvisioningTemplate contains all mandatory field.
        Throws:
        java.lang.IllegalArgumentException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toJson

        public com.google.gson.JsonObject toJson()