use of com.microsoft.azure.vmagent.AzureVMAgentTemplate in project azure-vm-agents-plugin by jenkinsci.
the class AzureVMTemplateBuilder method build.
public AzureVMAgentTemplate build() {
AzureVMAgentTemplate azureVMAgentTemplate = new AzureVMAgentTemplate(fluent.getName(), fluent.getDescription(), fluent.getLabels(), fluent.getLocation(), new AzureVMAgentTemplate.AvailabilityTypeClass(fluent.getAvailability().getAvailabilitySet()), fluent.getVirtualMachineSize(), fluent.getStorageAccountNameReferenceType(), fluent.getStorageAccountType(), fluent.getNewStorageAccountName(), fluent.getExistingStorageAccountName(), fluent.getDiskType(), fluent.getAdvancedImage().getNoOfParallelJobs(), fluent.getUsageMode(), fluent.getAdvancedImage().getOsType(), fluent.getImageTopLevelType(), new AzureVMAgentTemplate.ImageReferenceTypeClass(fluent.getAdvancedImage().getImage(), fluent.getAdvancedImage().getImageId(), fluent.getAdvancedImage().getImagePublisher(), fluent.getAdvancedImage().getImageOffer(), fluent.getAdvancedImage().getImageSku(), fluent.getAdvancedImage().getImageVersion(), fluent.getAdvancedImage().getGalleryName(), fluent.getAdvancedImage().getGalleryImageDefinition(), fluent.getAdvancedImage().getGalleryImageVersion(), fluent.getAdvancedImage().getGallerySubscriptionId(), fluent.getAdvancedImage().getGalleryResourceGroup()), fluent.getAdvancedImage().getAgentLaunchMethod(), fluent.getAdvancedImage().getInitScript(), fluent.getAdvancedImage().getTerminateScript(), fluent.getCredentialsId(), fluent.getAdvancedImage().getVirtualNetworkName(), fluent.getAdvancedImage().getVirtualNetworkResourceGroupName(), fluent.getAdvancedImage().getSubnetName(), fluent.getAdvancedImage().getNsgName(), fluent.getWorkspace(), fluent.getAdvancedImage().getJvmOptions(), fluent.getRetentionStrategy(), fluent.getAdvancedImage().isExecuteInitScriptAsRoot(), fluent.getAdvancedImage().isDoNotUseMachineIfInitFails());
azureVMAgentTemplate.setShutdownOnIdle(fluent.isShutdownOnIdle());
azureVMAgentTemplate.setEphemeralOSDisk(fluent.isEphemeralOSDisk());
azureVMAgentTemplate.setOsDiskSize(fluent.getOsDiskSize());
azureVMAgentTemplate.setTemplateDisabled(fluent.getAdvancedImage().isTemplateDisabled());
azureVMAgentTemplate.setBuiltInImage(fluent.getBuiltInImage().getBuiltInImage());
azureVMAgentTemplate.setInstallGit(fluent.getBuiltInImage().isInstallGit());
azureVMAgentTemplate.setInstallMaven(fluent.getBuiltInImage().isInstallMaven());
azureVMAgentTemplate.setInstallDocker(fluent.getBuiltInImage().isInstallDocker());
azureVMAgentTemplate.setUsePrivateIP(fluent.getAdvancedImage().isUsePrivateIP());
azureVMAgentTemplate.setEnableMSI(fluent.getAdvancedImage().isEnableMSI());
azureVMAgentTemplate.setEnableUAMI(fluent.getAdvancedImage().isEnableUAMI());
azureVMAgentTemplate.setUamiID(fluent.getAdvancedImage().getUamiID());
azureVMAgentTemplate.setPreInstallSsh(fluent.getAdvancedImage().isPreInstallSsh());
azureVMAgentTemplate.setTags(fluent.getCloudTags());
azureVMAgentTemplate.getImageReference().setGalleryImageSpecialized(fluent.getAdvancedImage().getGalleryImageSpecialized());
return azureVMAgentTemplate;
}
Aggregations