コード例 #1
0
    def test_rbd_ec_pool(self, mock_call):
        self.test_config.set('pool-type', 'erasure-coded')
        mock_call.return_value = {'mon_hosts': 'foo,bar'}
        ctxt = context.NovaComputeCephContext()()
        self.assertEqual(ctxt['rbd_pool'], 'nova-metadata')

        self.test_config.set('ec-rbd-metadata-pool', 'nova-newmetadata')
        ctxt = context.NovaComputeCephContext()()
        self.assertEqual(ctxt['rbd_pool'], 'nova-newmetadata')
コード例 #2
0
 def test_rbd_replicated_pool(self, mock_call):
     mock_call.return_value = {'mon_hosts': 'foo,bar'}
     ctxt = context.NovaComputeCephContext()()
     self.assertEqual(ctxt['rbd_pool'], 'nova')