#NEWLINE# def deploy_disk_image( address , port , iqn , lun , image_path , node_uuid ) : #NEWLINE# #INDENT# "All-in-one function to deploy a whole disk image to a node.\n\n    :param address: The iSCSI IP address.\n    :param port: The iSCSI port number.\n    :param iqn: The iSCSI qualified name.\n    :param lun: The iSCSI logical unit number.\n    :param image_path: Path for the instance's disk image.\n    :param node_uuid: node's uuid. Used for logging. Currently not in use\n        by this function but could be used in the future.\n    :returns: a dictionary containing the key 'disk identifier' to identify\n        the disk which was used for deployment.\n    " #NEWLINE# with _iscsi_setup_and_handle_errors ( address , port , iqn , lun ) as dev : #NEWLINE# #INDENT# disk_utils . populate_image ( image_path , dev ) #NEWLINE# disk_identifier = disk_utils . get_disk_identifier ( dev ) #NEWLINE# #UNINDENT# return { #NEWLINE# #INDENT# 'disk identifier' : disk_identifier , #NEWLINE# #UNINDENT# }