require 'openstack' module OpenStack class Authentication def self.init(conn) if conn.auth_path =~ /.*v2.0\// AuthV20.new(conn) else AuthV10.new(conn) end end end end flavor_name = 'g-1gb' image_name = 'vmi-ubuntu-14.04-amd64' # https://www.conoha.jp/docs/compute-create_vm.html os = OpenStack::Connection.create( username: ENV['CONOHA_USER'], api_key: ENV['CONOHA_PASS'], authtenant_id: ENV['CONOHA_