INNER CODE UNIT · Python
set_service_config
oracle/docker-images · OracleGoldenGate/21c/bin/deployment-init.py:162
def set_service_config(deploymentName, serviceName, config):
"""Sets the configuration of a service in Service Manager and restart the service"""
url = 'http://' + service_address + ':' + str(service_ports['ServiceManager']) + '/services/v2/deployments/' + deploymentName + '/services/' + serviceName
body = {
'config': config,
'status': 'restart'
}
response = get_requests_session().patch(url, headers=rest_call_headers, auth=get_digest_authentication(), json=body)
if response.status_code == 200:
response_json = response.json()
if 'response' in response_json:
return response_json['response']
return None
def reset_service_configuration(deploymentName, serviceName):
"""Reset the network configuration for a service to listen on and accept connections from the service host address only"""
config = get_service_config(deploymentName, serviceName)