use of com.emc.storageos.model.compute.ComputeImageRestRep in project coprhd-controller by CoprHD.
the class ComputeMapper method map.
public static ComputeImageRestRep map(ComputeImage from) {
if (from == null) {
return null;
}
ComputeImageRestRep to = new ComputeImageRestRep();
mapDataObjectFields(from, to);
to.setImageName(from.getImageName());
to.setImageUrl(ImageServerControllerImpl.maskImageURLPassword(from.getImageUrl()));
to.setImageType(from.getImageType());
to.setComputeImageStatus(from.getComputeImageStatus());
to.setLastImportStatusMessage(from.getLastImportStatusMessage());
List<NamedRelatedResourceRep> availableServersList = new ArrayList<NamedRelatedResourceRep>();
List<NamedRelatedResourceRep> failedServersList = new ArrayList<NamedRelatedResourceRep>();
to.setAvailableImageServers(availableServersList);
to.setFailedImageServers(failedServersList);
return to;
}
use of com.emc.storageos.model.compute.ComputeImageRestRep in project coprhd-controller by CoprHD.
the class ComputeImages method edit.
@FlashException("list")
public static void edit(String id) {
addReferenceData();
ComputeImageRestRep computeImage = ComputeImageUtils.getComputeImage(id);
if (computeImage != null) {
ComputeImageForm computeImages = new ComputeImageForm(computeImage);
renderArgs.put("availableImageServersNames", computeImages.availableImageServerNames);
renderArgs.put("failedImageServersNames", computeImages.failedImageServerNames);
render("@edit", computeImages);
} else {
flash.error(MessagesUtils.get(UNKNOWN, id));
list();
}
}
use of com.emc.storageos.model.compute.ComputeImageRestRep in project coprhd-controller by CoprHD.
the class ComputeImages method createAClone.
public static void createAClone(String imageId) {
addReferenceData();
ComputeImageRestRep computeImage = ComputeImageUtils.getComputeImage(imageId);
ComputeImageForm computeImages = new ComputeImageForm(computeImage, true);
render("@edit", computeImages);
}
use of com.emc.storageos.model.compute.ComputeImageRestRep in project coprhd-controller by CoprHD.
the class ComputeImageProvider method getComputeImageOptions.
@Asset("computeImage")
public List<AssetOption> getComputeImageOptions(AssetOptionsContext ctx) {
debug("getting compute images");
List<ComputeImageRestRep> availCis = new ArrayList<ComputeImageRestRep>();
for (ComputeImageRestRep ci : getComputeImages(ctx)) {
if (ComputeImage.ComputeImageStatus.AVAILABLE.name().equals(ci.getComputeImageStatus())) {
availCis.add(ci);
}
}
return createBaseResourceOptions(availCis);
}
use of com.emc.storageos.model.compute.ComputeImageRestRep in project coprhd-controller by CoprHD.
the class ComputeImages method itemDetails.
public static void itemDetails(String id) {
ComputeImageRestRep computeImage = ComputeImageUtils.getComputeImage(id);
if (computeImage == null) {
error(MessagesUtils.get(UNKNOWN, id));
}
render(computeImage);
}
Aggregations