Class: ForemanNetbox::SyncHost::SyncVirtualMachine::Find
- Inherits:
-
Object
- Object
- ForemanNetbox::SyncHost::SyncVirtualMachine::Find
- Includes:
- Interactor
- Defined in:
- app/interactors/foreman_netbox/sync_host/sync_virtual_machine/find.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
9 10 11 12 13 14 |
# File 'app/interactors/foreman_netbox/sync_host/sync_virtual_machine/find.rb', line 9 def call context.virtual_machine = find_by_mac || find_by_name rescue NetboxClientRuby::LocalError, NetboxClientRuby::ClientError, NetboxClientRuby::RemoteError => e ::Foreman::Logging.logger('foreman_netbox/import').error("#{self.class} error #{e}: #{e.backtrace}") context.fail!(error: "#{self.class}: #{e}") end |