Code Review
/
vfc
/
gvnfm
/
vnflcm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add headers to notification request of vnflcm
[vfc/gvnfm/vnflcm.git]
/
lcm
/
lcm
/
pub
/
utils
/
notificationsutil.py
diff --git
a/lcm/lcm/pub/utils/notificationsutil.py
b/lcm/lcm/pub/utils/notificationsutil.py
index
8a38fd6
..
fe0b640
100644
(file)
--- a/
lcm/lcm/pub/utils/notificationsutil.py
+++ b/
lcm/lcm/pub/utils/notificationsutil.py
@@
-61,7
+61,7
@@
class NotificationsUtil(object):
}
callbackUri = subscription.callback_uri
auth_info = json.loads(subscription.auth_info)
}
callbackUri = subscription.callback_uri
auth_info = json.loads(subscription.auth_info)
- if
auth_info["authType"] != const.OAUTH2_CLIENT_CREDENTIALS
:
+ if
const.BASIC in auth_info["authType"]
:
try:
self.post_notification(callbackUri, auth_info, notification)
except Exception as e:
try:
self.post_notification(callbackUri, auth_info, notification)
except Exception as e:
@@
-75,6
+75,7
@@
class NotificationsUtil(object):
resp = requests.post(
callbackUri,
data=notification,
resp = requests.post(
callbackUri,
data=notification,
+ headers={'content-type': 'application/json'},
auth=HTTPBasicAuth(username, password)
)
if resp.status_code != status.HTTP_204_NO_CONTENT:
auth=HTTPBasicAuth(username, password)
)
if resp.status_code != status.HTTP_204_NO_CONTENT: