This failed for me, when there were some other VMs already in existance in my
account.
To get it to work, I had to also add:
diff --git
a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
index 93f0fc4..6f438e3 100644
---
a/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
+++
b/providers/softlayer/src/main/java/org/jclouds/softlayer/compute/functions/VirtualGuestToNodeMetadata.java
@@ -88,10 +88,9 @@ public class VirtualGuestToNodeMetadata implements
Function<VirtualGuest, NodeMe
if (image != null) {
builder.imageId(image.getId());
builder.operatingSystem(image.getOperatingSystem());
+ builder.hardware(hardware.getHardware(from));
}
- builder.hardware(hardware.getHardware(from));
-
builder.status(serverStateToNodeStatus.get(from.getPowerState().getKeyName()));
// These are null for 'bad' guest orders in the HALTED state.
@@ -147,6 +146,8 @@ public class VirtualGuestToNodeMetadata implements
Function<VirtualGuest, NodeMe
return null;
Iterable<ProductItem> items =
Iterables.transform(order.getPrices(), ProductItems.item());
ProductItem os = Iterables.find(items,
ProductItemPredicates.categoryCode("os"));
+ if (os.getPrices().isEmpty())
+ return null;
return new ProductItemToImage().apply(os);
}
}
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/77#issuecomment-23683116