Skip to content

Commit

Permalink
Merge pull request #165 from agrare/event_target_parser_private_methods
Browse files Browse the repository at this point in the history
Make internal EventTargetParser methods private
  • Loading branch information
Fryguy authored Nov 20, 2024
2 parents 7eec25f + a8f99ca commit 12ae768
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,6 @@ def initialize(ems_event)
@ems_event = ems_event
end

def elem(url)
uri = URI(url)
tokens = uri.path.split('/')
elems = {
:type => tokens[-2],
:uuid => tokens[-1]
}
if tokens.length >= 4 && tokens[-4] == "ManagedSystem"
elems[:manager_uuid] = tokens[-3]
end
elems
end

def parse
target_collection = InventoryRefresh::TargetCollection.new(
:manager => ems_event.ext_management_system,
Expand Down Expand Up @@ -74,6 +61,21 @@ def parse
target_collection.targets
end

private

def elem(url)
uri = URI(url)
tokens = uri.path.split('/')
elems = {
:type => tokens[-2],
:uuid => tokens[-1]
}
if tokens.length >= 4 && tokens[-4] == "ManagedSystem"
elems[:manager_uuid] = tokens[-3]
end
elems
end

def handle_usertask(usertask)
return [] unless usertask["status"].eql?("Completed")

Expand Down

0 comments on commit 12ae768

Please sign in to comment.