0

Here is the code with wich I am trying to access the swift server:

import swiftclient

user = 'swift'
key = 'password'

conn = swiftclient.client.Connection(
        authurl='http://0.0.0.0:5000/v2.0',
        user=user,
        key=key,
        tenant_name = 'service',
        auth_version = '2.0',
        #os_options={'tenant_id':}

)

container_name = 'my-new-container'
conn.put_container(container_name)

with open('hello.txt', 'r') as hello_file:
        conn.put_object(container_name, 'hello.txt',
                                        contents= hello_file.read(),
                                        content_type='text/plain')

I am currently trying to set up a test enviroment to fiddle a bit. I followed the mentioned tutorials word for word and left everything to default.

Here is my console screenshot: enter image description here

and my error code: enter image description here

Sorry for my complete ignorance, but I am both a linux and python noob.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Vrankela
  • 1,162
  • 3
  • 16
  • 39
  • I have been following these instructions: [1](https://www.swiftstack.com/docs/integration/keystone.html) [2](https://github.com/swiftstack/keystone_install) [3](http://docs.openstack.org/developer/swift/development_saio.html) – Vrankela Jul 23 '15 at 16:42

1 Answers1

0

There are a few ways of spinning up your own instance of Swift. The one which offers you the most immediate ease of use is setting up a Swift All In One instance for which you can find instructions linked below. When setting up SAIO you will be provided with a preconfigured Temp-Auth system which allows for user authentication bypassing the need for Keystone.

http://docs.openstack.org/developer/swift/development_saio.html

If you're attempting to start up a Swift instance as a module of OpenStack there's a host of material available online which will lead you in the right direction for installing and configuring Keystone.

Might I also direct your questions regarding OpenStack/Swift: http://ask.openstack.org

jtv
  • 128
  • 5