public Hardware apply(PackageInDatacenter pkgInDatacenter) {
Location location = locationIndex.get().get(pkgInDatacenter.getDatacenter());
checkState(location != null, "location %s not in locationIndex: %s", pkgInDatacenter.getDatacenter(),
locationIndex.get());
org.jclouds.joyent.cloudapi.v6_5.domain.Package pkg = pkgInDatacenter.get();
return new HardwareBuilder().id(pkgInDatacenter.slashEncode()).providerId(pkg.getName()).name(pkg.getName())
.ram(pkg.getMemorySizeMb())
// TODO: no api call to get processors.. either hard-code or
// calculate
.processor(new Processor(1, 1.0)).volume(new VolumeImpl(Float.valueOf(pkg.getDiskSizeGb()), true, true))
.location(location).build();