Class: ForemanDatacenter::DeviceType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ForemanDatacenter::DeviceType
- Defined in:
- app/models/foreman_datacenter/device_type.rb
Constant Summary collapse
- SUBDEVICE_ROLES =
['None', 'Parent', 'Child'].freeze
Instance Method Summary collapse
Instance Method Details
#child? ⇒ Boolean
31 32 33 |
# File 'app/models/foreman_datacenter/device_type.rb', line 31 def child? subdevice_role == 'Child' end |
#management_interfaces ⇒ Object
39 40 41 |
# File 'app/models/foreman_datacenter/device_type.rb', line 39 def management_interfaces interface_templates.select(&:mgmt_only) end |
#network_interfaces ⇒ Object
35 36 37 |
# File 'app/models/foreman_datacenter/device_type.rb', line 35 def network_interfaces interface_templates.reject(&:mgmt_only) end |
#parent? ⇒ Boolean
27 28 29 |
# File 'app/models/foreman_datacenter/device_type.rb', line 27 def parent? subdevice_role == 'Parent' end |