use of com.emc.vipr.model.catalog.CatalogImageUpdateParam in project coprhd-controller by CoprHD.
the class CatalogImages method save.
private static CatalogImageRestRep save(String id, String name, File file) {
CatalogImageRestRep catalogImage = null;
if (StringUtils.isNotBlank(id)) {
CatalogImageUpdateParam updateParam = new CatalogImageUpdateParam();
writeCommon(name, file, updateParam);
catalogImage = CatalogImageUtils.updateCatalogImage(uri(id), updateParam);
} else {
CatalogImageCreateParam createParam = new CatalogImageCreateParam();
createParam.setTenant(uri(Models.currentAdminTenant()));
writeCommon(name, file, createParam);
catalogImage = CatalogImageUtils.createCatalogImage(createParam);
}
return catalogImage;
}
Aggregations