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>
...