Unable to interact with HP Cloud object storage service via boto

53 views
Skip to first unread message

Christian Baun

unread,
May 15, 2013, 4:46:32 AM5/15/13
to boto-...@googlegroups.com
Hi,

interacting with the HP Cloud compute service via boto 2.6 works very well but when I try to interact with the HP Cloud object storage service I fail. I tried it this way:

from boto.s3.connection import *

calling_format=boto.s3.connection.OrdinaryCallingFormat()
conn_s3 = boto.s3.connection.S3Connection(aws_access_key_id="<project_id>:<access_key>",
                           aws_secret_access_key="<secret_access_key>",
                           is_secure=False,
                           validate_certs=False,
                           host="region-a.geo-1.objects.hpcloudsvc.com/v1/17981992107691",
                           calling_format=calling_format,
                           path="/")

rs = conn_s3.get_all_buckets()

Did I made a mistake or is it just impossible to use the HP Cloud object storage service via boto up to now?

Best Regards and thanks for any help
    Christian

Mitchell Garnaat

unread,
May 15, 2013, 10:45:50 AM5/15/13
to boto-users
What is the error you are getting?



--
You received this message because you are subscribed to the Google Groups "boto-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to boto-users+...@googlegroups.com.
To post to this group, send email to boto-...@googlegroups.com.
Visit this group at http://groups.google.com/group/boto-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Mitchell Garnaat

unread,
May 15, 2013, 10:47:27 AM5/15/13
to boto-users
Actually, have you tried setting host="region-a.geo-1.objeccts.hpcloudsvc.com" and path="/v1/17981992197691"?

Christian Baun

unread,
May 17, 2013, 3:36:16 AM5/17/13
to boto-...@googlegroups.com
When I do it this way:

is_secure=False,
host="region-a.geo-1.objects.hpcloudsvc.com/v1/17981992107691",
path="/"

I get this error message:

Traceback (most recent call last):
File "./boto_HP_cloud_testen.py", line 76, in <module>
rs = conn_s3.get_all_buckets()
File "/tmp/boto/s3/connection.py", line 360, in get_all_buckets
response = self.make_request('GET', headers=headers)
File "/tmp/boto/s3/connection.py", line 468, in make_request
override_num_retries=override_num_retries)
File "/tmp/boto/connection.py", line 910, in make_request
return self._mexe(http_request, sender, override_num_retries)
File "/tmp/boto/connection.py", line 872, in _mexe
raise e
socket.gaierror: [Errno -2] Name or service not known

When I do it this way:

is_secure=False,
host="region-a.geo-1.objects.hpcloudsvc.com",
path="/v1/17981992107691"

It hangs.

When I do it this way:

is_secure=True,
host="region-a.geo-1.objects.hpcloudsvc.com/v1/17981992107691",
path="/"

It also hangs.

When I do it this way:

is_secure=True,
host="region-a.geo-1.objects.hpcloudsvc.com",
path="/v1/17981992107691"

I get this error message:

Traceback (most recent call last):
File "./boto_HP_cloud_testen.py", line 76, in <module>
rs = conn_s3.get_all_buckets()
File "/tmp/boto/s3/connection.py", line 367, in get_all_buckets
xml.sax.parseString(body, h)
File "/usr/lib/python2.7/xml/sax/__init__.py", line 49, in parseString
parser.parse(inpsrc)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 125, in parse
self.close()
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 217, in close
self.feed("", isFinal = 1)
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 211, in feed
self._err_handler.fatalError(exc)
File "/usr/lib/python2.7/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: <unknown>:1:0: no element found

I tried the last option without and with a bucket existing in the
region.The result is the same.

Best Regards
Christian



2013/5/15 Mitchell Garnaat <mi...@garnaat.com>:
Reply all
Reply to author
Forward
0 new messages