Class: ForemanNetbox::SyncHost::SyncDevice::SyncDeviceRole::Find
- Inherits:
-
Object
- Object
- ForemanNetbox::SyncHost::SyncDevice::SyncDeviceRole::Find
- Includes:
- Interactor
- Defined in:
- app/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/find.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
10 11 12 13 14 15 |
# File 'app/interactors/foreman_netbox/sync_host/sync_device/sync_device_role/find.rb', line 10 def call context.device_role = ForemanNetbox::API.client.dcim.device_roles.find_by(params) 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 |