Sha256: f4f4fb9c2bc9b32a3bcb14523652282b1bf562519c54647f1aab3e11527eade5

Contents?: true

Size: 743 Bytes

Versions: 3

Compression:

Stored size: 743 Bytes

Contents

require 'fog'
if ENV['RAX_MOCK'] == 'true'
    Fog.mock!
    Fog::Openstack::MockData.configure do |c|
        c[:image_name_generator] = Proc.new { "Ubuntu" }
        c[:ipv4_generator] = Proc.new { "10.11.12.2"}
    end
    connect_options = {
        :provider             => 'openstack',
        :openstack_username   => ENV['RAX_USERNAME'],
        :openstack_api_key    => ENV['RAX_API_KEY'],
        :version => :v2, # Use Next Gen Cloud Servers
        :openstack_region => :ord #Use Chicago Region
    } 
    connect_options.merge!(proxy_options) unless ENV['https_proxy'].nil?
    compute = Fog::Compute.new(connect_options)
    # Force creation of Ubuntu image so it will show up in compute.images.list
    compute.images.get(0)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
vagrant-openstack-provider-0.1.2 features/support/fog_mock.rb
vagrant-openstack-provider-0.1.1 features/support/fog_mock.rb
vagrant-openstack-provider-0.1 features/support/fog_mock.rb