def do_delete(self, args):
        try:
            #add arguments
            doParser = self.arg_delete()
            try:
                doArgs = doParser.parse_args(args.split())
            except __HOLE__ as e:
                return
            #call UForge API
            printer.out("Searching image with id ["+doArgs.id+"] ...")
            images = self.api.Users(self.login).Images.Get()
            images = images.images.image
            if images is None or len(images) == 0:
                printer.out("No images available")
            else:
                table = Texttable(800)
                table.set_cols_dtype(["t","t","t","t","t","t","t","c","t"])
                table.header(["Id", "Name", "Version", "Rev.", "Format", "Created", "Size", "Compressed", "Status"])
                deleteImage = None
                for image in images:
                    if str(image.dbId) == str(doArgs.id):
                        imgStatus=self.get_image_status(image.status)
                        table.add_row([image.dbId, image.name, image.version, image.revision, image.targetFormat.name, image.created.strftime("%Y-%m-%d %H:%M:%S"), size(image.size), "X" if image.compress else "", imgStatus])
                        deleteImage=image
                if deleteImage is not None:
                    print table.draw() + "\n"
                    if generics_utils.query_yes_no("Do you really want to delete image with id "+str(deleteImage.dbId)):
                        self.api.Users(self.login).Appliances(generics_utils.extract_id(deleteImage.applianceUri)).Images(deleteImage.dbId).Delete()
                        printer.out("Image deleted", printer.OK)
                else:
                    printer.out("Image not found", printer.ERROR)


        except ArgumentParserError as e:
            printer.out("ERROR: In Arguments: "+str(e), printer.ERROR)
            self.help_delete()
        except Exception as e:
            return handle_uforge_exception(e)
dataset/ETHPy150Open usharesoft/hammr/src/hammr/commands/image/image.py/Image.do_delete