protected ToStringHelper string() { return Objects.toStringHelper(this) .add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("domain", domain) .add("domainId", domainId).add("cpuNumber", cpuNumber).add("cpuSpeed", cpuSpeed).add("memory", memory) .add("haSupport", haSupport).add("storageType", storageType).add("tags", getTags()).add("defaultUse", defaultUse) .add("systemOffering", systemOffering).add("cpuUseLimited", cpuUseLimited) .add("networkRate", networkRate).add("systemVmType", systemVmType); }
protected ToStringHelper string() { return Objects.toStringHelper(this) .add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("domain", domain) .add("domainId", domainId).add("cpuNumber", cpuNumber).add("cpuSpeed", cpuSpeed).add("memory", memory) .add("haSupport", haSupport).add("storageType", storageType).add("tags", getTags()).add("defaultUse", defaultUse) .add("systemOffering", systemOffering).add("cpuUseLimited", cpuUseLimited) .add("networkRate", networkRate).add("systemVmType", systemVmType); }
protected ToStringHelper string() { return MoreObjects.toStringHelper(this) .add("id", id).add("name", name).add("displayText", displayText).add("created", created).add("domain", domain) .add("domainId", domainId).add("cpuNumber", cpuNumber).add("cpuSpeed", cpuSpeed).add("memory", memory) .add("haSupport", haSupport).add("storageType", storageType).add("tags", getTags()).add("defaultUse", defaultUse) .add("systemOffering", systemOffering).add("cpuUseLimited", cpuUseLimited) .add("networkRate", networkRate).add("systemVmType", systemVmType); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; ServiceOffering that = ServiceOffering.class.cast(obj); return Objects.equal(this.id, that.id) && Objects.equal(this.name, that.name) && Objects.equal(this.displayText, that.displayText) && Objects.equal(this.created, that.created) && Objects.equal(this.domain, that.domain) && Objects.equal(this.domainId, that.domainId) && Objects.equal(this.cpuNumber, that.cpuNumber) && Objects.equal(this.cpuSpeed, that.cpuSpeed) && Objects.equal(this.memory, that.memory) && Objects.equal(this.haSupport, that.haSupport) && Objects.equal(this.storageType, that.storageType) && Objects.equal(this.getTags(), that.getTags()) && Objects.equal(this.defaultUse, that.defaultUse) && Objects.equal(this.systemOffering, that.systemOffering) && Objects.equal(this.cpuUseLimited, that.cpuUseLimited) && Objects.equal(this.networkRate, that.networkRate) && Objects.equal(this.systemVmType, that.systemVmType); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null || getClass() != obj.getClass()) return false; ServiceOffering that = ServiceOffering.class.cast(obj); return Objects.equal(this.id, that.id) && Objects.equal(this.name, that.name) && Objects.equal(this.displayText, that.displayText) && Objects.equal(this.created, that.created) && Objects.equal(this.domain, that.domain) && Objects.equal(this.domainId, that.domainId) && Objects.equal(this.cpuNumber, that.cpuNumber) && Objects.equal(this.cpuSpeed, that.cpuSpeed) && Objects.equal(this.memory, that.memory) && Objects.equal(this.haSupport, that.haSupport) && Objects.equal(this.storageType, that.storageType) && Objects.equal(this.getTags(), that.getTags()) && Objects.equal(this.defaultUse, that.defaultUse) && Objects.equal(this.systemOffering, that.systemOffering) && Objects.equal(this.cpuUseLimited, that.cpuUseLimited) && Objects.equal(this.networkRate, that.networkRate) && Objects.equal(this.systemVmType, that.systemVmType); }
@Override public Hardware apply(ServiceOffering offering) { return new HardwareBuilder() .ids(offering.getId() + "") .name(offering.getName()) .tags(offering.getTags()) .processors(ImmutableList.of(new Processor(offering.getCpuNumber(), offering.getCpuSpeed()))) .ram(offering.getMemory())// // TODO: hypervisor probably from zone? // TODO .volumes() // displayText // created // haSupport // storageType // TODO where's the location of this? .build(); }
@Override public Hardware apply(ServiceOffering offering) { return new HardwareBuilder() .ids(offering.getId() + "") .name(offering.getName()) .tags(offering.getTags()) .processors(ImmutableList.of(new Processor(offering.getCpuNumber(), offering.getCpuSpeed()))) .ram(offering.getMemory())// // TODO: hypervisor probably from zone? // TODO .volumes() // displayText // created // haSupport // storageType // TODO where's the location of this? .build(); }
@Override public Hardware apply(ServiceOffering offering) { return new HardwareBuilder() .ids(offering.getId() + "") .name(offering.getName()) .tags(offering.getTags()) .processors(ImmutableList.of(new Processor(offering.getCpuNumber(), offering.getCpuSpeed()))) .ram(offering.getMemory())// // TODO: hypervisor probably from zone? // TODO .volumes() // displayText // created // haSupport // storageType // TODO where's the location of this? .build(); }
public void testListServiceOfferings() throws Exception { Set<ServiceOffering> response = client.getOfferingClient().listServiceOfferings(); assert null != response; long offeringCount = response.size(); assertTrue(offeringCount >= 0); for (ServiceOffering offering : response) { ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingClient().listServiceOfferings( ListServiceOfferingsOptions.Builder.id(offering.getId()))); assertEquals(offering, newDetails); assert offering.getId() != null : offering; assert offering.getName() != null : offering; assert offering.getDisplayText() != null : offering; assert offering.getCpuNumber() > 0 : offering; assert offering.getCpuSpeed() > 0 : offering; assert offering.getMemory() > 0 : offering; assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering; assert offering.getTags() != null : offering; } }
public void testListServiceOfferings() throws Exception { Set<ServiceOffering> response = client.getOfferingApi().listServiceOfferings(); assert null != response; long offeringCount = response.size(); assertTrue(offeringCount >= 0); for (ServiceOffering offering : response) { ServiceOffering newDetails = Iterables.getOnlyElement(client.getOfferingApi().listServiceOfferings( ListServiceOfferingsOptions.Builder.id(offering.getId()))); assertEquals(offering, newDetails); assert offering.getId() != null : offering; assert offering.getName() != null : offering; assert offering.getDisplayText() != null : offering; assert offering.getCpuNumber() > 0 : offering; assert offering.getCpuSpeed() > 0 : offering; assert offering.getMemory() > 0 : offering; assert offering.getStorageType() != null && StorageType.UNRECOGNIZED != offering.getStorageType() : offering; assert offering.getTags() != null : offering; } }
public T fromServiceOffering(ServiceOffering in) { return this .id(in.getId()) .name(in.getName()) .displayText(in.getDisplayText()) .created(in.getCreated()) .domain(in.getDomain()) .domainId(in.getDomainId()) .cpuNumber(in.getCpuNumber()) .cpuSpeed(in.getCpuSpeed()) .memory(in.getMemory()) .supportsHA(in.supportsHA()) .storageType(in.getStorageType()) .tags(in.getTags()) .defaultUse(in.isDefaultUse()) .systemOffering(in.isSystemOffering()) .cpuUseLimited(in.isCpuUseLimited()) .networkRate(in.getNetworkRate()) .systemVmType(in.isSystemVmType()); } }
public T fromServiceOffering(ServiceOffering in) { return this .id(in.getId()) .name(in.getName()) .displayText(in.getDisplayText()) .created(in.getCreated()) .domain(in.getDomain()) .domainId(in.getDomainId()) .cpuNumber(in.getCpuNumber()) .cpuSpeed(in.getCpuSpeed()) .memory(in.getMemory()) .supportsHA(in.supportsHA()) .storageType(in.getStorageType()) .tags(in.getTags()) .defaultUse(in.isDefaultUse()) .systemOffering(in.isSystemOffering()) .cpuUseLimited(in.isCpuUseLimited()) .networkRate(in.getNetworkRate()) .systemVmType(in.isSystemVmType()); } }
public T fromServiceOffering(ServiceOffering in) { return this .id(in.getId()) .name(in.getName()) .displayText(in.getDisplayText()) .created(in.getCreated()) .domain(in.getDomain()) .domainId(in.getDomainId()) .cpuNumber(in.getCpuNumber()) .cpuSpeed(in.getCpuSpeed()) .memory(in.getMemory()) .supportsHA(in.supportsHA()) .storageType(in.getStorageType()) .tags(in.getTags()) .defaultUse(in.isDefaultUse()) .systemOffering(in.isSystemOffering()) .cpuUseLimited(in.isCpuUseLimited()) .networkRate(in.getNetworkRate()) .systemVmType(in.isSystemVmType()); } }