Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding scan action with userid to container_image #17264

Merged
merged 1 commit into from
Apr 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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