def create_from_tuple(cls, volume):
        """
        Create instance from tuple.
        :param volume: tuple in one one of the following forms: target | source,target | source,target,mode
        :return: instance of Volume
        """
        if isinstance(volume, six.string_types):
            return Volume(target=volume)
        elif len(volume) == 2:
            return Volume(source=volume[0],
                          target=volume[1])
        elif len(volume) == 3:
            return Volume(source=volume[0],
                          target=volume[1],
                          mode=volume[2])
        else:
            logger.debug("Cannot create volume instance from {}."
                         "It has to be tuple of form target x source,target x source,target,mode.".format(volume))
            raise ConuException("Cannot create volume instance.")
Create instance from tuple.
        :param volume: tuple in one one of the following forms: target | source,target | source,target,mode
        :return: instance of Volume