Uploaded image for project: 'Libcloud'
  1. Libcloud
  2. LIBCLOUD-71

IBM SBC driver fails to work (Invalid Instance Type)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.4.1
    • Core
    • None
    • Any

    Description

      Current IBM SBC driver has outdated style instance sizes hardcoded within ibm_sbc.py and cannot provision instances due to this.

      Creating a new node yields:
      Traceback (most recent call last):
      File "instance_provision.py", line 82, in <module>
      node = conn.create_node(name='test-form-script', image=images[24], size=sizes[0], location=locations[0], auth=key)
      File "C:\Python25\lib\site-packages\libcloud\drivers\ibm_sbc.py", line 120, in create_node
      data = data).object
      File "C:\Python25\lib\site-packages\libcloud\base.py", line 444, in request
      response = self.responseCls(self.connection.getresponse())
      File "C:\Python25\lib\site-packages\libcloud\base.py", line 165, in _init_
      raise Exception(self.parse_error())
      Exception: Error 412: Invalid Instance Type

      The driver's mechanism needs to query available instance sizes dynamically on a per instance basis since they are no longer static (+ their naming convention syntax changed too). Image specific sizes can be retrieved via REST API call, example: https://www-147.ibm.com/computecloud/enterprise/api/rest/20100331/offerings/image/20009961

      ...
      <SupportedInstanceTypes>
      <InstanceType>
      <ID>BRZ64.2/4096/60*500*350</ID>
      <Label>Bronze 64 bit</Label>
      <Price CountryCode="IBM">
      <CurrencyCode>USD</CurrencyCode>
      <Rate>0.5</Rate>
      <PricePerQuantity>1</PricePerQuantity>
      <UnitOfMeasure>UHR </UnitOfMeasure>
      </Price>
      </InstanceType>
      ...

      Attachments

        1. ibm_sbc.py.patch
          2 kB
          Sengor Kusturica

        Activity

          People

            jerry@apache.org Jerry Chen
            sengork Sengor Kusturica
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: