Skip to content
This repository has been archived by the owner on Dec 4, 2024. It is now read-only.

mlb: fix event stream subscription params #643

Merged
merged 1 commit into from
Jul 24, 2019
Merged
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
11 changes: 8 additions & 3 deletions marathon_lb.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,15 @@ def tasks(self):

def get_event_stream(self, events):
self.current_host = self.host
url = self.current_host + "/v2/events"
params = {
'plan-format': 'light'
}
if events:
url += "?" + urllib.parse.urlencode({'event_type': events},
doseq=True)
params['event_type'] = events

url_params = urllib.parse.urlencode(params, doseq=True)
url = '{}/v2/events?{}'.format(self.current_host, url_params)

return CurlHttpEventStream(url, self.__auth, self.__verify)

def iter_events(self, stream):
Expand Down