#NEWLINE# def ex_clone_drive( self , drive , name = None , ex_avoid = None ) : #NEWLINE# #INDENT# '\n        Clone a library or a standard drive.\n\n        :param drive: Drive to clone.\n        :type drive: :class:`libcloud.compute.base.NodeImage` or\n                     :class:`.CloudSigmaDrive`\n\n        :param name: Optional name for the cloned drive.\n        :type name: ``str``\n\n        :param ex_avoid: A list of other drive uuids to avoid when\n                         creating this drive. If provided, drive will\n                         attempt to be created on a different\n                         physical infrastructure from other drives\n                         specified using this argument. (optional)\n        :type ex_avoid: ``list``\n\n        :return: New cloned drive.\n        :rtype: :class:`.CloudSigmaDrive`\n        ' #NEWLINE# params = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# data = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# if ex_avoid : #NEWLINE# #INDENT# params [ 'avoid' ] = ',' . join ( ex_avoid ) #NEWLINE# #UNINDENT# if data : #NEWLINE# #INDENT# data [ 'name' ] = name #NEWLINE# #UNINDENT# path = ( '/drives/%s/action/' % drive . id ) #NEWLINE# response = self . _perform_action ( path = path , action = 'clone' , params = params , data = data , method = 'POST' ) #NEWLINE# drive = self . _to_drive ( data = response . object [ 'objects' ] [ 0 ] ) #NEWLINE# return drive