use of com.netflix.spinnaker.halyard.config.model.v1.providers.openstack.OpenstackBaseImage in project halyard by spinnaker.
the class OpenstackAddBaseImageCommand method buildBaseImage.
@Override
protected BaseImage buildBaseImage(String baseImageId) {
OpenstackBaseImage baseImage = new OpenstackBaseImage();
OpenstackBaseImage.OpenstackImageSettings imageSettings = new OpenstackBaseImage.OpenstackImageSettings();
baseImage.setBaseImage(imageSettings);
// TODO(edwinavalos) Support multiple virtualization settings
List<OpenstackBaseImage.OpenstackVirtualizationSettings> vsList = new ArrayList<>();
OpenstackBaseImage.OpenstackVirtualizationSettings virtualizationSettings = new OpenstackBaseImage.OpenstackVirtualizationSettings();
virtualizationSettings.setSourceImageId(sourceImageId);
virtualizationSettings.setRegion(region);
virtualizationSettings.setInstanceType(instanceType);
virtualizationSettings.setSshUserName(sshUserName);
vsList.add(virtualizationSettings);
baseImage.setVirtualizationSettings(vsList);
return baseImage;
}
Aggregations