Class: ForemanDatacenter::Platform

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Authorizable, ScopedSearchExtensions
Defined in:
app/models/foreman_datacenter/platform.rb

Constant Summary collapse

RPC_CLIENTS =
[
    'Juniper Junos (NETCONF)',
    'Cisco IOS (SSH)',
    'Opengear (SSH)'
].freeze

Instance Method Summary collapse

Instance Method Details

#devices_countObject



24
25
26
27
28
# File 'app/models/foreman_datacenter/platform.rb', line 24

def devices_count
  @devices_count ||= self.class.where(id: id).
      joins(:devices).
      count
end