Module: ForemanNetbox::HostExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/foreman_netbox/host_extensions.rb

Instance Method Summary collapse

Instance Method Details

#delete_from_netboxObject



23
24
25
# File 'app/models/concerns/foreman_netbox/host_extensions.rb', line 23

def delete_from_netbox
  ForemanNetbox::DeleteHost::Organizer.call(host: self)
end

#netbox_facetObject



11
12
13
# File 'app/models/concerns/foreman_netbox/host_extensions.rb', line 11

def netbox_facet
  @netbox_facet ||= super || ForemanNetbox::NetboxFacet.new(host: self)
end

#push_to_netboxObject



19
20
21
# File 'app/models/concerns/foreman_netbox/host_extensions.rb', line 19

def push_to_netbox
  ForemanNetbox::SyncHost::Organizer.call(host: self)
end

#push_to_netbox_asyncObject



15
16
17
# File 'app/models/concerns/foreman_netbox/host_extensions.rb', line 15

def push_to_netbox_async
  ForemanNetbox::SyncHostJob.perform_later(id)
end