Ejemplo n.º 1
0
 private GlusterVolumeEntity createDistVol(String volName, Guid volId) {
   GlusterVolumeEntity vol = createVolume(volName, volId);
   vol.getAdvancedDetails().setCapacityInfo(getCapacityInfo(volId));
   vol.addBrick(createBrick(volId, existingServer1, DIST_BRICK_D1));
   vol.addBrick(createBrick(volId, existingServer1, DIST_BRICK_D2));
   existingVolumes.add(vol);
   return vol;
 }
Ejemplo n.º 2
0
 @Override
 public void render(Context context, GlusterVolumeEntity object, SafeHtmlBuilder sb, String id) {
   GlusterVolumeAdvancedDetails advancedDetails = object.getAdvancedDetails();
   GlusterVolumeSizeInfo sizeInfo = null;
   if (advancedDetails != null) {
     sizeInfo = advancedDetails.getCapacityInfo();
     if (sizeInfo != null) {
       setFreeSize(sizeInfo.getFreeSize().doubleValue());
       setTotalSize(sizeInfo.getTotalSize().doubleValue());
       setUsedSize(sizeInfo.getUsedSize().doubleValue());
       setInUnit(SizeUnit.BYTES);
     }
   }
   super.render(
       context, advancedDetails == null ? null : sizeInfo == null ? null : sizeInfo, sb, id);
 }