Skip to content

Commit

Permalink
Make internal EventTargetParser methods private
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Nov 20, 2024
1 parent 7eec25f commit a8f99ca
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 a8f99ca

Please sign in to comment.