def rebase(self):
if self.standalone:<EOL><INDENT>rebase_msg = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>rebase_msg = '<STR_LIT>'<EOL><DEDENT>with LogTask(rebase_msg):<EOL><INDENT>if len(self.src_qemu_info) == <NUM_LIT:1>:<EOL><INDENT>return<EOL><DEDENT>if self.standalone:<EOL><INDENT>utils.qemu_rebase(target=self.dst, backing_file="<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>if len(self.src_qemu_info) > <NUM_LIT:2>:<EOL><INDENT>raise utils.LagoUserException(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>parent = self.src_qemu_info[<NUM_LIT:0>]['<STR_LIT>']<EOL>parent = os.path.basename(parent)<EOL>try:<EOL><INDENT>parent = parent.split('<STR_LIT::>', <NUM_LIT:1>)[<NUM_LIT:1>]<EOL><DEDENT>except IndexError:<EOL><INDENT>pass<EOL><DEDENT>parent = '<STR_LIT>'.format(parent)<EOL>utils.qemu_rebase(<EOL>target=self.dst, backing_file=parent, safe=False<EOL>)<EOL><DEDENT><DEDENT>
Change the backing-file entry of the exported disk.
Please refer to 'qemu-img rebase' manual for more info.