'Add data to test the SQL migration.'

def _pre_upgrade_101(self, engine):

    types_table = db_utils.get_table(engine, 'volume_types')
    for i in range(1, 5):
        types_table.insert().execute({'id': str(i)})
    specs_table = db_utils.get_table(engine, 'volume_type_extra_specs')
    specs = [{'volume_type_id': '1', 'key': 'key', 'value': '<is>    False'}, {'volume_type_id': '2', 'key': 'replication_enabled', 'value': '<is>    False'}, {'volume_type_id': '3', 'key': 'replication_enabled', 'value': '<is>    True', 'deleted': True}, {'volume_type_id': '3', 'key': 'key', 'value': '<is>    True'}, {'volume_type_id': '4', 'key': 'replication_enabled', 'value': '<is>    True'}, {'volume_type_id': '4', 'key': 'key', 'value': '<is>    True'}]
    for spec in specs:
        specs_table.insert().execute(spec)
    volumes_table = db_utils.get_table(engine, 'volumes')
    volumes = [{'id': '1', 'replication_status': 'disabled', 'volume_type_id': None}, {'id': '2', 'replication_status': 'disabled', 'volume_type_id': ''}, {'id': '3', 'replication_status': 'disabled', 'volume_type_id': '1'}, {'id': '4', 'replication_status': 'disabled', 'volume_type_id': '2'}, {'id': '5', 'replication_status': 'disabled', 'volume_type_id': '2'}, {'id': '6', 'replication_status': 'disabled', 'volume_type_id': '3'}, {'id': '7', 'replication_status': 'error', 'volume_type_id': '4'}, {'id': '8', 'deleted': True, 'replication_status': 'disabled', 'volume_type_id': '4'}, {'id': '9', 'replication_status': 'disabled', 'deleted': None, 'volume_type_id': '4'}, {'id': '10', 'replication_status': 'disabled', 'deleted': False, 'volume_type_id': '4'}]
    for volume in volumes:
        volumes_table.insert().execute(volume)
    expected = {v['id']: v['replication_status'] for v in volumes}
    expected['9'] = 'enabled'
    expected['10'] = 'enabled'
    return expected
