@classmethod<EOL><INDENT>def create_from_tuple(cls, volume):<DEDENT>
if isinstance(volume, six.string_types):<EOL><INDENT>return Volume(target=volume)<EOL><DEDENT>elif len(volume) == <NUM_LIT:2>:<EOL><INDENT>return Volume(source=volume[<NUM_LIT:0>],<EOL>target=volume[<NUM_LIT:1>])<EOL><DEDENT>elif len(volume) == <NUM_LIT:3>:<EOL><INDENT>return Volume(source=volume[<NUM_LIT:0>],<EOL>target=volume[<NUM_LIT:1>],<EOL>mode=volume[<NUM_LIT:2>])<EOL><DEDENT>else:<EOL><INDENT>logger.debug("<STR_LIT>"<EOL>"<STR_LIT>".format(volume))<EOL>raise ConuException("<STR_LIT>")<EOL><DEDENT>
Create instance from tuple.
:param volume: tuple in one one of the following forms: target | source,target | source,target,mode
:return: instance of Volume