This file is indexed.

/usr/lib/ruby/vendor_ruby/fog/compute/ecloud/models/compute_pool.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
module Fog
  module Compute
    class Ecloud
      class ComputePool < Fog::Ecloud::Model
        identity :href

        attribute :href,         :aliases => :Href
        attribute :name,         :aliases => :Name
        attribute :type,         :aliases => :Type
        attribute :other_links,  :aliases => :Links, :squash => :Link
        attribute :all_servers,  :aliases => :VirtualMachines
        attribute :purchased,    :aliases => :Purchased
        attribute :cpu_burst,    :aliases => :CpuBurst
        attribute :memory_burst, :aliases => :MemoryBurst

        def servers
          @servers ||= Fog::Compute::Ecloud::Servers.new( :service => service, :href => "#{service.base_path}/virtualMachines/computePools/#{id}" )
        end

        def layout
          @layout ||= Fog::Compute::Ecloud::Layouts.new(:service => service, :href => "#{service.base_path}/layout/computePools/#{id}").first
        end

        def cpu_usage
          # time ? query = "/details?time=#{Time.parse(time).utc.strftime("%Y-%m-%dT%H:%M:%SZ")}" : query = ""
          @cpu_usage ||= Fog::Compute::Ecloud::CpuUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/cpu")
        end

        def memory_usage
          # time ? query = "/details?time=#{Time.parse(time).utc.strftime("%Y-%m-%dT%H:%M:%SZ")}" : query = ""
          @memory_usage ||= Fog::Compute::Ecloud::MemoryUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/memory")
        end

        def storage_usage
          @storage_usage ||= Fog::Compute::Ecloud::StorageUsageDetailSummary.new(:service => service, :href => "#{service.base_path}/computePools/#{id}/usage/storage")
        end

        def operating_system_families
          @operating_system_families ||= Fog::Compute::Ecloud::OperatingSystemFamilies.new(:service => service, :href => "#{service.base_path}/operatingSystemFamilies/computePools/#{id}")
        end

        def templates
          @templates ||= self.service.templates(:href => "#{service.base_path}/templates/computePools/#{id}")
        end

        def detached_disks
          @detached_disks ||= self.service.detached_disks(:href => "#{service.base_path}/detacheddisks/computepools/#{id}")
        end

        def environment
          @environment ||= begin
                             reload unless other_links
                             environment_link = other_links.find{|l| l[:type] == "application/vnd.tmrk.cloud.environment"}
                             self.service.environments.get(environment_link[:href])
                           end
        end

        def edit(options)
          options[:uri] = href
          data = service.compute_pool_edit(options).body
          pool = collection.from_data(data)
        end

        def id
          href.scan(/\d+/)[0]
        end
      end
    end
  end
end