mirror of https://github.com/apache/jclouds.git
Cloudstack VirtualMachines can have negative cpuUsed values for some reason
This commit is contained in:
parent
4c31fb65f1
commit
d585ace712
|
@ -588,7 +588,7 @@ public class VirtualMachine {
|
||||||
@Nullable VirtualMachine.State state, @Nullable String templateDisplayText, @Nullable String templateId,
|
@Nullable VirtualMachine.State state, @Nullable String templateDisplayText, @Nullable String templateId,
|
||||||
@Nullable String templateName, @Nullable String zoneId, @Nullable String zoneName, @Nullable Set<NIC> nics,
|
@Nullable String templateName, @Nullable String zoneId, @Nullable String zoneName, @Nullable Set<NIC> nics,
|
||||||
@Nullable String hypervisor, @Nullable Set<SecurityGroup> securityGroups) {
|
@Nullable String hypervisor, @Nullable Set<SecurityGroup> securityGroups) {
|
||||||
Preconditions.checkArgument(Strings.isNullOrEmpty(cpuUsed) || cpuUsed.matches("^[0-9\\.]+%$"), "cpuUsed value should be a decimal number followed by %");
|
Preconditions.checkArgument(Strings.isNullOrEmpty(cpuUsed) || cpuUsed.matches("^[0-9\\.\\-]+%$"), "cpuUsed value should be a decimal number followed by %");
|
||||||
this.id = checkNotNull(id, "id");
|
this.id = checkNotNull(id, "id");
|
||||||
this.account = account;
|
this.account = account;
|
||||||
this.cpuCount = cpuCount;
|
this.cpuCount = cpuCount;
|
||||||
|
|
Loading…
Reference in New Issue