The deploy-precheck script uses GET request to get release list
using software endpoint. This GET request is timed out when
deploy-precheck is invoked using software internal APIs. This is
because, unlike public APIs, there is no alternative process to
handle slow requests like deploy-precheck.
This review removes GET access to software endpoints from
deploy-precheck by directly passing releases info as argument.
Also optimized code to remove multiple token creation because
of multiple init from HealthCheck and its derived class.
Test Plan:
PASS: Verify internal api for upgrade and patch deploy-precheck
PASS: Verify external api for upgrade and patch deploy-precheck
Closes-Bug: 2067245
Story: 2010676
Task: 50194
Change-Id: I4bdba84894ca7866e2095e56c95dc5eaaad70b0a
Signed-off-by: Joseph Vazhappilly <joseph.vazhappillypaily@windriver.com>