You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@libcloud.apache.org by wo...@apache.org on 2010/08/03 03:12:07 UTC
svn commit: r981716 - /incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
Author: woodser
Date: Tue Aug 3 01:12:07 2010
New Revision: 981716
URL: http://svn.apache.org/viewvc?rev=981716&view=rev
Log:
Updated IBM driver to point to GA release.
Modified:
incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
Modified: incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py?rev=981716&r1=981715&r2=981716&view=diff
==============================================================================
--- incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py (original)
+++ incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py Tue Aug 3 01:12:07 2010
@@ -22,8 +22,8 @@ import base64, urllib
from xml.etree import ElementTree as ET
-HOST = 'www-180.ibm.com'
-REST_BASE = '/cloud/enterprise/beta/api/rest/20090403/'
+HOST = 'www-147.ibm.com'
+REST_BASE = '/computecloud/enterprise/api/rest/20100331'
class IBMResponse(Response):
def success(self):
@@ -112,19 +112,19 @@ class IBMNodeDriver(NodeDriver):
data.update({key: configurationData.get(key)})
# Send request!
- resp = self.connection.request(action = REST_BASE + 'instances',
+ resp = self.connection.request(action = REST_BASE + '/instances',
headers = {'Content-Type': 'application/x-www-form-urlencoded'},
method = 'POST',
data = data).object
return self._to_nodes(resp)[0]
def destroy_node(self, node):
- url = REST_BASE + 'instances/%s' % (node.id)
+ url = REST_BASE + '/instances/%s' % (node.id)
status = int(self.connection.request(action = url, method='DELETE').status)
return status == 200
def reboot_node(self, node):
- url = REST_BASE + 'instances/%s' % (node.id)
+ url = REST_BASE + '/instances/%s' % (node.id)
headers = {'Content-Type': 'application/x-www-form-urlencoded'}
data = {'state': 'restart'}
@@ -135,20 +135,22 @@ class IBMNodeDriver(NodeDriver):
return int(resp.status) == 200
def list_nodes(self):
- return self._to_nodes(self.connection.request(REST_BASE + 'instances').object)
+ return self._to_nodes(self.connection.request(REST_BASE + '/instances').object)
def list_images(self, location = None):
- return self._to_images(self.connection.request(REST_BASE + 'images').object)
+ return self._to_images(self.connection.request(REST_BASE + '/offerings/image').object)
- def list_sizes(self, location = None):
- # IBM Developer Cloud instances currently support SMALL, MEDIUM, and
- # LARGE. Storage also supports SMALL, MEDIUM, and LARGE.
- return [ NodeSize('SMALL', 'SMALL', None, None, None, None, self.connection.driver),
- NodeSize('MEDIUM', 'MEDIUM', None, None, None, None, self.connection.driver),
- NodeSize('LARGE', 'LARGE', None, None, None, None, self.connection.driver) ]
+ def list_sizes(self, location = None):
+ return [ NodeSize('BRZ32.1/2048/175', 'Bronze 32 bit', None, None, None, None, self.connection.driver),
+ NodeSize('BRZ64.2/4096/850', 'Bronze 64 bit', None, None, None, None, self.connection.driver),
+ NodeSize('SLV32.2/4096/350', 'Silver 32 bit', None, None, None, None, self.connection.driver),
+ NodeSize('SLV64.4/8192/1024', 'Silver 64 bit', None, None, None, None, self.connection.driver),
+ NodeSize('GLD32.4/4096/350', 'Gold 32 bit', None, None, None, None, self.connection.driver),
+ NodeSize('GLD64.8/16384/1024', 'Gold 64 bit', None, None, None, None, self.connection.driver),
+ NodeSize('PLT64.16/16384/2045', 'Platinum 64 bit', None, None, None, None, self.connection.driver) ]
def list_locations(self):
- return self._to_locations(self.connection.request(REST_BASE + 'locations').object)
+ return self._to_locations(self.connection.request(REST_BASE + '/locations').object)
def _to_nodes(self, object):
return [ self._to_node(instance) for instance in object.findall('Instance') ]
Re: [libcloud] Re: svn commit: r981716 - /incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
Posted by Eric Woods <wo...@gmail.com>.
Thanks dims for fixing the test case. It was fixed before I even saw this note :)
Thanks,
Eric W.
On Aug 12, 2010, at 10:12 PM, Paul Querna wrote:
> https://issues.apache.org/jira/browse/LIBCLOUD-46
>
> dims was nice enough to fix the test cases, I applied the patch in r985069
>
> On Thu, Aug 12, 2010 at 4:00 PM, Paul Querna <pa...@querna.org> wrote:
>> Hi Eric,
>>
>> Can you please look at updating the test cases after this change?
>>
>> Currently trunk is failing quite a few test cases on the IBM driver here:
>> http://ci.apache.org/builders/libcloud-trunk/builds/28/steps/compile/logs/stdio
>>
>> Reverting r981716 gets trunk back to 100% of the test cases passing.
>>
>> Thanks,
>>
>> Paul
>>
>>
>>
>> On Mon, Aug 2, 2010 at 6:12 PM, <wo...@apache.org> wrote:
>>> Author: woodser
>>> Date: Tue Aug 3 01:12:07 2010
>>> New Revision: 981716
>>>
>>> URL: http://svn.apache.org/viewvc?rev=981716&view=rev
>>> Log:
>>> Updated IBM driver to point to GA release.
>>>
>>> Modified:
>>> incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
>>>
>>> Modified: incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
>>> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py?rev=981716&r1=981715&r2=981716&view=diff
>>> ==============================================================================
>>> --- incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py (original)
>>> +++ incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py Tue Aug 3 01:12:07 2010
>>> @@ -22,8 +22,8 @@ import base64, urllib
>>>
>>> from xml.etree import ElementTree as ET
>>>
>>> -HOST = 'www-180.ibm.com'
>>> -REST_BASE = '/cloud/enterprise/beta/api/rest/20090403/'
>>> +HOST = 'www-147.ibm.com'
>>> +REST_BASE = '/computecloud/enterprise/api/rest/20100331'
>>>
>>> class IBMResponse(Response):
>>> def success(self):
>>> @@ -112,19 +112,19 @@ class IBMNodeDriver(NodeDriver):
>>> data.update({key: configurationData.get(key)})
>>>
>>> # Send request!
>>> - resp = self.connection.request(action = REST_BASE + 'instances',
>>> + resp = self.connection.request(action = REST_BASE + '/instances',
>>> headers = {'Content-Type': 'application/x-www-form-urlencoded'},
>>> method = 'POST',
>>> data = data).object
>>> return self._to_nodes(resp)[0]
>>>
>>> def destroy_node(self, node):
>>> - url = REST_BASE + 'instances/%s' % (node.id)
>>> + url = REST_BASE + '/instances/%s' % (node.id)
>>> status = int(self.connection.request(action = url, method='DELETE').status)
>>> return status == 200
>>>
>>> def reboot_node(self, node):
>>> - url = REST_BASE + 'instances/%s' % (node.id)
>>> + url = REST_BASE + '/instances/%s' % (node.id)
>>> headers = {'Content-Type': 'application/x-www-form-urlencoded'}
>>> data = {'state': 'restart'}
>>>
>>> @@ -135,20 +135,22 @@ class IBMNodeDriver(NodeDriver):
>>> return int(resp.status) == 200
>>>
>>> def list_nodes(self):
>>> - return self._to_nodes(self.connection.request(REST_BASE + 'instances').object)
>>> + return self._to_nodes(self.connection.request(REST_BASE + '/instances').object)
>>>
>>> def list_images(self, location = None):
>>> - return self._to_images(self.connection.request(REST_BASE + 'images').object)
>>> + return self._to_images(self.connection.request(REST_BASE + '/offerings/image').object)
>>>
>>> - def list_sizes(self, location = None):
>>> - # IBM Developer Cloud instances currently support SMALL, MEDIUM, and
>>> - # LARGE. Storage also supports SMALL, MEDIUM, and LARGE.
>>> - return [ NodeSize('SMALL', 'SMALL', None, None, None, None, self.connection.driver),
>>> - NodeSize('MEDIUM', 'MEDIUM', None, None, None, None, self.connection.driver),
>>> - NodeSize('LARGE', 'LARGE', None, None, None, None, self.connection.driver) ]
>>> + def list_sizes(self, location = None):
>>> + return [ NodeSize('BRZ32.1/2048/175', 'Bronze 32 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('BRZ64.2/4096/850', 'Bronze 64 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('SLV32.2/4096/350', 'Silver 32 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('SLV64.4/8192/1024', 'Silver 64 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('GLD32.4/4096/350', 'Gold 32 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('GLD64.8/16384/1024', 'Gold 64 bit', None, None, None, None, self.connection.driver),
>>> + NodeSize('PLT64.16/16384/2045', 'Platinum 64 bit', None, None, None, None, self.connection.driver) ]
>>>
>>> def list_locations(self):
>>> - return self._to_locations(self.connection.request(REST_BASE + 'locations').object)
>>> + return self._to_locations(self.connection.request(REST_BASE + '/locations').object)
>>>
>>> def _to_nodes(self, object):
>>> return [ self._to_node(instance) for instance in object.findall('Instance') ]
>>>
>>>
>>>
>>
[libcloud] Re: svn commit: r981716 - /incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
Posted by Paul Querna <pa...@querna.org>.
https://issues.apache.org/jira/browse/LIBCLOUD-46
dims was nice enough to fix the test cases, I applied the patch in r985069
On Thu, Aug 12, 2010 at 4:00 PM, Paul Querna <pa...@querna.org> wrote:
> Hi Eric,
>
> Can you please look at updating the test cases after this change?
>
> Currently trunk is failing quite a few test cases on the IBM driver here:
> http://ci.apache.org/builders/libcloud-trunk/builds/28/steps/compile/logs/stdio
>
> Reverting r981716 gets trunk back to 100% of the test cases passing.
>
> Thanks,
>
> Paul
>
>
>
> On Mon, Aug 2, 2010 at 6:12 PM, <wo...@apache.org> wrote:
>> Author: woodser
>> Date: Tue Aug 3 01:12:07 2010
>> New Revision: 981716
>>
>> URL: http://svn.apache.org/viewvc?rev=981716&view=rev
>> Log:
>> Updated IBM driver to point to GA release.
>>
>> Modified:
>> incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
>>
>> Modified: incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
>> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py?rev=981716&r1=981715&r2=981716&view=diff
>> ==============================================================================
>> --- incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py (original)
>> +++ incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py Tue Aug 3 01:12:07 2010
>> @@ -22,8 +22,8 @@ import base64, urllib
>>
>> from xml.etree import ElementTree as ET
>>
>> -HOST = 'www-180.ibm.com'
>> -REST_BASE = '/cloud/enterprise/beta/api/rest/20090403/'
>> +HOST = 'www-147.ibm.com'
>> +REST_BASE = '/computecloud/enterprise/api/rest/20100331'
>>
>> class IBMResponse(Response):
>> def success(self):
>> @@ -112,19 +112,19 @@ class IBMNodeDriver(NodeDriver):
>> data.update({key: configurationData.get(key)})
>>
>> # Send request!
>> - resp = self.connection.request(action = REST_BASE + 'instances',
>> + resp = self.connection.request(action = REST_BASE + '/instances',
>> headers = {'Content-Type': 'application/x-www-form-urlencoded'},
>> method = 'POST',
>> data = data).object
>> return self._to_nodes(resp)[0]
>>
>> def destroy_node(self, node):
>> - url = REST_BASE + 'instances/%s' % (node.id)
>> + url = REST_BASE + '/instances/%s' % (node.id)
>> status = int(self.connection.request(action = url, method='DELETE').status)
>> return status == 200
>>
>> def reboot_node(self, node):
>> - url = REST_BASE + 'instances/%s' % (node.id)
>> + url = REST_BASE + '/instances/%s' % (node.id)
>> headers = {'Content-Type': 'application/x-www-form-urlencoded'}
>> data = {'state': 'restart'}
>>
>> @@ -135,20 +135,22 @@ class IBMNodeDriver(NodeDriver):
>> return int(resp.status) == 200
>>
>> def list_nodes(self):
>> - return self._to_nodes(self.connection.request(REST_BASE + 'instances').object)
>> + return self._to_nodes(self.connection.request(REST_BASE + '/instances').object)
>>
>> def list_images(self, location = None):
>> - return self._to_images(self.connection.request(REST_BASE + 'images').object)
>> + return self._to_images(self.connection.request(REST_BASE + '/offerings/image').object)
>>
>> - def list_sizes(self, location = None):
>> - # IBM Developer Cloud instances currently support SMALL, MEDIUM, and
>> - # LARGE. Storage also supports SMALL, MEDIUM, and LARGE.
>> - return [ NodeSize('SMALL', 'SMALL', None, None, None, None, self.connection.driver),
>> - NodeSize('MEDIUM', 'MEDIUM', None, None, None, None, self.connection.driver),
>> - NodeSize('LARGE', 'LARGE', None, None, None, None, self.connection.driver) ]
>> + def list_sizes(self, location = None):
>> + return [ NodeSize('BRZ32.1/2048/175', 'Bronze 32 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('BRZ64.2/4096/850', 'Bronze 64 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('SLV32.2/4096/350', 'Silver 32 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('SLV64.4/8192/1024', 'Silver 64 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('GLD32.4/4096/350', 'Gold 32 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('GLD64.8/16384/1024', 'Gold 64 bit', None, None, None, None, self.connection.driver),
>> + NodeSize('PLT64.16/16384/2045', 'Platinum 64 bit', None, None, None, None, self.connection.driver) ]
>>
>> def list_locations(self):
>> - return self._to_locations(self.connection.request(REST_BASE + 'locations').object)
>> + return self._to_locations(self.connection.request(REST_BASE + '/locations').object)
>>
>> def _to_nodes(self, object):
>> return [ self._to_node(instance) for instance in object.findall('Instance') ]
>>
>>
>>
>
[libcloud] Re: svn commit: r981716 - /incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
Posted by Paul Querna <pa...@querna.org>.
Hi Eric,
Can you please look at updating the test cases after this change?
Currently trunk is failing quite a few test cases on the IBM driver here:
http://ci.apache.org/builders/libcloud-trunk/builds/28/steps/compile/logs/stdio
Reverting r981716 gets trunk back to 100% of the test cases passing.
Thanks,
Paul
On Mon, Aug 2, 2010 at 6:12 PM, <wo...@apache.org> wrote:
> Author: woodser
> Date: Tue Aug 3 01:12:07 2010
> New Revision: 981716
>
> URL: http://svn.apache.org/viewvc?rev=981716&view=rev
> Log:
> Updated IBM driver to point to GA release.
>
> Modified:
> incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
>
> Modified: incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py
> URL: http://svn.apache.org/viewvc/incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py?rev=981716&r1=981715&r2=981716&view=diff
> ==============================================================================
> --- incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py (original)
> +++ incubator/libcloud/trunk/libcloud/drivers/ibm_sbc.py Tue Aug 3 01:12:07 2010
> @@ -22,8 +22,8 @@ import base64, urllib
>
> from xml.etree import ElementTree as ET
>
> -HOST = 'www-180.ibm.com'
> -REST_BASE = '/cloud/enterprise/beta/api/rest/20090403/'
> +HOST = 'www-147.ibm.com'
> +REST_BASE = '/computecloud/enterprise/api/rest/20100331'
>
> class IBMResponse(Response):
> def success(self):
> @@ -112,19 +112,19 @@ class IBMNodeDriver(NodeDriver):
> data.update({key: configurationData.get(key)})
>
> # Send request!
> - resp = self.connection.request(action = REST_BASE + 'instances',
> + resp = self.connection.request(action = REST_BASE + '/instances',
> headers = {'Content-Type': 'application/x-www-form-urlencoded'},
> method = 'POST',
> data = data).object
> return self._to_nodes(resp)[0]
>
> def destroy_node(self, node):
> - url = REST_BASE + 'instances/%s' % (node.id)
> + url = REST_BASE + '/instances/%s' % (node.id)
> status = int(self.connection.request(action = url, method='DELETE').status)
> return status == 200
>
> def reboot_node(self, node):
> - url = REST_BASE + 'instances/%s' % (node.id)
> + url = REST_BASE + '/instances/%s' % (node.id)
> headers = {'Content-Type': 'application/x-www-form-urlencoded'}
> data = {'state': 'restart'}
>
> @@ -135,20 +135,22 @@ class IBMNodeDriver(NodeDriver):
> return int(resp.status) == 200
>
> def list_nodes(self):
> - return self._to_nodes(self.connection.request(REST_BASE + 'instances').object)
> + return self._to_nodes(self.connection.request(REST_BASE + '/instances').object)
>
> def list_images(self, location = None):
> - return self._to_images(self.connection.request(REST_BASE + 'images').object)
> + return self._to_images(self.connection.request(REST_BASE + '/offerings/image').object)
>
> - def list_sizes(self, location = None):
> - # IBM Developer Cloud instances currently support SMALL, MEDIUM, and
> - # LARGE. Storage also supports SMALL, MEDIUM, and LARGE.
> - return [ NodeSize('SMALL', 'SMALL', None, None, None, None, self.connection.driver),
> - NodeSize('MEDIUM', 'MEDIUM', None, None, None, None, self.connection.driver),
> - NodeSize('LARGE', 'LARGE', None, None, None, None, self.connection.driver) ]
> + def list_sizes(self, location = None):
> + return [ NodeSize('BRZ32.1/2048/175', 'Bronze 32 bit', None, None, None, None, self.connection.driver),
> + NodeSize('BRZ64.2/4096/850', 'Bronze 64 bit', None, None, None, None, self.connection.driver),
> + NodeSize('SLV32.2/4096/350', 'Silver 32 bit', None, None, None, None, self.connection.driver),
> + NodeSize('SLV64.4/8192/1024', 'Silver 64 bit', None, None, None, None, self.connection.driver),
> + NodeSize('GLD32.4/4096/350', 'Gold 32 bit', None, None, None, None, self.connection.driver),
> + NodeSize('GLD64.8/16384/1024', 'Gold 64 bit', None, None, None, None, self.connection.driver),
> + NodeSize('PLT64.16/16384/2045', 'Platinum 64 bit', None, None, None, None, self.connection.driver) ]
>
> def list_locations(self):
> - return self._to_locations(self.connection.request(REST_BASE + 'locations').object)
> + return self._to_locations(self.connection.request(REST_BASE + '/locations').object)
>
> def _to_nodes(self, object):
> return [ self._to_node(instance) for instance in object.findall('Instance') ]
>
>
>