Fog::Image::OpenStack.new fail for openstack pike

9 views
Skip to first unread message

Evan Ya

unread,
Nov 22, 2017, 1:42:23 PM11/22/17
to ruby-fog

My Openstack's version is stable/pike.(ubuntu16 install by devstack, enable swift and in rails)


When I follow the tutorial to the Image (Glance)
Download Glance image:
@connection_params = {
openstack_auth_url: "http://xx.xxx.xx.xx/identity/v3/auth/tokens",
openstack_username: "admin",
openstack_api_key: "password",
openstack_project_name: "admin",
openstack_domain_id: "default"
}

image = Fog::Image::OpenStack.new(@connection_params)


The error is :
NoMethodError: undefined method `[]' for nil:NilClass
from /home/evan/.rvm/gems/ruby-2.3.4@fog-openstack/gems/fog-openstack-0.1.22/lib/fog/openstack.rb:364:in `authenticate_v3'


And then I follow the example 'spec/image_v2_upload_spec.rb'

image = Fog::Image::OpenStack.new(:openstack_auth_url=>"http://xx.xxx.xx.xx/identity/v3/auth/tokens", :openstack_project_name=>"admin", :openstack_username=>"admin", :openstack_api_key=>"password", :openstack_domain_name => 'default', :openstack_region => 'RegionOne')


The error is:
Fog::Errors::NotFound: No endpoints available for region 'RegionOne'
from /home/evan/.rvm/gems/ruby-2.3.4@fog-openstack/gems/fog-openstack-0.1.22/lib/fog/openstack.rb:354:in `authenticate_v3'


In terminal run openstack region list
+-----------+---------------+-------------+
| Region | Parent Region | Description |
+-----------+---------------+-------------+
| RegionOne | None | |
+-----------+---------------+-------------+


I also view the fog-openstack/examples/container_infra/basics.rb example ,the error is:
Invalid input for field 'scope/project/domain/name'

Is this the reason for the ruby version, or is it the openstack version?

How can I solve this problem? Thank you very much.

Reply all
Reply to author
Forward
0 new messages