本文整理了Java中org.ovirt.engine.core.common.businessentities.Quota.setStoragePoolId
方法的一些代码示例,展示了Quota.setStoragePoolId
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quota.setStoragePoolId
方法的具体详情如下:
包路径:org.ovirt.engine.core.common.businessentities.Quota
类名称:Quota
方法名:setStoragePoolId
暂无
代码示例来源:origin: oVirt/ovirt-engine
private Quota getQuotaMetaDataFromResultSet(ResultSet rs) throws SQLException {
Quota entity = new Quota();
entity.setId(getGuidDefaultEmpty(rs, "quota_id"));
entity.setStoragePoolId(getGuidDefaultEmpty(rs, "storage_pool_id"));
entity.setStoragePoolName(rs.getString("storage_pool_name"));
entity.setQuotaName((String) rs.getObject("quota_name"));
entity.setDescription((String) rs.getObject("description"));
entity.setThresholdClusterPercentage((Integer) rs.getObject("threshold_cluster_percentage"));
entity.setThresholdStoragePercentage((Integer) rs.getObject("threshold_storage_percentage"));
entity.setGraceClusterPercentage((Integer) rs.getObject("grace_cluster_percentage"));
entity.setGraceStoragePercentage((Integer) rs.getObject("grace_storage_percentage"));
entity.setQuotaEnforcementType(QuotaEnforcementTypeEnum.forValue(rs.getInt("quota_enforcement_type")));
entity.setDefault(rs.getBoolean("is_default"));
return entity;
}
代码示例来源:origin: oVirt/ovirt-engine
protected org.ovirt.engine.core.common.businessentities.Quota getQuota() {
org.ovirt.engine.core.common.businessentities.Quota quota =
new org.ovirt.engine.core.common.businessentities.Quota();
quota.setId(QUOTA_ID);
quota.setStoragePoolId(DATACENTER_ID);
return quota;
}
代码示例来源:origin: oVirt/ovirt-engine
protected org.ovirt.engine.core.common.businessentities.Quota getQuota() {
org.ovirt.engine.core.common.businessentities.Quota quota =
new org.ovirt.engine.core.common.businessentities.Quota();
quota.setId(QUOTA_ID);
quota.setStoragePoolId(DATACENTER_ID);
return quota;
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
public Response add(Quota quota) {
validateParameters(quota, "name");
org.ovirt.engine.core.common.businessentities.Quota entity = map(quota);
entity.setStoragePoolId(dataCenterId);
return performCreate(ActionType.AddQuota,
new QuotaCRUDParameters(entity),
new QueryIdResolver<Guid>(QueryType.GetQuotaByQuotaId, IdQueryParameters.class));
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
protected org.ovirt.engine.core.common.businessentities.Quota getEntity(int index) {
org.ovirt.engine.core.common.businessentities.Quota quota =
new org.ovirt.engine.core.common.businessentities.Quota();
quota.setId(GUIDS[index]);
quota.setQuotaName(NAMES[index]);
quota.setDescription(DESCRIPTIONS[index]);
quota.setStoragePoolId(DATACENTER_ID);
return quota;
}
}
代码示例来源:origin: oVirt/ovirt-engine
@Override
protected org.ovirt.engine.core.common.businessentities.Quota getEntity(int index) {
org.ovirt.engine.core.common.businessentities.Quota quota =
new org.ovirt.engine.core.common.businessentities.Quota();
quota.setId(GUIDS[index]);
quota.setDescription(DESCRIPTIONS[index]);
quota.setQuotaName(NAMES[index]);
quota.setStoragePoolId(GUIDS[index]);
return quota;
}
代码示例来源:origin: oVirt/ovirt-engine
private static Quota createGeneralQuota() {
Quota quota = new Quota();
Guid quotaId = Guid.newGuid();
quota.setId(quotaId);
quota.setStoragePoolId(FixturesTool.STORAGE_POOL_NFS);
quota.setQuotaName("Watson");
quota.setDescription("General quota");
quota.setThresholdClusterPercentage(80);
quota.setThresholdStoragePercentage(80);
quota.setGraceClusterPercentage(20);
quota.setGraceStoragePercentage(20);
return quota;
}
}
代码示例来源:origin: oVirt/ovirt-engine
quota.setQuotaName(model.getName().getEntity());
quota.setDescription(model.getDescription().getEntity());
quota.setStoragePoolId(model.getDataCenter().getSelectedItem().getId());
代码示例来源:origin: oVirt/ovirt-engine
@Mapping(from = Quota.class, to = org.ovirt.engine.core.common.businessentities.Quota.class)
public static org.ovirt.engine.core.common.businessentities.Quota map(Quota model, org.ovirt.engine.core.common.businessentities.Quota template) {
org.ovirt.engine.core.common.businessentities.Quota entity = (template==null) ? new org.ovirt.engine.core.common.businessentities.Quota() : template;
if (model.isSetId()) {
entity.setId(GuidUtils.asGuid(model.getId()));
}
if (model.isSetName()) {
entity.setQuotaName(model.getName());
}
if (model.isSetDescription()) {
entity.setDescription(model.getDescription());
}
if (model.isSetDataCenter()) {
entity.setStoragePoolId(GuidUtils.asGuid(model.getDataCenter().getId()));
}
if (model.isSetClusterHardLimitPct()) {
entity.setGraceClusterPercentage(model.getClusterHardLimitPct());
}
if (model.isSetStorageHardLimitPct()) {
entity.setGraceStoragePercentage(model.getStorageHardLimitPct());
}
if (model.isSetClusterSoftLimitPct()) {
entity.setThresholdClusterPercentage(model.getClusterSoftLimitPct());
}
if (model.isSetStorageSoftLimitPct()) {
entity.setThresholdStoragePercentage(model.getStorageSoftLimitPct());
}
return entity;
}
内容来源于网络,如有侵权,请联系作者删除!