Python3 support

In order to achieve py3-first goals, upgrading code base that will be
compatible with py3 as well as py2.

Change-Id: I562c63c576cc2f5dc5d93b5ec6741152e1f80466
This commit is contained in:
dharmendra
2019-02-25 15:11:47 +00:00
parent cf63a074d2
commit 9cfab81c2c
17 changed files with 87 additions and 72 deletions

View File

@@ -74,7 +74,7 @@ class AlarmReceiver(wsgi.Middleware):
# Update policy and action
body_dict['trigger']['policy_name'] = info[4]
body_dict['trigger']['action_name'] = info[5]
req.body = jsonutils.dumps(body_dict)
req.body = jsonutils.dump_as_bytes(body_dict)
LOG.debug('Body alarm: %s', req.body)
# Need to change url because of mandatory
req.environ['PATH_INFO'] = prefix + 'triggers'