Class: ForemanNetbox::SyncHost::SyncDevice::SyncInterfaces::Delete
- Inherits:
-
Object
- Object
- ForemanNetbox::SyncHost::SyncDevice::SyncInterfaces::Delete
- Includes:
- Interactor
- Defined in:
- app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/delete.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/delete.rb', line 14 def call context.interfaces .reject { |netbox_interface| interfaces_names.include?(netbox_interface.name) } .each(&:delete) 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 |