File: attach_disk.rb

package info (click to toggle)
ruby-fog-google 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,568 kB
  • sloc: ruby: 16,711; sh: 40; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 494 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
module Fog
  module Compute
    class Google
      class Mock
        def attach_disk(_instance, _zone, _disk = {})
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        def attach_disk(instance, zone, disk = {})
          @compute.attach_disk(
            @project, zone.split("/")[-1], instance,
            ::Google::Apis::ComputeV1::AttachedDisk.new(disk)
          )
        end
      end
    end
  end
end