Sha256: 4a7ba249c6d9afde215ab451ca2f2761e4fb5ff2bc24314dc78a5a54a4d46774

Contents?: true

Size: 620 Bytes

Versions: 55

Compression:

Stored size: 620 Bytes

Contents

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

  rawdisk = {
    :source         => nil, # Google Cloud Storage URL pointing to the disk image. (e.g. http://storage.googleapis.com/test/test.tar.gz)
    :container_type => "TAR"
  }

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

  img = connection.images.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

55 entries across 55 versions & 2 rubygems

Version Path
fog-google-1.24.1 examples/image_create.rb
fog-google-1.24.0 examples/image_create.rb
fog-google-1.23.0 examples/image_create.rb
fog-google-1.22.0 examples/image_create.rb
fog-google-1.21.1 examples/image_create.rb
fog-google-1.21.0 examples/image_create.rb
fog-google-1.20.0 examples/image_create.rb
fog-google-1.19.0 examples/image_create.rb
fog-google-1.18.0 examples/image_create.rb
fog-google-1.17.0 examples/image_create.rb
fog-google-1.16.1 examples/image_create.rb
fog-google-1.16.0 examples/image_create.rb
fog-google-1.15.0 examples/image_create.rb
fog-google-1.14.0 examples/image_create.rb
gitlab-fog-google-1.14.0 examples/image_create.rb
fog-google-1.13.0 examples/image_create.rb
gitlab-fog-google-1.13.0 examples/image_create.rb
fog-google-1.12.1 examples/image_create.rb
fog-google-1.12.0 examples/image_create.rb
fog-google-1.11.0 examples/image_create.rb