コード例 #1
0
    def setUp(self):
        super(BareMetalPXETestCase, self).setUp()
        self.config(**COMMON_CONFIG)
        self.config(**BAREMETAL_CONFIG)
        self.driver = pxe.PXE(fake_virt.FakeVirtAPI())

        fake_image.stub_out_image_service(self.stubs)
        self.addCleanup(fake_image.FakeImageService_reset)
        self.context = utils.get_test_admin_context()
        self.test_block_device_info = None,
        self.instance = utils.get_test_instance()
        self.test_network_info = utils.get_test_network_info(),
        self.node_info = db_utils.new_bm_node(
            service_host='test_host',
            cpus=4,
            memory_mb=2048,
            prov_mac_address='11:11:11:11:11:11',
        )
        self.nic_info = [
            {
                'address': '22:22:22:22:22:22',
                'datapath_id': '0x1',
                'port_no': 1
            },
            {
                'address': '33:33:33:33:33:33',
                'datapath_id': '0x2',
                'port_no': 2
            },
        ]
コード例 #2
0
ファイル: test_pxe.py プロジェクト: AsylumCorp/ironic
    def test_swap_not_zero(self):
        # override swap to 0
        instance_type = utils.get_test_instance_type(self.context)
        instance_type['swap'] = 0
        self.instance = utils.get_test_instance(self.context, instance_type)

        sizes = pxe.get_partition_sizes(self.instance)
        self.assertEqual(sizes[0], 40960)
        self.assertEqual(sizes[1], 1)
コード例 #3
0
    def test_swap_not_zero(self):
        # override swap to 0
        instance_type = utils.get_test_instance_type(self.context)
        instance_type['swap'] = 0
        self.instance = utils.get_test_instance(self.context, instance_type)

        sizes = pxe.get_partition_sizes(self.instance)
        self.assertEqual(sizes[0], 40960)
        self.assertEqual(sizes[1], 1)
コード例 #4
0
ファイル: test_pxe.py プロジェクト: AsylumCorp/ironic
    def setUp(self):
        super(BareMetalPXETestCase, self).setUp()
        self.config(**COMMON_CONFIG)
        self.config(**BAREMETAL_CONFIG)
        self.driver = pxe.PXE(fake_virt.FakeVirtAPI())

        fake_image.stub_out_image_service(self.stubs)
        self.addCleanup(fake_image.FakeImageService_reset)
        self.context = utils.get_test_admin_context()
        self.test_block_device_info = None,
        self.instance = utils.get_test_instance()
        self.test_network_info = utils.get_test_network_info(),
        self.node_info = db_utils.new_bm_node(
                service_host='test_host',
                cpus=4,
                memory_mb=2048,
                prov_mac_address='11:11:11:11:11:11',
            )
        self.nic_info = [
                {'address': '22:22:22:22:22:22', 'datapath_id': '0x1',
                    'port_no': 1},
                {'address': '33:33:33:33:33:33', 'datapath_id': '0x2',
                    'port_no': 2},
            ]