Sha256: 7f6ad46c1a6abda23a271e721edb291906364ea8dd489bb125bd7825ba039e75

Contents?: true

Size: 627 Bytes

Versions: 24

Compression:

Stored size: 627 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',
                                :preferred_kernel => 'gce-v20130603',
                                :description      => 'Test image (via fog)',
                                :raw_disk         => rawdisk)

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

Version data entries

24 entries across 24 versions & 2 rubygems

Version Path
fog-1.19.0 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131209090811 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/google/examples/image_create.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/google/examples/image_create.rb
fog-1.18.0 lib/fog/google/examples/image_create.rb
fog-1.17.0 lib/fog/google/examples/image_create.rb