Interface MorpheusSynchronousProvisionService


public interface MorpheusSynchronousProvisionService
  • Method Details

    • setProvisionFailed

      void setProvisionFailed(ComputeServer server, Workload workload)
      Sets the Provisioning state of a Workload and Server to Failed This can be called in an error scenario during a provision operation. The instance status will also be set to Failed
      Parameters:
      server - The Server object we want to set to failed.
      workload - the Workload object we want to set to failed.
    • setProvisionFailed

      void setProvisionFailed(ComputeServer server, Workload workload, String errorMessage)
      Sets the Provisioning state of a Workload and Server to Failed This can be called in an error scenario during a provision operation. The instance status will also be set to Failed. Setting the errorMessage is helpful in telling the user why their provision request did fail
      Parameters:
      server - The Server object we want to set to failed.
      workload - the Workload object we want to set to failed.
      errorMessage - The descriptive error message as to why provisioning failed.
    • setProvisionFailed

      void setProvisionFailed(ComputeServer server, Workload workload, String errorMessage, Map opts)
      Sets the Provisioning state of a Workload and Server to Failed This can be called in an error scenario during a provision operation. The instance status will also be set to Failed. Setting the errorMessage is helpful in telling the user why their provision request did fail
      Parameters:
      server - The Server object we want to set to failed.
      workload - the Workload object we want to set to failed.
      errorMessage - The descriptive error message as to why provisioning failed.
      opts - Any additional options to be sent back to the callback container service for error handling
    • getUserConfig

      UsersConfiguration getUserConfig(Workload workload, VirtualImage virtualImage, Map<String,Object> opts)
      Generates a UsersConfiguration given workload and virtual image
      Parameters:
      workload - the Workload object we are working with
      virtualImage - the virtual image from which user data will be generated from
      opts - additional options like fqdn, or hostname data
      Returns:
      UsersConfiguration generated
    • buildCloudConfigOptions

      Map<String,Object> buildCloudConfigOptions(Cloud cloud, ComputeServer server, Boolean installAgent, Map<String,Object> opts)
      Generates Cloud Configuration Options for Passing into User-Data Generation or Unattend Generation Depending on Platform
      Parameters:
      cloud - the current Cloud the server is being provisioned into
      server - the server instance being provisioned
      installAgent - flag to determine if agent is being installed over cloud-init/unattend or not
      opts - additional options like fqdn, domainName, virtualImage, hostname data. These will be returned in the Map
      Returns:
      Map of cloud configuration options
    • buildCloudUserData

      String buildCloudUserData(PlatformType platform, UsersConfiguration usersConfiguration, Map<String,Object> cloudConfigOptions)
      Builds the userdata typically passed to cloud-init
      Parameters:
      platform - the platform being provisioned
      usersConfiguration - typically the UsersConfigurations from buildWorkloadUsersConfig
      cloudConfigOptions - typically the return of buildCloudConfigOptions or buildCloudNetworkConfig
      Returns:
      String userdata
    • buildCloudMetaData

      String buildCloudMetaData(PlatformType platform, Long instanceId, String hostname, Map<String,Object> cloudConfigOptions)
      Builds the cloud metadata
      Parameters:
      platform - the platform being provisioned
      instanceId - the ID of the Instance
      hostname - the hostname
      cloudConfigOptions - typically the return of buildCloudConfigOptions or buildCloudNetworkConfig
      Returns:
      String cloud metadata
    • buildCloudNetworkData

      String buildCloudNetworkData(PlatformType platform, Map<String,Object> cloudConfigOptions)
      Builds the cloud network data
      Parameters:
      platform - the platform being provisioned
      cloudConfigOptions - typically the return of buildCloudConfigOptions or buildCloudNetworkConfig
      Returns:
      String cloud networkdata
    • buildIsoOutputStream

      byte[] buildIsoOutputStream(Boolean isSysPrep, PlatformType platform, String metaData, String userData, String networkData)
      Builds up the data for an iso image based on the given parameters
      Parameters:
      isSysPrep - indicates if the iso is for a sysprep image
      platform - the platform (should be windows or linux)
      metaData - the metadata to embed in the iso
      userData - the userdata to embed in the iso
      networkData - the networkdata to embed in the iso (optional)
      Returns:
      a byte array for the iso