Class: ForemanNetbox::NetboxFacet
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- ForemanNetbox::NetboxFacet
- Includes:
- Facets::Base
- Defined in:
- app/models/foreman_netbox/netbox_facet.rb
Constant Summary collapse
- COMMON_PARAMS =
%i[interfaces ip_addresses tenant].freeze
- DEVICE_PARAMS =
%i[device device_role device_type manufacturer site].freeze
- VIRTUAL_MACHINE_PARAMS =
%i[virtual_machine cluster cluster_type].freeze
Instance Method Summary collapse
- #cached_netbox_params ⇒ Object
- #netbox_params ⇒ Object
- #netbox_params_diff ⇒ Object
- #netbox_will_change? ⇒ Boolean
- #synchronization_success? ⇒ Boolean
Instance Method Details
#cached_netbox_params ⇒ Object
22 23 24 |
# File 'app/models/foreman_netbox/netbox_facet.rb', line 22 def cached_netbox_params ForemanNetbox::CachedNetboxParameters.call(host) end |
#netbox_params ⇒ Object
18 19 20 |
# File 'app/models/foreman_netbox/netbox_facet.rb', line 18 def netbox_params ForemanNetbox::NetboxParameters.call(host) end |
#netbox_params_diff ⇒ Object
26 27 28 |
# File 'app/models/foreman_netbox/netbox_facet.rb', line 26 def netbox_params_diff ForemanNetbox::NetboxParametersComparator.call(cached_netbox_params, netbox_params) end |
#netbox_will_change? ⇒ Boolean
30 31 32 |
# File 'app/models/foreman_netbox/netbox_facet.rb', line 30 def netbox_will_change? netbox_params_diff.keys.any? end |
#synchronization_success? ⇒ Boolean
14 15 16 |
# File 'app/models/foreman_netbox/netbox_facet.rb', line 14 def synchronization_success? !synchronization_error end |