INNER CODE UNIT · Python
get_digest_authentication
oracle/docker-images · OracleGoldenGate/21c/bin/deployment-init.py:131
def get_digest_authentication():
"""Retrieve an authentication method for making a request"""
userName, credential = get_admin_credentials()
return requests.auth.HTTPDigestAuth(userName, credential)
def get_ogg_version():
"""Retrieve the version of the Oracle GoldenGate installation"""
url = 'http://' + service_address + ':' + str(service_ports['ServiceManager']) + '/services/v2/config/summary'
response = get_requests_session().get(url, headers=rest_call_headers, auth=get_digest_authentication())
if response.status_code == 200:
response_json = response.json()
if 'response' in response_json and \
'build' in response_json['response'] and \
'version' in response_json['response']['build']:
return response_json['response']['build']['version']
return None