本文整理了Java中org.jclouds.openstack.nova.v2_0.domain.Quota.getCores
方法的一些代码示例,展示了Quota.getCores
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Quota.getCores
方法的具体详情如下:
包路径:org.jclouds.openstack.nova.v2_0.domain.Quota
类名称:Quota
方法名:getCores
[英]The limit of the number of cores that can be used by the tenant
[中]
代码示例来源:origin: jclouds/legacy-jclouds
protected void assertQuotasIsValid(Quota quota) {
assertTrue(quota.getCores() > 0);
assertTrue(quota.getFloatingIps() >= 0);
assertTrue(quota.getGigabytes() > 0);
assertTrue(quota.getInjectedFileContentBytes() >= 0);
assertTrue(quota.getInjectedFiles() >= 0);
assertTrue(quota.getInstances() > 0);
assertTrue(quota.getKeyPairs() > 0);
assertTrue(quota.getRam() > 0);
assertTrue(quota.getSecurityGroups() > 0);
assertTrue(quota.getSecurityGroupRules() > 0);
assertTrue(quota.getVolumes() > 0);
}
}
代码示例来源:origin: apache/jclouds
protected void assertQuotasIsValid(Quota quota) {
assertTrue(quota.getCores() > 0);
assertTrue(quota.getFloatingIps() >= 0);
assertTrue(quota.getGigabytes() > 0);
assertTrue(quota.getInjectedFileContentBytes() >= 0);
assertTrue(quota.getInjectedFiles() >= 0);
assertTrue(quota.getInstances() > 0);
assertTrue(quota.getKeyPairs() > 0);
assertTrue(quota.getRam() > 0);
assertTrue(quota.getSecurityGroups() > 0);
assertTrue(quota.getSecurityGroupRules() > 0);
assertTrue(quota.getVolumes() > 0);
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public void testUpdateQuotasOfCurrentTenantThenReset() {
if (apiOption.isPresent()) {
QuotaApi api = apiOption.get();
Quota before = api.getByTenant(tenant);
assertQuotasIsValid(before);
Quota modified = before.toBuilder()
.cores(before.getCores() - 1)
.instances(before.getInstances() - 1)
.metadataItems(before.getMetadatas() - 1)
.ram(before.getRam() - 1)
.volumes(before.getVolumes() - 1)
.build();
assertTrue(api.updateQuotaOfTenant(modified, tenant));
assertEquals(api.getByTenant(tenant), modified);
assertTrue(api.updateQuotaOfTenant(before, tenant));
assertEquals(api.getByTenant(tenant), before);
}
}
代码示例来源:origin: apache/jclouds
public void testUpdateQuotasOfCurrentTenantThenReset() {
if (apiOption.isPresent()) {
QuotaApi api = apiOption.get();
Quota before = api.getByTenant(tenant);
assertQuotasIsValid(before);
Quota modified = before.toBuilder()
.cores(before.getCores() - 1)
.instances(before.getInstances() - 1)
.metadataItems(before.getMetadatas() - 1)
.ram(before.getRam() - 1)
.volumes(before.getVolumes() - 1)
.build();
assertTrue(api.updateQuotaOfTenant(modified, tenant));
assertEquals(api.getByTenant(tenant), modified);
assertTrue(api.updateQuotaOfTenant(before, tenant));
assertEquals(api.getByTenant(tenant), before);
}
}
代码示例来源:origin: io.cloudsoft.jclouds.api/openstack-nova
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
代码示例来源:origin: jclouds/legacy-jclouds
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
代码示例来源:origin: org.apache.jclouds.api/openstack-nova
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
代码示例来源:origin: com.amysta.jclouds.api/openstack-nova
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
代码示例来源:origin: org.jclouds.api/openstack-nova
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
代码示例来源:origin: apache/jclouds
public T fromQuotas(Quota in) {
return this
.id(in.getId())
.metadataItems(in.getMetadatas())
.injectedFileContentBytes(in.getInjectedFileContentBytes())
.volumes(in.getVolumes())
.gigabytes(in.getGigabytes())
.ram(in.getRam())
.floatingIps(in.getFloatingIps())
.instances(in.getInstances())
.injectedFiles(in.getInjectedFiles())
.cores(in.getCores())
.securityGroups(in.getSecurityGroups())
.securityGroupRules(in.getSecurityGroupRules())
.keyPairs(in.getKeyPairs());
}
}
内容来源于网络,如有侵权,请联系作者删除!