Class: ForemanNetbox::SyncHost::SyncDevice::SyncInterfaces::SyncIpAddresses::Update
- Inherits:
-
Object
- Object
- ForemanNetbox::SyncHost::SyncDevice::SyncInterfaces::SyncIpAddresses::Update
- Includes:
- Concerns::AssignTags, Interactor
- Defined in:
- app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/update.rb
Instance Method Summary collapse
Methods included from Concerns::AssignTags
#assign_tags_to, #default_tag_ids
Instance Method Details
#call ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'app/interactors/foreman_netbox/sync_host/sync_device/sync_interfaces/sync_ip_addresses/update.rb', line 12 def call context.ip_addresses.each do |ip_address| (ip_address) ip_address.save end 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 |