'Initialize volume state table  with transitions for ``create_volume``,
``attach_volume``, ``detach_volume``, ``delete_volume`` operations.'

def _populate_volume_state_table():

    O = VolumeOperations
    S = VolumeStates
    table = pmap()
    def add_flow(operation, start, transient, end, sets_attach, unsets_attach):
        '\n                                                Helper    to    add    expected    volume    states    for    given    operation.\n                                                '
        return table.set(operation, VolumeStateFlow(start_state=start, transient_state=transient, end_state=end, sets_attach=sets_attach, unsets_attach=unsets_attach))
    table = add_flow(O.CREATE, S.EMPTY, S.CREATING, S.AVAILABLE, False, False)
    table = add_flow(O.ATTACH, S.AVAILABLE, S.ATTACHING, S.IN_USE, True, False)
    table = add_flow(O.DETACH, S.IN_USE, S.DETACHING, S.AVAILABLE, False, True)
    table = add_flow(O.DESTROY, S.AVAILABLE, S.DELETING, S.EMPTY, False, False)
    return table
