diff options
author | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2018-09-07 07:47:52 -0700 |
---|---|---|
committer | Dileep Ranganathan <dileep.ranganathan@intel.com> | 2018-09-07 07:47:52 -0700 |
commit | 34aa9a8c6153e9d0ccf757f91783077cc257556e (patch) | |
tree | 50eb6a074e6602013efa8a7b44e5dacc2ffa42ad /conductor | |
parent | b3c8241bfeebac1a7e1fd99091e89fab514973c2 (diff) |
Revert the authorization header
Reverting the authorization header to support older version of MUSIC.
Change-Id: Ia3a653559fd1838d530e8dfd4576b1da3502ca22
Issue-ID: OPTFRA-259
Signed-off-by: Dileep Ranganathan <dileep.ranganathan@intel.com>
Diffstat (limited to 'conductor')
-rw-r--r-- | conductor/conductor/common/music/api.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/conductor/conductor/common/music/api.py b/conductor/conductor/common/music/api.py index 2eeab3d..2517b8c 100644 --- a/conductor/conductor/common/music/api.py +++ b/conductor/conductor/common/music/api.py @@ -129,12 +129,18 @@ class MusicAPI(object): self.rest = rest.REST(**kwargs) if(CONF.music_api.music_new_version): + MUSIC_version = CONF.music_api.music_version.split(".") + self.rest.session.headers['content-type'] = 'application/json' + self.rest.session.headers['X-patchVersion'] = MUSIC_version[2] self.rest.session.headers['ns'] = CONF.music_api.aafns - auth_str = 'Basic {}'.format(base64.encodestring( - '{}:{}'.format(CONF.music_api.aafuser, - CONF.music_api.aafpass)).strip()) - self.rest.session.headers['Authorization'] = auth_str + # auth_str = 'Basic {}'.format(base64.encodestring( + # '{}:{}'.format(CONF.music_api.aafuser, + # CONF.music_api.aafpass)).strip()) + # self.rest.session.headers['Authorization'] = auth_str + + self.rest.session.headers['userId'] = CONF.music_api.aafuser + self.rest.session.headers['password'] = CONF.music_api.aafpass self.lock_ids = {} |