mirror of https://github.com/apache/jclouds.git
[SoftLayer] use FQDN as hostname
This commit is contained in:
parent
1ccdae46fa
commit
047d1b546b
|
@ -70,7 +70,7 @@ public class VirtualGuestToNodeMetadata implements Function<VirtualGuest, NodeMe
|
|||
NodeMetadataBuilder builder = new NodeMetadataBuilder();
|
||||
builder.ids(from.getId() + "");
|
||||
builder.name(from.getHostname());
|
||||
builder.hostname(from.getHostname() + from.getDomain());
|
||||
builder.hostname(from.getFullyQualifiedDomainName());
|
||||
if (from.getDatacenter() != null) {
|
||||
builder.location(from(locations.get()).firstMatch(
|
||||
LocationPredicates.idEquals(from.getDatacenter().getName())).orNull());
|
||||
|
|
|
@ -67,7 +67,7 @@ public class VirtualGuestToNodeMetadataTest {
|
|||
assertEquals(nodeMetadata.getName(), virtualGuest.getHostname());
|
||||
assertNotNull(nodeMetadata.getLocation());
|
||||
assertEquals(nodeMetadata.getLocation().getId(), location.getId());
|
||||
assertEquals(nodeMetadata.getHostname(), virtualGuest.getHostname() + virtualGuest.getDomain());
|
||||
assertEquals(nodeMetadata.getHostname(), virtualGuest.getFullyQualifiedDomainName());
|
||||
assertEquals(nodeMetadata.getHardware().getRam(), virtualGuest.getMaxMemory());
|
||||
assertTrue(nodeMetadata.getHardware().getProcessors().size() == 1);
|
||||
assertEquals(Iterables.get(nodeMetadata.getHardware().getProcessors(), 0).getCores(), (double) virtualGuest.getStartCpus());
|
||||
|
@ -80,6 +80,7 @@ public class VirtualGuestToNodeMetadataTest {
|
|||
return VirtualGuest.builder()
|
||||
.domain("example.com")
|
||||
.hostname("host1")
|
||||
.fullyQualifiedDomainName("host1.example.com")
|
||||
.id(1301396)
|
||||
.maxMemory(1024)
|
||||
.startCpus(1)
|
||||
|
|
Loading…
Reference in New Issue