Sha256: 26ba7653a916fef179032610aef029bae87ce0640b08cbf0c05573316b44ac42

Contents?: true

Size: 993 Bytes

Versions: 39

Compression:

Stored size: 993 Bytes

Contents

module Fog
  module Compute
    class Google

      class Mock

        def get_zone(zone_name)
          zone = self.data[:zones][zone_name] || {
            "error" => {
              "errors" => [
               {
                "domain" => "global",
                "reason" => "notFound",
                "message" => "The resource 'projects/#{project}/zones/#{zone_name}' was not found"
               }
              ],
              "code" => 404,
              "message" => "The resource 'projects/#{project}/zones/#{zone_name}' was not found"
            }
          }
          build_response(:body => zone)
        end

      end

      class Real

        def get_zone(zone_name)
          api_method = @compute.zones.get
          parameters = {
            'project' => @project,
            'zone' => zone_name
          }

          result = self.build_result(api_method, parameters)
          response = self.build_response(result)
        end

      end

    end
  end
end

Version data entries

39 entries across 39 versions & 2 rubygems

Version Path
fog-maestrodev-1.18.0.20131209090811 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/google/requests/compute/get_zone.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/google/requests/compute/get_zone.rb
fog-1.18.0 lib/fog/google/requests/compute/get_zone.rb
fog-1.17.0 lib/fog/google/requests/compute/get_zone.rb
fog-1.16.0 lib/fog/google/requests/compute/get_zone.rb