def test_list_nodes(self):
        nodes = self.driver.list_nodes()
        self.assertEqual(len(nodes), 2)
        node = nodes[0]

        self.assertEqual('12065', node.id)

        # test public IPv4
        self.assertTrue('12.16.18.28' in node.public_ips)
        self.assertTrue('50.57.94.35' in node.public_ips)

        # fixed public ip
        self.assertTrue('1.1.1.1' in node.public_ips)

        # floating public ip
        self.assertTrue('2.2.2.2' in node.public_ips)

        # test public IPv6
        self.assertTrue(
            '2001:4801:7808:52:16:3eff:fe47:788a' in node.public_ips)

        # test private IPv4
        self.assertTrue('10.182.64.34' in node.private_ips)

        # fixed private ip
        self.assertTrue('10.3.3.3' in node.private_ips)

        # floating private ip
        self.assertTrue('192.168.3.3' in node.private_ips)
        self.assertTrue('172.16.1.1' in node.private_ips)

        # test private IPv6
        self.assertTrue(
            'fec0:4801:7808:52:16:3eff:fe60:187d' in node.private_ips)

        # test creation date
        self.assertEqual(node.created_at, datetime.datetime(2011, 10, 11, 0, 51, 39, tzinfo=UTC))

        self.assertEqual(node.extra.get('flavorId'), '2')
        self.assertEqual(node.extra.get('imageId'), '7')
        self.assertEqual(node.extra.get('metadata'), {})
        self.assertEqual(node.extra['updated'], '2011-10-11T00:50:04Z')
        self.assertEqual(node.extra['created'], '2011-10-11T00:51:39Z')
        self.assertEqual(node.extra.get('userId'), 'rs-reach')
        self.assertEqual(node.extra.get('hostId'), '912566d83a13fbb357ea'
                                                   '3f13c629363d9f7e1ba3f'
                                                   '925b49f3d2ab725')
        self.assertEqual(node.extra.get('disk_config'), 'AUTO')
        self.assertEqual(node.extra.get('task_state'), 'spawning')
        self.assertEqual(node.extra.get('vm_state'), 'active')
        self.assertEqual(node.extra.get('power_state'), 1)
        self.assertEqual(node.extra.get('progress'), 25)
        self.assertEqual(node.extra.get('fault')['id'], 1234)
        self.assertTrue(node.extra.get('service_name') is not None)
        self.assertTrue(node.extra.get('uri') is not None)
dataset/ETHPy150Open apache/libcloud/libcloud/test/compute/test_openstack.py/OpenStack_1_1_Tests.test_list_nodes/original