So, we have OpenstackSwift installed. Console client uses these options:
export OS_PROJECT_DOMAIN_NAME=default
export OS_USER_DOMAIN_NAME=default
export OS_PROJECT_NAME=myproject
export OS_USERNAME=user
export OS_PASSWORD=passw0rd
export OS_AUTH_URL=http://hostname:5000/v3
export OS_IDENTITY_API_VERSION=3
and the client works well. Also I've installed two gems:
user@host:~$ gem search 'openstack'
*** LOCAL GEMS ***
openstack (1.1.2)
openstack-swift (0.2.1)
When I try to connect to swift in Interactive RuBy console:
irb(main):002:0> require 'openstack'
=> true
irb(main):003:0> require 'openstack-swift'
=> true
irb(main):004:0> swift = Openstack::Swift::Client.new("http://hostname:5000/v3", "user", "passw0rd")
NoMethodError: undefined method `blank?' for nil:NilClass
from /var/lib/gems/1.9.1/gems/openstack-swift-0.2.1/lib/openstack-swift/client.rb:19:in `authenticate!'
from /var/lib/gems/1.9.1/gems/openstack-swift-0.2.1/lib/openstack-swift/client.rb:9:in `initialize'
from (irb):4:in `new'
from (irb):4
from /usr/bin/irb:12:in `<main>'
What's wrong?
Aucun commentaire:
Enregistrer un commentaire