Sha256: 0cb3d74bfa1be0cc57d5580af52aa6a0dbc6288aa339c708441d7719936f5a7f

Contents?: true

Size: 557 Bytes

Versions: 30

Compression:

Stored size: 557 Bytes

Contents

def test
  connection = Fog::Compute.new({ :provider => "Google" })

  rawdisk = {
    :source         => nil, # 'http://some_valid_url_to_rootfs_tarball'
    :container_type => 'TAR',
  }

  # Can't test this unless the 'source' points to a valid URL
  return if rawdisk[:source].nil?

  img = connection.image.create(:name             => 'test-image',
                                :description      => 'Test image (via fog)',
                                :raw_disk         => rawdisk)

  img.reload # will raise if image was not saved correctly
end

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/google/examples/image_create.rb
ns-fog-1.22.11 lib/fog/google/examples/image_create.rb
ns-fog-1.22.10 lib/fog/google/examples/image_create.rb
ns-fog-1.22.9 lib/fog/google/examples/image_create.rb
ns-fog-1.22.8 lib/fog/google/examples/image_create.rb
ns-fog-1.22.7 lib/fog/google/examples/image_create.rb
ns-fog-1.22.6 lib/fog/google/examples/image_create.rb
fog-1.23.0 lib/fog/google/examples/image_create.rb
ns-fog-1.22.4 lib/fog/google/examples/image_create.rb
ns-fog-1.22.3 lib/fog/google/examples/image_create.rb
ns-fog-1.22.2 lib/fog/google/examples/image_create.rb
fog-1.22.1 lib/fog/google/examples/image_create.rb
fog-1.22.0 lib/fog/google/examples/image_create.rb
fog-1.21.0 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/google/examples/image_create.rb
fog-1.20.0 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/google/examples/image_create.rb