Project

General

Profile

« Previous | Next » 

Revision f4459c11

Added by David Davis about 8 years ago

Refs #3809 - Turning on some rubocop cops

View differences:

app/models/concerns/orchestration/compute.rb
end
def compute?
compute_resource_id.present? && ( compute_attributes.present? || uuid.present? )
compute_resource_id.present? && (compute_attributes.present? || uuid.present?)
end
def compute_object
......
# We need to return fast for user-data, so that we save the host before
# cloud-init finishes, even if the IP is not reachable by Foreman. We do have
# to return a real IP though, or Foreman will fail to save the host.
return vm.ip_addresses.first if ( vm.ip_addresses.present? && self.compute_attributes[:user_data].present? )
return vm.ip_addresses.first if (vm.ip_addresses.present? && self.compute_attributes[:user_data].present?)
# Loop over the addresses waiting for one to come up
ip = nil

Also available in: Unified diff