foreman-digitalocean/app/models/foreman_digitalocean/concerns/host_managed_extensions.rb @ ab3d6fb4
ab3d6fb4 | Daniel Lobato | module ForemanDigitalocean
|
|
module Concerns
|
|||
module HostManagedExtensions
|
|||
extend ActiveSupport::Concern
|
|||
included do
|
|||
# Rails 4 does not provide dynamic finders for delegated methods and
|
|||
# the SSH orchestrate compute method uses them.
|
|||
def self.find_by_ip(ip)
|
|||
nic = Nic::Base.find_by_ip(ip)
|
|||
nic.host if nic.present?
|
|||
end
|
|||
end
|
|||
end
|
|||
end
|
|||
end
|