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 Platformio.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 metadataio.reactivex.Single<java.lang.String>
buildCloudNetworkData(PlatformType platform, java.util.Map<java.lang.String,java.lang.Object> cloudConfigOptions)
Builds the cloud network dataio.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-initio.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 parametersio.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 imagevoid
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 withvirtualImage
- the virtual image from which user data will be generated fromopts
- 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 intoserver
- the server instance being provisionedinstallAgent
- flag to determine if agent is being installed over cloud-init/unattend or notopts
- 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 provisionedusersConfiguration
- typically the UsersConfigurations from buildWorkloadUsersConfigcloudConfigOptions
- 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 provisionedinstanceId
- the ID of the Instancehostname
- the hostnamecloudConfigOptions
- 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 provisionedcloudConfigOptions
- 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 imageplatform
- the platform (should be windows or linux)metaData
- the metadata to embed in the isouserData
- the userdata to embed in the isonetworkData
- the networkdata to embed in the iso (optional)- Returns:
- a byte array for the iso
-
-