Skip to content

Commit

Permalink
adding scan action with userid to miq_schedule
Browse files Browse the repository at this point in the history
propagate userid

appease linter

adding userid param to EmsCluster#scan and ContainerImage#scan
  • Loading branch information
nimrodshn committed Apr 10, 2018
1 parent cd1068f commit d84be1c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/models/container_image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ def display_registry
container_image_registry.present? ? container_image_registry.full_name : _("Unknown image source")
end

def scan
ext_management_system.scan_job_create(self)
def scan(userid = "system")
ext_management_system.scan_job_create(self, userid)
end

def perform_metadata_scan(ost)
Expand Down
2 changes: 1 addition & 1 deletion app/models/ems_cluster.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def ems_events
EmsEvent.where(ewc).order("timestamp").to_a
end

def scan
def scan(userid = "system")
MiqQueue.submit_job(
:service => "smartstate",
:affinity => ext_management_system,
Expand Down
2 changes: 1 addition & 1 deletion app/models/miq_schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def action_vm_scan(obj, _at)

def action_scan(obj, _at)
sched_action[:options] ||= {}
obj.scan
obj.scan(userid)
_log.info("Action [#{name}] has been run for target type: [#{obj.class}] with name: [#{obj.name}]")
end

Expand Down

0 comments on commit d84be1c

Please sign in to comment.