Re: RGW python API failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 12, 2014 at 7:40 PM, wsnote <wsnote@xxxxxxx> wrote:
> I use the RGW python API but never succeeded.
>
> test-ceph.py:
> #!/usr/bin/python
> # Filename: test-ceph.py
> import boto
> import boto.s3.connection
> access_key = 'TJLN5IDXXXXXXXXXXXX'
> secret_key = 'EcaCMS1\/4b3\/AAM50QXXXXXXXXXXXXXXXX'
>
> conn = boto.connect_s3(
>         aws_access_key_id = access_key,
>         aws_secret_access_key = secret_key,
>         host = '1.1.1.1',
>         #is_secure=False,               # uncommmnt if you are not using ssl
>         calling_format = boto.s3.connection.OrdinaryCallingFormat(),
>         )
>
> bucket = conn.create_bucket('mybucket');
>
> for bucket in conn.get_all_buckets():
>         print "{name}\t{created}".format(
>                 name = bucket.name,
>                 created = bucket.creation_date,
>         )
>
> ----------------------------------------------------------
> [root@CentOS-6 ~]# ./test-ceph.py
> Traceback (most recent call last):
>   File "./test-ceph.py", line 16, in <module>
>     bucket = conn.create_bucket('mybucket');
>   File "/usr/lib/python2.6/site-packages/boto/s3/connection.py", line 590,
> in create_bucket
>     response.status, response.reason, body)
> boto.exception.S3ResponseError: S3ResponseError: 405 Method Not Allowed
> None
>
> What's the possible reason?
> Thanks!
>
>

Were you ever able to use it not via boto?

Possible reason: you didn't configure 'rgw dns name', and/or you
didn't set OrdinaryCallingFormat on the connection.

Yehuda
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux