This file is indexed.

/usr/lib/ruby/vendor_ruby/fog/compute/ecloud/requests/virtual_machine_copy_identical.rb is in ruby-fog-ecloud 0.1.1-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 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
39
40
41
42
43
module Fog
  module Compute
    class Ecloud
      module Shared
        def validate_create_server_options_identical(template_uri, options)
          required_opts = [:name, :row, :group, :source]
          unless required_opts.all? { |opt| options.key?(opt) }
            raise ArgumentError.new("Required data missing: #{(required_opts - options.keys).map(&:inspect).join(", ")}")
          end

          options
        end

        def build_request_body_identical(options)
          xml = Builder::XmlMarkup.new
          xml.CopyIdenticalVirtualMachine(:name => options[:name]) do
            xml.Source(:href => options[:source], :type => "application/vnd.tmrk.cloud.virtualMachine")
            xml.Layout do
              xml.NewRow options[:row]
              xml.NewGroup options[:group]
            end
            xml.Description options[:description]
          end
        end
      end

      class Real
        def virtual_machine_copy_identical(template_uri, options)
          options = validate_create_server_options_identical(template_uri, options)
          body = build_request_body_identical(options)
          request(
            :expects => 201,
            :method => "POST",
            :headers => {},
            :body => body,
            :uri => template_uri,
            :parse => true
          )
        end
      end
    end
  end
end