jclouds / legacy-jclouds

https://jclouds.apache.org
467 stars 218 forks source link

update softlayer to use createObject as opposed to price list #1282

Open jclouds opened 11 years ago

jclouds commented 11 years ago
java.util.NoSuchElementException: ProductItem has no prices:ProductItem{id=4174, description=Ubuntu Linux 12.04 LTS Precise Pangolin - Minimal Install (64 bit), units=N/A, capacity=0.0, prices=[], categories=[ProductItemCategory{id=12, name=Operating System, categoryCode=os}]}
at org.jclouds.softlayer.compute.functions.ProductItems$3.apply(ProductItems.java:66)
at org.jclouds.softlayer.compute.functions.ProductItems$3.apply(ProductItems.java:62)
at org.jclouds.softlayer.compute.functions.ProductItemToImage$4.apply(ProductItemToImage.java:183)
at org.jclouds.softlayer.compute.functions.ProductItemToImage$4.apply(ProductItemToImage.java:179)
at org.jclouds.softlayer.compute.functions.ProductItemToImage.apply(ProductItemToImage.java:89)
at org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata$GetImageForVirtualGuest.getImage(VirtualGuestToNodeMetadata.java:152)
at org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata.apply(VirtualGuestToNodeMetadata.java:89)
at org.jclouds.softlayer.compute.functions.VirtualGuestToNodeMetadata.apply(VirtualGuestToNodeMetadata.java:54)
at com.google.common.base.Functions$FunctionComposition.apply(Functions.java:210)
at com.google.common.collect.Iterators$8.transform(Iterators.java:860)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:701)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
at com.google.common.collect.Sets.newLinkedHashSet(Sets.java:295)
at org.jclouds.compute.internal.BaseComputeService.listNodesDetailsMatching(BaseComputeService.java:351)
at com.continuuity.JCloudsTest.listServers(JCloudsTest.java:36)
at com.continuuity.JCloudsTest.main(JCloudsTest.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
jclouds commented 11 years ago

it is going to take a while to sort this one out, as the product api call takes a very long time to respond

jclouds commented 11 years ago

bumping to 1.5.7

codefromthecrypt commented 11 years ago

looks like the api structure needs to change a bit. Here's info from Phil:

We have a new method to gather info on cloud instances options. It should be a lot faster for you guys as it provides all of the options in one call pre organized.

Simplified creation: http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/createObject Order options: http://sldn.softlayer.com/reference/services/SoftLayer_Virtual_Guest/getCreateObjectOptions/ Blog that covers usage: http://sldn.softlayer.com/blog/phil/Simplified-CCI-Creation