From ff8ef3ea8a98e14007ee323abdb16c70b527f6de Mon Sep 17 00:00:00 2001 From: Eric MacDonald Date: Wed, 30 Jan 2019 11:41:08 -0500 Subject: [PATCH] Change Mtce token endpoint lookup to be 'platform'. The maintenance token request's response parser is looking for nova compute endpoint as a day one implementation when mtce actually managed nova. That is long since changed but this endpoint lookup remained. In the new containterized environment the nova compute endpoint is not always present and when its not mtce fails to get its token. Since mtce needs the token for communication with sysinv this update changes the endpoint lookup type to 'platform' to match that of sysinv. Change-Id: I389b64d345e47f7d7bc062671da7c7cc51ac398f Story: 2004695 Task: 29213 Signed-off-by: Eric MacDonald --- mtce-common/centos/build_srpm.data | 2 +- mtce-common/src/common/jsonUtil.cpp | 2 +- mtce-common/src/common/jsonUtil.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mtce-common/centos/build_srpm.data b/mtce-common/centos/build_srpm.data index d872dde9..01e786b1 100644 --- a/mtce-common/centos/build_srpm.data +++ b/mtce-common/centos/build_srpm.data @@ -1,3 +1,3 @@ SRC_DIR="src" -TIS_PATCH_VER=141 +TIS_PATCH_VER=142 BUILD_IS_SLOW=5 diff --git a/mtce-common/src/common/jsonUtil.cpp b/mtce-common/src/common/jsonUtil.cpp index cb8d6536..aafc20c9 100644 --- a/mtce-common/src/common/jsonUtil.cpp +++ b/mtce-common/src/common/jsonUtil.cpp @@ -847,7 +847,7 @@ int jsonApi_auth_load ( string & hostname, { tuple_obj = _json_object_array_get_idx (svccat_obj, i); entity = _json_get_key_value_string ( tuple_obj, MTC_JSON_AUTH_TYPE ); - if ( entity == MTC_JSON_AUTH_COMP ) + if ( entity == MTC_JSON_AUTH_PLATFORM) { found_type = true ; break ; diff --git a/mtce-common/src/common/jsonUtil.h b/mtce-common/src/common/jsonUtil.h index 79be85a4..1786df3c 100644 --- a/mtce-common/src/common/jsonUtil.h +++ b/mtce-common/src/common/jsonUtil.h @@ -40,7 +40,7 @@ typedef struct #define MTC_JSON_AUTH_ISSUE "issued_at" #define MTC_JSON_AUTH_EXPIRE "expires_at" #define MTC_JSON_AUTH_ID "X-Subject-Token" -#define MTC_JSON_AUTH_COMP "compute" +#define MTC_JSON_AUTH_PLATFORM "platform" #define MTC_JSON_AUTH_INTERFACE "interface" /** looking for admin */ #define MTC_JSON_AUTH_ADMIN "admin"