def testStartCluster_NoExternalIp(self):
    parent_mock = self._SetUpMocksForClusterStart()

    GceCluster(argparse.Namespace(
        project='project-hoge', bucket='bucket-fuga',
        machinetype='', image='', zone='us-central2-a', num_workers=2,
        command='', external_ip='master')).StartCluster()

    # Just check parameters of CreateInstance.
    # Master instance.
    call = parent_mock.method_calls[10]
    self.assertEqual('CreateInstance', call[0])
    self.assertEqual('hm', call[1][0])
    self.assertTrue(call[2]['external_ip'])
    self.assertTrue(call[2]['can_ip_forward'])

    # Worker 000.
    call = parent_mock.method_calls[19]
    self.assertEqual('CreateInstance', call[0])
    self.assertEqual('hw-000', call[1][0])
    self.assertFalse(call[2]['external_ip'])
    self.assertFalse(call[2]['can_ip_forward'])

    # Worker 001.
    call = parent_mock.method_calls[26]
    self.assertEqual('CreateInstance', call[0])
    self.assertEqual('hw-001', call[1][0])
    self.assertFalse(call[2]['external_ip'])
    self.assertFalse(call[2]['can_ip_forward'])
getpeername() -> address info
dataset/ETHPy150Open GoogleCloudPlatform/solutions-google-compute-engine-cluster-for-hadoop/gce_cluster_test.py/GceClusterTest.testStartCluster_NoExternalIp--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/httplib2/httplib2/socks.py/socksocket.getpeername