Sha256: 67983fb950f3d3c1669c430da853ca404f6d049f683180f36b26aa47934cbc86

Contents?: true

Size: 730 Bytes

Versions: 14

Compression:

Stored size: 730 Bytes

Contents

module Fog
  module Compute
    class Google
      class Mock
        def set_common_instance_metadata(_identity, _current_fingerprint, _metadata = {})
          Fog::Mock.not_implemented
        end
      end

      class Real
        def set_common_instance_metadata(identity, current_fingerprint, metadata = {})
          api_method = @compute.projects.set_common_instance_metadata
          parameters = {
            :project => identity
          }
          body_object = {
            :fingerprint => current_fingerprint,
            :items => Array(metadata).map { |pair| { :key => pair[0], :value => pair[1] } }
          }

          request(api_method, parameters, body_object)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.5 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.4 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.3 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.2 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.1 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.5.0 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.4.2 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.4.1 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.4.0 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.3.2 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.3.1 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.3.0 lib/fog/compute/google/requests/set_common_instance_metadata.rb
fog-google-0.2.0 lib/fog/compute/google/requests/set_common_instance_metadata.rb