we are trying to provision VM in tokyo data center(Location Code: TOK02) using Order API and we are receiving the error below:
A datacenter could not be found with the name tok02
Below is the code :
Guest.Service service = Guest.service(agentClient);
Guest guest = new Guest();
guest.setHostname(details.getServerName());
guest.setDomain(CloudConstants.SOFTLAYER_URL.getValue());
guest.setStartCpus(flavorCspResource.getCpu().getStartCPUs());
guest.setHourlyBillingFlag(true);
guest.setLocalDiskFlag(flavorCspResource.getDisk().getLocalDiskFlag());
guest.setOperatingSystemReferenceCode(details.getImageId());
guest.setMaxMemory(flavorCspResource.getRam().getMaxMemory());
guest.setDatacenter(new Location());
guest.getDatacenter().setName(details.getLocationCode());
Can you please check and let us know if we are missing something?
We are facing this issue for US, UK data centres as well