'create FB volume when enable replication.'

@mock.patch.object(eventlet, 'sleep')
def test_create_fb_replicated_volume(self, mock_sleep):

    self.configuration.replication_device = [TEST_REPLICATION_DEVICE]
    self.driver = FakeDS8KProxy(self.storage_info, self.logger, self.exception, self)
    self.driver.setup(self.ctxt)
    extra_spec = {'replication_enabled': '<is>    True'}
    vol_type = volume_types.create(self.ctxt, 'VOL_TYPE', extra_spec)
    volume = self._create_volume(volume_type_id=vol_type.id)
    vol = self.driver.create_volume(volume)
    self.assertEqual(TEST_VOLUME_ID, ast.literal_eval(vol['provider_location'])['vol_hex_id'])
    repl = eval(vol['metadata']['replication'])
    self.assertEqual(TEST_VOLUME_ID, repl[TEST_TARGET_DS8K_IP]['vol_hex_id'])
