File: get_server_serial_port_output.rb

package info (click to toggle)
ruby-fog-google 1.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,568 kB
  • sloc: ruby: 16,775; makefile: 3
file content (38 lines) | stat: -rw-r--r-- 1,406 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
module Fog
  module Compute
    class Google
      class Mock
        def get_server_serial_port_output(_identity, _zone)
          # :no-coverage:
          Fog::Mock.not_implemented
          # :no-coverage:
        end
      end

      class Real
        # Returns the specified instance's serial port output.
        # @param [String] zone Zone for the given instance
        # @param [String] instance Instance scoping this request.
        # @param [Fixnum] port
        #   Specifies which COM or serial port to retrieve data from.
        #   Acceptable values are 1 to 4, inclusive. (Default: 1)
        # @param [Fixnum] start
        #   Returns output starting from a specific byte position.
        #   Use this to page through output when the output is too large to
        #   return in a single request. For the initial request,
        #   leave this field unspecified. For subsequent calls, this field
        #   should be set to the next value returned in the previous call.
        # @see https://cloud.google.com/compute/docs/reference/latest/instances/getSerialPortOutput
        def get_server_serial_port_output(identity, zone, port: nil, start: nil)
          @compute.get_instance_serial_port_output(
            @project,
            zone.split("/")[-1],
            identity,
            port: port,
            start: start
          )
        end
      end
    end
  end
end