Interface MorpheusProvisionService


  • public interface MorpheusProvisionService
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.reactivex.Single<java.util.Map<java.lang.String,​java.lang.Object>> buildCloudConfigOptions​(Cloud cloud, ComputeServer server, java.lang.Boolean installAgent, java.util.Map<java.lang.String,​java.lang.Object> opts)
      Generates Cloud Configuration Options for Passing into User-Data Generation or Unattend Generation Depending on Platform
      io.reactivex.Single<java.lang.String> buildCloudMetaData​(PlatformType platform, java.lang.Long instanceId, java.lang.String hostname, java.util.Map<java.lang.String,​java.lang.Object> cloudConfigOptions)
      Builds the cloud metadata
      io.reactivex.Single<java.lang.String> buildCloudNetworkData​(PlatformType platform, java.util.Map<java.lang.String,​java.lang.Object> cloudConfigOptions)
      Builds the cloud network data
      io.reactivex.Single<java.lang.String> buildCloudUserData​(PlatformType platform, UsersConfiguration usersConfiguration, java.util.Map<java.lang.String,​java.lang.Object> cloudConfigOptions)
      Builds the userdata typically passed to cloud-init
      io.reactivex.Single<byte[]> buildIsoOutputStream​(java.lang.Boolean isSysPrep, PlatformType platform, java.lang.String metaData, java.lang.String userData, java.lang.String networkData)
      Builds up the data for an iso image based on the given parameters
      io.reactivex.Single<UsersConfiguration> getUserConfig​(Workload workload, VirtualImage virtualImage, java.util.Map<java.lang.String,​java.lang.Object> opts)
      Generates a UsersConfiguration given workload and virtual image
      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.
      void setProvisionFailed​(ComputeServer server, Workload workload, java.lang.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.
      void setProvisionFailed​(ComputeServer server, Workload workload, java.lang.String errorMessage, java.util.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.
    • Method Detail

      • 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,
                                java.lang.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,
                                java.lang.String errorMessage,
                                java.util.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

        io.reactivex.Single<UsersConfiguration> getUserConfig​(Workload workload,
                                                              VirtualImage virtualImage,
                                                              java.util.Map<java.lang.String,​java.lang.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

        io.reactivex.Single<java.util.Map<java.lang.String,​java.lang.Object>> buildCloudConfigOptions​(Cloud cloud,
                                                                                                            ComputeServer server,
                                                                                                            java.lang.Boolean installAgent,
                                                                                                            java.util.Map<java.lang.String,​java.lang.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

        io.reactivex.Single<java.lang.String> buildCloudUserData​(PlatformType platform,
                                                                 UsersConfiguration usersConfiguration,
                                                                 java.util.Map<java.lang.String,​java.lang.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

        io.reactivex.Single<java.lang.String> buildCloudMetaData​(PlatformType platform,
                                                                 java.lang.Long instanceId,
                                                                 java.lang.String hostname,
                                                                 java.util.Map<java.lang.String,​java.lang.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

        io.reactivex.Single<java.lang.String> buildCloudNetworkData​(PlatformType platform,
                                                                    java.util.Map<java.lang.String,​java.lang.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

        io.reactivex.Single<byte[]> buildIsoOutputStream​(java.lang.Boolean isSysPrep,
                                                         PlatformType platform,
                                                         java.lang.String metaData,
                                                         java.lang.String userData,
                                                         java.lang.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