def get_configuration(options):
 agent_config = options[u'agent-config']
 configuration = yaml.safe_load(agent_config.getContent())
 validate_configuration(configuration=configuration)
 configuration['control-service'].setdefault('port', 4524)
 path = agent_config.parent()
 configuration['ca-certificate'] = Certificate.loadPEM(path.child('cluster.crt').getContent())
 configuration['node-credential'] = NodeCredential.from_path(path, 'node')
 return configuration

def get_configuration ( options ) : agent_config = options [ u'agent-config' ] configuration = yaml . safe_load ( agent_config . getContent ( ) ) validate_configuration ( configuration = configuration ) configuration [ 'control-service' ] . setdefault ( 'port' , 4524 ) path = agent_config . parent ( ) configuration [ 'ca-certificate' ] = Certificate . loadPEM ( path . child ( 'cluster.crt' ) . getContent ( ) ) configuration [ 'node-credential' ] = NodeCredential . from_path ( path , 'node' ) return configuration
get a configuration that can be used to call configure snapshot = get_configuration() configure .