def _get_test_cluster(reactor):
 control_node = environ.get('FLOCKER_ACCEPTANCE_CONTROL_NODE')
 if (control_node is None):
  raise SkipTest(('Set acceptance testing control node IP address using the ' + 'FLOCKER_ACCEPTANCE_CONTROL_NODE environment variable.'))
 agent_nodes_env_var = environ.get('FLOCKER_ACCEPTANCE_NUM_AGENT_NODES')
 if (agent_nodes_env_var is None):
  raise SkipTest('Set the number of configured acceptance testing nodes using the FLOCKER_ACCEPTANCE_NUM_AGENT_NODES environment variable.')
 num_agent_nodes = int(agent_nodes_env_var)
 certificates_path = FilePath(environ['FLOCKER_ACCEPTANCE_API_CERTIFICATES_PATH'])
 hostname_to_public_address_env_var = environ.get('FLOCKER_ACCEPTANCE_HOSTNAME_TO_PUBLIC_ADDRESS', '{}')
 hostname_to_public_address = json.loads(hostname_to_public_address_env_var)
 return connected_cluster(reactor, control_node, certificates_path, num_agent_nodes, hostname_to_public_address)

def _get_test_cluster ( reactor ) : control_node = environ . get ( 'FLOCKER_ACCEPTANCE_CONTROL_NODE' ) if ( control_node is None ) : raise SkipTest ( ( 'Set acceptance testing control node IP address using the ' + 'FLOCKER_ACCEPTANCE_CONTROL_NODE environment variable.' ) ) agent_nodes_env_var = environ . get ( 'FLOCKER_ACCEPTANCE_NUM_AGENT_NODES' ) if ( agent_nodes_env_var is None ) : raise SkipTest ( 'Set the number of configured acceptance testing nodes using the FLOCKER_ACCEPTANCE_NUM_AGENT_NODES environment variable.' ) num_agent_nodes = int ( agent_nodes_env_var ) certificates_path = FilePath ( environ [ 'FLOCKER_ACCEPTANCE_API_CERTIFICATES_PATH' ] ) hostname_to_public_address_env_var = environ . get ( 'FLOCKER_ACCEPTANCE_HOSTNAME_TO_PUBLIC_ADDRESS' , '{}' ) hostname_to_public_address = json . loads ( hostname_to_public_address_env_var ) return connected_cluster ( reactor , control_node , certificates_path , num_agent_nodes , hostname_to_public_address )
build a cluster instance .