org.ovirt.engine.api.model.Quota.setClusterHardLimitPct()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(2.0k)|赞(0)|评价(0)|浏览(136)

本文整理了Java中org.ovirt.engine.api.model.Quota.setClusterHardLimitPct方法的一些代码示例,展示了Quota.setClusterHardLimitPct的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quota.setClusterHardLimitPct方法的具体详情如下:
包路径:org.ovirt.engine.api.model.Quota
类名称:Quota
方法名:setClusterHardLimitPct

Quota.setClusterHardLimitPct介绍

[英]Sets the value of the clusterHardLimitPct property.
[中]设置clusterHardLimitPct属性的值。

代码示例

代码示例来源:origin: oVirt/ovirt-engine

private Quota getModel() {
  Quota quota = new Quota();
  quota.setId(GUIDS[0].toString());
  quota.setDescription(DESCRIPTIONS[0]);
  quota.setClusterHardLimitPct(30);
  return quota;
}

代码示例来源:origin: oVirt/ovirt-engine

private Quota getQuota() {
  Quota quota = new Quota();
  quota.setName("Quota_Name");
  quota.setClusterHardLimitPct(CLUSTER_HARD_LIMIT_PCT);
  quota.setClusterSoftLimitPct(CLUSTER_SOFT_LIMIT_PCT);
  quota.setStorageHardLimitPct(STORAGE_HARD_LIMIT_PCT);
  quota.setStorageSoftLimitPct(STORAGE_SOFT_LIMIT_PCT);
  return quota;
}

代码示例来源:origin: oVirt/ovirt-engine

@Mapping(from = org.ovirt.engine.core.common.businessentities.Quota.class, to = Quota.class)
public static Quota map(org.ovirt.engine.core.common.businessentities.Quota template, Quota model) {
  Quota ret = (model==null) ? new Quota() : model;
  if (template.getId()!=null) {
    ret.setId(template.getId().toString());
  }
  if (template.getQuotaName()!=null) {
    ret.setName(template.getQuotaName());
  }
  if (template.getDescription()!=null) {
    ret.setDescription(template.getDescription());
  }
  if (template.getStoragePoolId()!=null) {
    if (ret.getDataCenter()==null) {
      ret.setDataCenter(new DataCenter());
    }
    ret.getDataCenter().setId(template.getStoragePoolId().toString());
  }
  ret.setClusterHardLimitPct(template.getGraceClusterPercentage());
  ret.setStorageHardLimitPct(template.getGraceStoragePercentage());
  ret.setClusterSoftLimitPct(template.getThresholdClusterPercentage());
  ret.setStorageSoftLimitPct(template.getThresholdStoragePercentage());
  return ret;
}

代码示例来源:origin: oVirt/ovirt-engine

to.setClusterHardLimitPct(from.getClusterHardLimitPct());

相关文章