コード例 #1
0
    def test_deleted_not_migrated(self):
        cn_values = dict(vcpus=1,
                         memory_mb=512,
                         local_gb=10,
                         vcpus_used=0,
                         memory_mb_used=256,
                         local_gb_used=5,
                         hypervisor_type='HyperDanVM',
                         hypervisor_version='34',
                         cpu_info='foo')
        cn = db_api.compute_node_create(self.context, cn_values)
        agg_values = dict(name='foo')
        agg = db_api.aggregate_create(self.context, agg_values)
        pd = db_api.pci_device_update(
            self.context, 1, 'foo:bar', {
                'parent_addr': None,
                'compute_node_id': 1,
                'address': 'foo:bar',
                'vendor_id': '123',
                'product_id': '456',
                'dev_type': 'foo',
                'label': 'foobar',
                'status': 'whatisthis?'
            })
        db_api.compute_node_delete(self.context, cn['id'])
        db_api.aggregate_delete(self.context, agg['id'])
        db_api.pci_device_destroy(self.context, pd['compute_node_id'],
                                  pd['address'])

        # blocker should not block on soft-deleted records
        self.migration.upgrade(self.engine)
コード例 #2
0
    def test_deleted_not_migrated(self):
        cn_values = dict(vcpus=1, memory_mb=512, local_gb=10,
                         vcpus_used=0, memory_mb_used=256,
                         local_gb_used=5, hypervisor_type='HyperDanVM',
                         hypervisor_version='34', cpu_info='foo')
        cn = db_api.compute_node_create(self.context, cn_values)
        agg_values = dict(name='foo')
        agg = db_api.aggregate_create(self.context, agg_values)
        pd = db_api.pci_device_update(self.context, 1, 'foo:bar',
                                 {'parent_addr': None,
                                  'compute_node_id': 1,
                                  'address': 'foo:bar',
                                  'vendor_id': '123',
                                  'product_id': '456',
                                  'dev_type': 'foo',
                                  'label': 'foobar',
                                  'status': 'whatisthis?'})
        db_api.compute_node_delete(self.context, cn['id'])
        db_api.aggregate_delete(self.context, agg['id'])
        db_api.pci_device_destroy(self.context, pd['compute_node_id'],
                                  pd['address'])

        # blocker should not block on soft-deleted records
        self.migration.upgrade(self.engine)
コード例 #3
0
 def test_upgrade_with_deleted_aggregates(self):
     agg = db_api.aggregate_create(self.context, self.aggregate_values)
     db_api.aggregate_delete(self.context, agg['id'])
     self.migration.upgrade(self.engine)
コード例 #4
0
 def test_upgrade_with_deleted_aggregates(self):
     agg = db_api.aggregate_create(self.context, self.aggregate_values)
     db_api.aggregate_delete(self.context, agg['id'])
     self.migration.upgrade(self.engine)