- "Fog::OpenStackCommon"
- Been meeting weekly with Chris Johnson and Mike Hagedorn for month now give or take
- We have a work-in-progress Keystone client
- HP doing much of the coding
- Kyle and I have been involved via code review
- AFAIK, HP is testing it against devstack
- Plan is to solidify the Keystone client first then move on to other clients
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RequestRouter | |
ADMIN_REQUESTS = %w[ | |
names | |
of_admin_methods | |
go_here | |
this_is_an_admin_method | |
] | |
def request(params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func sum(a []int, c chan int) { | |
sum := 0 | |
for _, v := range a { | |
sum += v | |
} | |
c <- sum // send sum to c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func run() error { | |
return &MyError{ | |
time.Now(), | |
"it didn't work", | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Reader interface { | |
Read(b []byte) (n int, err error) | |
} | |
type Writer interface { | |
Write(b []byte) (n int, err error) | |
} | |
type ReadWriter interface { | |
Reader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it "File.expand_path raises because of non-absolute path" do | |
ENV.delete('FOG_RC') | |
ENV['HOME'] = '.' | |
if RUBY_PLATFORM == 'java' | |
Fog::Logger.warning("Stubbing out non-absolute path credentials test due to JRuby bug: https://github.com/jruby/jruby/issues/1163") | |
else | |
Fog.credentials_path | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.credentials_path | |
@credential_path ||= begin | |
path = ENV["FOG_RC"] || (ENV['HOME'] && File.directory?(ENV['HOME']) && '~/.fog') | |
File.expand_path(path) if path | |
rescue | |
nil | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mountain West Ruby Conf | |
Golden Gate Ruby Conf | |
Ruby Nation | |
Gotham Ruby Conf | |
Windy City Rails | |
Madison+ Ruby | |
Rocky Mountain Ruby | |
Lone Star Ruby (next held in 2015?) | |
Ruby DCamp | |
Cascadia Ruby |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private | |
def authenticate | |
# puts "===== Fog::Identity::OpenStackCommon -> authenticate =====" | |
if !@openstack_management_url || @openstack_must_reauthenticate | |
case @openstack_auth_uri.path | |
when /v1(\.\d+)?/ | |
Fog::OpenStackCommon::Authenticator.adapter = :authenticator_v1 | |
else | |
Fog::OpenStackCommon::Authenticator.adapter = :authenticator_v2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Fog | |
module Openstack | |
module Rackspace | |
class Identity < Fog::Service | |
US_ENDPOINT = 'https://identity.api.rackspacecloud.com/v2.0' | |
UK_ENDPOINT = 'https://lon.identity.api.rackspacecloud.com/v2.0' | |
requires :rackspace_username, :rackspace_api_key | |
recognizes :rackspace_auth_url, :rackspace_region |