Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-162

SoftLayer ProductOrder is not constructed properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.5.10, 1.6.0, 1.6.1, 1.6.2, 1.7.0
    • None
    • jclouds-compute

    Description

      When trying to provision a compute instance of SoftLayer the following code is broken:

      ProductOrderReceipt productOrderReceipt = client.getVirtualGuestClient().orderVirtualGuest(order);
      VirtualGuest result = get(productOrderReceipt.getOrderDetails().getVirtualGuests(), 0);

      This is because the ProductOrderReciept.orderDetails.virtualGuests field is not populated with any virtaul guests and returns as an empty map. causing an IndexOutOfBoundsException when performing the get.

      from my investigation, this is because the ConstructorProperties in ProducOrder has a typo:

      @ConstructorProperties(

      { "packageId", "location", "prices", "virtualGuest", "quantity", "useHourlyPricing" }

      )

      notice the 'virtualGuest' property, it should be, to my understanding, 'virtualGuests'.

      Attachments

        Activity

          People

            Unassigned Unassigned
            iliapolo Eli Polonsky
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: