Class: ForemanNetbox::SyncHost::SyncTenant::Find
- Inherits:
-
Object
- Object
- ForemanNetbox::SyncHost::SyncTenant::Find
- Includes:
- Interactor
- Defined in:
- app/interactors/foreman_netbox/sync_host/sync_tenant/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_tenant/find.rb', line 9 def call context.tenant = ForemanNetbox::API.client.tenancy.tenants.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 |