summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric MacDonald <eric.macdonald@windriver.com>2019-01-30 11:41:08 -0500
committerEric MacDonald <eric.macdonald@windriver.com>2019-01-30 12:55:55 -0500
commitff8ef3ea8a98e14007ee323abdb16c70b527f6de (patch)
tree035e7575ed07df1899986192e3f3d46e1d3393f3
parent9ececd76235baf59d400b518e9323a91c4b681eb (diff)
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 <eric.macdonald@windriver.com>
Notes
Notes (review): Code-Review+2: Don Penney <don.penney@windriver.com> Code-Review+2: Tao Liu <tao.liu@windriver.com> Workflow+1: Tao Liu <tao.liu@windriver.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 30 Jan 2019 19:09:18 +0000 Reviewed-on: https://review.openstack.org/634018 Project: openstack/stx-metal Branch: refs/heads/master
-rw-r--r--mtce-common/centos/build_srpm.data2
-rw-r--r--mtce-common/src/common/jsonUtil.cpp2
-rw-r--r--mtce-common/src/common/jsonUtil.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/mtce-common/centos/build_srpm.data b/mtce-common/centos/build_srpm.data
index d872dde..01e786b 100644
--- a/mtce-common/centos/build_srpm.data
+++ b/mtce-common/centos/build_srpm.data
@@ -1,3 +1,3 @@
1SRC_DIR="src" 1SRC_DIR="src"
2TIS_PATCH_VER=141 2TIS_PATCH_VER=142
3BUILD_IS_SLOW=5 3BUILD_IS_SLOW=5
diff --git a/mtce-common/src/common/jsonUtil.cpp b/mtce-common/src/common/jsonUtil.cpp
index cb8d653..aafc20c 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,
847 { 847 {
848 tuple_obj = _json_object_array_get_idx (svccat_obj, i); 848 tuple_obj = _json_object_array_get_idx (svccat_obj, i);
849 entity = _json_get_key_value_string ( tuple_obj, MTC_JSON_AUTH_TYPE ); 849 entity = _json_get_key_value_string ( tuple_obj, MTC_JSON_AUTH_TYPE );
850 if ( entity == MTC_JSON_AUTH_COMP ) 850 if ( entity == MTC_JSON_AUTH_PLATFORM)
851 { 851 {
852 found_type = true ; 852 found_type = true ;
853 break ; 853 break ;
diff --git a/mtce-common/src/common/jsonUtil.h b/mtce-common/src/common/jsonUtil.h
index 79be85a..1786df3 100644
--- a/mtce-common/src/common/jsonUtil.h
+++ b/mtce-common/src/common/jsonUtil.h
@@ -40,7 +40,7 @@ typedef struct
40#define MTC_JSON_AUTH_ISSUE "issued_at" 40#define MTC_JSON_AUTH_ISSUE "issued_at"
41#define MTC_JSON_AUTH_EXPIRE "expires_at" 41#define MTC_JSON_AUTH_EXPIRE "expires_at"
42#define MTC_JSON_AUTH_ID "X-Subject-Token" 42#define MTC_JSON_AUTH_ID "X-Subject-Token"
43#define MTC_JSON_AUTH_COMP "compute" 43#define MTC_JSON_AUTH_PLATFORM "platform"
44#define MTC_JSON_AUTH_INTERFACE "interface" /** looking for admin */ 44#define MTC_JSON_AUTH_INTERFACE "interface" /** looking for admin */
45#define MTC_JSON_AUTH_ADMIN "admin" 45#define MTC_JSON_AUTH_ADMIN "admin"
46 46