Sha256: d4254e5fe132af290818e84701255267aa58290efcb01f142f1eeaa9e7f8db0e
Contents?: true
Size: 1.31 KB
Versions: 1
Compression:
Stored size: 1.31 KB
Contents
# OpenStack Compute (Nova) Example require 'fog' require 'fog/openstack' auth_url = "https://example.net/v2.0/tokens" username = 'admin@example.net' password = 'secret' tenant = 'My Compute Tenant' # String compute_client ||= ::Fog::Compute.new(:provider => :openstack, :openstack_api_key => password , :openstack_username => username , :openstack_auth_url => auth_url , :openstack_tenant => tenant) vm = compute_client.servers.create(:name => name, :flavor_ref => flavor, :block_device_mapping => [ { :api_ver => "v2", :device_name => "/dev/vda1", :source_type => "volume", :destination_type => "volume", :delete_on_termination => false, :uuid => cinder_uddi, :boot_index => 0 } ] )
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
fog-1.26.0 | lib/fog/openstack/examples/compute/block_device_mapping_v2.rb |