Class: ForemanPuppet::ConfigGroup
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ForemanPuppet::ConfigGroup
- Includes:
- Authorizable, Parameterizable::ByIdName
- Defined in:
- app/models/foreman_puppet/config_group.rb
Instance Method Summary collapse
- #available_puppetclasses ⇒ Object
- #hostgroups_count ⇒ Object
- #hosts_count ⇒ Object
-
#to_label ⇒ Object
for auditing.
Instance Method Details
#available_puppetclasses ⇒ Object
28 29 30 |
# File 'app/models/foreman_puppet/config_group.rb', line 28 def available_puppetclasses Puppetclass.where(nil) end |
#hostgroups_count ⇒ Object
41 42 43 |
# File 'app/models/foreman_puppet/config_group.rb', line 41 def hostgroups_count ::Hostgroup..search_for(%(config_group="#{name}")).size end |
#hosts_count ⇒ Object
37 38 39 |
# File 'app/models/foreman_puppet/config_group.rb', line 37 def hosts_count ::Host::Managed..search_for(%(config_group="#{name}")).size end |
#to_label ⇒ Object
for auditing
33 34 35 |
# File 'app/models/foreman_puppet/config_group.rb', line 33 def to_label name end |