Mtce calls sm rest api with keystone authentication

As a part of changes to make sm-api independent, calling sm-api
requires keystone authentication.
This change is to enable mtce to call sm rest api with keystone
authentication.

Story: 2002827
Task: 22744

Change-Id: If3b58d3e36b9bd7fd88829d61e9c1daa00ab5048
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
Bin Qian 2018-06-29 14:09:55 -04:00
parent 3879fe15d6
commit b4f8ef606c
1 changed files with 2 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2016 Wind River Systems, Inc.
* Copyright (c) 2013-2018 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
@ -775,11 +775,6 @@ int mtcHttpUtil_api_request ( libEvent & event )
hdr_entry++;
if (( event.request != KEYSTONE_TOKEN ) &&
( event.request != SMGR_QUERY_SWACT ) &&
( event.request != SMGR_START_SWACT ) &&
( event.request != SMGR_HOST_LOCKED ) &&
( event.request != SMGR_HOST_UNLOCKED ) &&
( event.request != SMGR_HOST_DISABLED ) &&
( event.request != VIM_HOST_DISABLED ) &&
( event.request != VIM_HOST_ENABLED ) &&
( event.request != VIM_HOST_OFFLINE ) &&
@ -787,8 +782,7 @@ int mtcHttpUtil_api_request ( libEvent & event )
( event.request != VIM_DPORT_OFFLINE ) &&
( event.request != VIM_DPORT_FAILED ) &&
( event.request != VIM_DPORT_CLEARED ) &&
( event.request != VIM_DPORT_DEGRADED ) &&
( event.request != SMGR_HOST_ENABLED ))
( event.request != VIM_DPORT_DEGRADED ))
{
hdrs.entry[hdr_entry].key = "X-Auth-Token" ;
hdrs.entry[hdr_entry].value = tokenUtil_get_ptr()->token ;