Skip to content

Instantly share code, notes, and snippets.

@mattray
Created February 27, 2014 23:45
Show Gist options
  • Select an option

  • Save mattray/9262177 to your computer and use it in GitHub Desktop.

Select an option

Save mattray/9262177 to your computer and use it in GitHub Desktop.
fog openstack on vagrant localhost
root@ubuntu1204:~# /opt/chef/bin/pry
[1] pry(main)> require 'fog'
=> true
[2] pry(main)> conn = Fog::Compute.new(:provider => 'OpenStack', :openstack_auth_url => "http://127.0.0.1:5000/v2.0/tokens", :openstack_username => 'admin', :openstack_api_key => 'admin', :openstack_tenant => 'admin')
=> #<Fog::Compute::OpenStack::Real:18644500 @openstack_auth_token=nil @auth_token="be89ca6a387442e9bf494adc1fb246b1" @openstack_identity_public_endpoint="http://127.0.0.1:5000/v2.0" @openstack_api_key="admin" @openstack_username="admin" @openstack_tenant="admin" @openstack_auth_uri=#<URI::HTTP:0x0000000238f6b0 URL:http://127.0.0.1:5000/v2.0/tokens> @openstack_management_url="http://127.0.0.1:8774/v2/ec6c3eb97a714b568a4a50d36c84a18c" @openstack_must_reauthenticate=false @openstack_service_type=["nova", "compute"] @openstack_service_name=nil @openstack_identity_service_type="identity" @openstack_endpoint_type="publicURL" @openstack_region=nil @connection_options={:debug_response=>true, :headers=>{"User-Agent"=>"fog/1.20.0"}, :persistent=>false} @current_user={"username"=>"admin", "roles_links"=>[], "id"=>"bae552fc5b35462cac3a712ea2fb7c07", "roles"=>[{"name"=>"KeystoneAdmin"}, {"name"=>"KeystoneServiceAdmin"}, {"name"=>"admin"}, {"name"=>"_member_"}], "name"=>"admin"} @current_tenant={"description"=>"admin Tenant", "enabled"=>true, "id"=>"ec6c3eb97a714b568a4a50d36c84a18c", "name"=>"admin"} @auth_token_expiration="2014-02-28T23:44:16Z" @host="127.0.0.1" @path="/v2" @tenant_id="ec6c3eb97a714b568a4a50d36c84a18c" @port=8774 @scheme="http" @identity_connection=#<Fog::Connection:0x0000000224a840 @excon=#<Excon::Connection:2251c08 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.20.0"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"127.0.0.1", :path=>"/v2.0", :port=>5000, :query=>nil, :scheme=>"http", :user=>nil, :password=>nil} @socket_key="http://127.0.0.1:5000">> @persistent=false @connection=#<Fog::Connection:0x000000022509e8 @excon=#<Excon::Connection:224fed0 @data={:chunk_size=>1048576, :ciphers=>"HIGH:!SSLv2:!aNULL:!eNULL:!3DES", :connect_timeout=>60, :debug_request=>false, :debug_response=>true, :headers=>{"User-Agent"=>"fog/1.20.0"}, :idempotent=>false, :instrumentor_name=>"excon", :middlewares=>[Excon::Middleware::ResponseParser, Excon::Middleware::Expects, Excon::Middleware::Idempotent, Excon::Middleware::Instrumentor, Excon::Middleware::Mock], :mock=>false, :nonblock=>true, :omit_default_port=>false, :persistent=>false, :read_timeout=>60, :retry_limit=>4, :ssl_verify_peer=>true, :tcp_nodelay=>false, :uri_parser=>URI, :write_timeout=>60, :host=>"127.0.0.1", :path=>"", :port=>8774, :query=>nil, :scheme=>"http", :user=>nil, :password=>nil} @socket_key="http://127.0.0.1:8774">>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment