INNER CODE UNIT · Python

reset_servicemanager_configuration

oracle/docker-images · OracleGoldenGate/21c/bin/deployment-init.py:117

def reset_servicemanager_configuration():
    """Reset the network configuration for the Service Manager to listen on and accept connections from the service host address only"""
    configFileName = os.path.join(get_deployment_directory(['ServiceManager', 'var', 'lib', 'conf']), 'ServiceManager-config.dat')
    with open(configFileName, 'r') as config:
        configData = json.load(config)

    if configData:
        configData['config']['network'] = get_network_config(service_ports['ServiceManager'])
        configContent = json.dumps(configData, sort_keys=True, indent=4)
        config = os.open(configFileName, os.O_WRONLY|os.O_TRUNC, 0o660)
        os.write(config, configContent.encode('utf-8'))
        os.close(config)


def get_digest_authentication():
    """Retrieve an authentication method for making a request"""
    userName, credential = get_admin_credentials()
    return requests.auth.HTTPDigestAuth(userName, credential)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…